Hi, I need help to set datetime to customfield value when the issue is first time assigned only using the scriptrunner. I tried builtin listener but could found anything Useful. On cloud i used jira builtin automation trigger ticket assigned but now on data cneter I'm stuck and need script to perform the above operation.
Thanks
Hey @Wajahat Gul ,
If you issue will go from Unassigned to Assigned only once, perhaps you could try creating a custom listener that listens to the Issue Assigned event with the below script:-
def change = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "assignee"}
if(change) {
if (change.oldstring == null && change.newstring != null) {
//Set Date here
}
}
The script will check if the Assignee was changed from Unassigned to a specific user and then setting the date.
Of course, if ever your issue goes back to Unassigned and then assigned again, the date will change again.
Hope this helps.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.