Here is the changed items
ChangeHistoryItem{id=278663, changeGroupId=202468, userKey='JIRAUSER11313', field='addr_doc', projectId=10400, issueId=64081, issueKey='abc-3162', created=2021-10-25 17:39:35.0, nextChangeCreated=292278994-08-17 15:12:55.807, fromValues={}, toValues={}}
The status change wasn't captured by listener. However, a status change did happen at the same time. This happens from time to time, but does not happen every time.
It should be like this
ChangeHistoryItem{id=278557, changeGroupId=202410, userKey='JIRAUSER11462', field='status', projectId=10400, issueId=64080, issueKey='abc-3161', created=2021-10-25 17:23:28.0, nextChangeCreated=292278994-08-17 15:12:55.807, fromValues={10124=xxxstate}, toValues={10106=yyystate}}
How can I make sure the status change captured? Or is there a way to obtain the status change during the same change using jira API? (I'm using scriptrunner groovy language)
I use code below to capture the event
def issue=event.getIssue() // get issue which triggered listeneer
// this below is list of updates of <issue>
def changeItems = ComponentAccessor.getChangeHistoryManager().getAllChangeItems(issue)
def length = changeItems.size() // length of this list
def changeF = changeItems[length-1].getProperties()["field"]
if( changeF == "status"){
My further behaviours}
---------------------------------
Just found out that actually there were more than 1 changes made in the same time (even 4 at a time) and "status" change will always be the first to fire. Thus if I were to search for status change backwards, I need to read 4 or 5 more changes and check them
My guess would be that your workflow is firing a different event to the one you are expecting it, so the listener is not picking it up.
Just found out that actually there were more than 1 changes made in the same time (even 4 at a time) and "status" change will always be the first to fire. Thus if I were to search for status change backwards, I need to read 4 or 5 more changes and check them
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.