i want to get the value of 'date received' and then find out how many days between that date and the date the status changed to resolved.
How can i do this? i found one bit of code but it calculates the days between someone was assigned and resolved and i cant get it to work with custom fields.
(issue.resolutionDate != null) ? String.format("%d day(s)",(int)((issue.resolutionDate.getTime() - issue.getCreated().getTime()) /(1000*60*60*24))) : "N/A" ; That is the code i found online but it seems to only work for when an issue is assigned.. and it compares it from assigned to resolved.. i want to change that so it gives me the number of days from the date of the custom field 'date received' till the date the status changes to resolved
How to get the "date received" value:
CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager(); CustomField dateReceivedField = customFieldManager.getCustomFieldObjectByName("date received"); def dateReceived = issue.getCustomFieldValue(dataReceivedField)
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs