Hi
I am looking to the possibility to get the last update on the Issue custom field if it has modified.
I can get the History Manager but looks like I lost on the further steps ...
import com.atlassian.jira.component.ComponentAccessor def issueManager = ComponentAccessor.getIssueManager() def changeHistoryManager = ComponentAccessor.getChangeHistoryManager() def issue = issueManager.getIssueObject("ISSUE-1") def previousTransitison = changeHistoryManager.getChangeItemsForField(issue, 'CF1') previousTransitison.each() { ????? }
I understand that if Issue is just created or only description is updated I will get empty results.
I will handle this by getting back the original Issue Updated timestamp.
Thanks,
Areg
Community moderators have prevented the ability to post new answers.
It will be something like:
previousTransitison*.created.max()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Areg Vrtanesyan _Work_,
I am having same requirement as you described above. did you get any final solution for that?
would you please help me out for same?
-Mohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to use issue.getUpdated(), that returns timestamp when issue was last updated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I really need to do a bit complicated search.
I need to know when the particular field in the Issue was updated last time and not issue itself.
For example I have custom field "CF1" and I have added comment or version or Component to the Issue but did not touched the "CF1".
For my logic as "CF1" is not changed Issue is not updated and it's last update is Issue creation date.
If "CF1" is updated I would like to gather the last date when it was updated and use it as Updated in my comparisons.
Regards,
Areg
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.