Add the changed time in the note webhook at least in a machine readable format
Description
This feature proposal is extracted from this bigger ticket: gitlab-ce#33211. You may also want to check this original ticket if some context is lacking.
We are in the process of migrating our Trac setup to GitLab EES. We are heavily using time tracking internally, and our main use case is that when anything that has a time field happen in Trac, a webhook is triggered in our (custom) CRM to generate (1) a feed of events showing the comment and time tracked , and (2) an aggregate of the time tracked to calculate our hours worked and overtime as soon as an event happen.
Right now, the webhook triggered when a note is added, only contained the aggregated time on the whole ticket like so:
{
...
"total_time_spent": 72000,
"human_total_time_spent": "2d 4h",
...
}
Proposal
Our proposal would be to add at least a machine-readable field containing time that got tracked. A human readable field could also be added for convenience, but the machine readable one is actually the most important of the two to digest the webhook easily:
{
...
"total_time_spent": 72000,
"human_total_time_spent": "2d 4h",
"time_change": 600,
"human_time_change": "10m",
...
}
The advantage of a setup like this is that one could easily plug any time tracking system that can react on webhook or API trigger. The fact that the field is machine-readable also help simplify the parsing of such information.