Availability
This routine is available starting with katl-commons 2.5.
This routine is available for Jira server and cloud deployment options.
Syntax for the server version:
getWorklogLoggedHours(worklog)
Syntax for the cloud version:
getWorklogLoggedHours(issue, worklog)
Description
Returns the logged hours for a worklog.
Parameters for the server version:
Parameter | Type | Required | Description |
---|---|---|---|
worklog | Number | Yes | Id of the selected worklog. |
Parameters for the cloud version:
Parameter | Type | Required | Description |
---|---|---|---|
issue | String | Yes | The issue key |
worklog | Number | Yes | Id of the selected worklog. |
Return type
Interval
Example 1 (server only)
print(getWorklogLoggedHours(11201))
Prints the logged hours for the worklog with id = 11201.
Example 2 (server only)
for(number id in getWorklogIdsForUser("admin", "TP-9")){ print(getWorklogLoggedHours(id)) }
Prints the logged hours for all the admin's worklogs of the issue with key = "TP-9".
Example 3 (cloud only)
print(getWorklogLoggedHours(key, 11201))
Prints the logged hours for the worklog with id = 11201, on the current issue.
See also