I am using Jira Cloud. In that while using Script Runner, I am facing this isuue.
I am trying to calculate the Total Time Spent by a Story in "In Progress" Status. So, whenever it moves to "Done" Status, there is custom field which shows the time spent in this format (d h m s).
Note: The Story can be Reopened again. So, the time should be added accordingly. Below is my code for Script Runner
What to do?
Hi Jaynath,
The issue appears to be with line 122, where you go to update the issue.
ScriptRunner for Jira Cloud uses Unirest to make rest calls, so you should use Unirest rather than httpClient, which is not a supported package.
I can confirm we have an example of updating a field on an issue here on line 32 that you can use as an example to help refactor your script.
I hope this information helps.
Regards,
Kristian
What type is the field you are trying to set, and how is this script configured?
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script is configured in a way that, the time starts to count when Story moves to "In Progress". And after it transition to "Done", the calculated time should be displayed in a custom field (text field) and time should stop when the Story is in "Done" status.
Now, if the Story is reopened or moved to "In Progress" status again, the time should start. After it moves to "Done" status, the value in the custom field and this new time should be added and displayed in the custom field.
Note: The Story should only have one field for Total Time Spent by the Story in "In Progress" status. The time should in this format (days hours min sec)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayanth,
I would advise raising this issue as a support ticket with the support team located here who will be able to help debug this issue further.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.