Hello,
Is it possible to get the previous type of an issue using groovy?
I need to know it for a condition inside my script listener.
Thanks,
Daniel
I found a solution:
ChangeHistoryManager changeHistoryManager =ComponentAccessor.getChangeHistoryManager();
List <ChangeItemBean> changeItemBeans= changeHistoryManager.getChangeItemsForField(issue, "issuetype");
def sizeHistory = changeItemBeans.size()
return changeItemBeans[sizeHistory-1].fromString
Hi Daniel,
I can't give you a very specific answer on how to do it but as long as you're able to access the issue's history entries you should be able to retrieve that issue type information from the entry of the move operation.
Best, Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Max,
I found a solution:
ChangeHistoryManager changeHistoryManager =ComponentAccessor.getChangeHistoryManager();
List <ChangeItemBean> changeItemBeans= changeHistoryManager.getChangeItemsForField(issue, "issuetype");
def sizeHistory = changeItemBeans.size()
return changeItemBeans[sizeHistory-1].fromString
BR,
Daniel
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.