Add labels to time tracking entries

Release notes

Problem to solve

As a user, I want to be able to add lables to a time tracking entry to so that my supervisor can filter them when evaluating the time to bill to the customers.

Intended users

User experience goal

The user who adds or edits a time tracking entry should be able add or remove the label associated with a time tracking entry.

This can be useful to then build time tracking reports which could filter the time tracking entries by label, for example allowing the report to show only the entries marked with the billable label.

Here I show an example of an issue which has only some entries of the tracked time that are actually billable (by decision of the company):

  • The analyst tracked 2h for the analysis (billable)
  • The developer tracked 3h for the implementation (billable)
  • The tester tracked 30m of testing (billable) and found a bug
  • The developer tracked other 30m for the resolution of the bug (not billable)

Now there are actually two totals:

  • the project manager sees the actual total amount which corresponds to 6h
  • the accountant sees only the billable total which corresponds to 5h 30m

The GitLab interface still would report the actual total, but a custom report could filter the entries and decide on how to sum each value by label. This could obviously be done by an implementation external to GitLab, for example a custom developed page to create time tracking reports with the needs of a particular company.

Proposal

The proposal is divided in two:

  • one regards the way the user sets the label when adding a time tracking entry, which is done using a slash command. This command should then accept additional parameters which are the labels to add to the time tracking entry.
  • one regards the way the user can edit the labels of a time tracking entry. This could be added to the edit interface that should be introduced by #356796 using the same widget already used to edit the labels associated with issues, MRs, epics, etc.

The proposal also includes some changes to the APIs:

  • the API to add a new time tracking entry should handle the labels that should be added to the entry
  • the API to edit a time tracking entry (from #356796) should also handle the addition or removal of the entry's labels
  • the API to retrieve the time tracking entries of an issue or MR should now return also the labels associated with each entry

Further details

Permissions and Security

Permissions concerns arise only in regards of the editing of a time tracking entry labels which, as per #356796 should be allowed only to the user who added the entry in the first place.

Documentation

Availability & Testing

Available Tier

  • Free, as the rest of the time tracking functionalities

Feature Usage Metrics

What does success look like, and how can we measure that?

Success of this feature would mean that:

  • the user who adds or edits a time tracking entry can add or remove labels for each one of the entries
  • an API user can be able to build a custom report by filtering the time tracking entries by label

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Marco Zille