This post is in continuation with my previous question -
I am able to get the different values related to the issue and have included those in my custom email template. Now in the template itself I want to be able to show a table titled - "Change Fields" inside which I will show all those fields whose values/content has been changed on transition. I want to find the previous value(before transition) held by the changed fields and also the current value(post transition). Any documentation or tutorial about such functions would also help.
Edit - Any thoughts guys? On transition from one state to another I want to find what properties(for eg., description, priority, attachment) of an issue has been changed and show the old values of the properties as well the new one. Please help.
@Tarun Sapra The above error comes when I try to trigger the custom email Post Function on transition. But if I go into the editor and provide the issue key and do a Preview then it works fine.
The other way I found is to use - changeHistoryManager and get old, new value for each field, compare it and show the changed ones as follows -
def changeHistoryManager = com.atlassian.jira.component.ComponentAccessor.getChangeHistoryManager()
def created = changeHistoryManager.getChangeItemsForField(issue, "summary")
Any thoughts? Or better way than this?
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...
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