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.
How to get the "date received" value:
CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager(); CustomField dateReceivedField = customFieldManager.getCustomFieldObjectByName("date received"); def dateReceived = issue.getCustomFieldValue(dataReceivedField)
can anyone help at all please? need to get this sorted asap as its one of the conditions that need to be fixed in order for pilot of jira to be successful! arghhhhhh damn my inability to code with jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cant seem to figure this one out, im guessing because i dont know how to correctly call a custom field as well as that particular custom field being a date and not time..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you paste the code that you have so far?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.