Summary
I am beginning to log time spent on our support tickets using Jira Service Desk and Automation for Jira. I have taken a look at the existing plugin for our billing app "Harvest" and the functionality is sub par for our needs, so I've decided to automate the recording of timepent, however, I am getting an error "AS-6558 (Invalid time duration entered. (worklog_timeLogged))." in the second automation rule.
Logic of Automation Rules
Rule 1: When ticket is transitioned from any status to "In progress", I have a field (only available on the edit screen) called "Timestamp_for_billing", I set the timestamp to {{now}} which records the timestamp the user begins working on this issue.
Rule 2: When the ticket is transitioned from "In Progress" to any other status, I have an automation rule with the following logic that is throwing the error mentioned the summary above.
{
"update": {
"worklog" : [
{
"add": {
"timeSpent" : "{{now.diff(issue.Timestamp_for_billing).minutes}}m"
}
}
]
}
}
Any ideas of what I am doing wrong, or if anyone has a better way to do this, I am open to suggestions.
Thanks in advance!!