When an issue is unlinked/delinked in JIRA, I want to fetch the value of a particular custom field in that issue and delete its value.
Hello @SWAPNIL SRIVASTAV
You can write a custom listener with script runner plugin which should listen to the event "IssueLinkDeleted" and in the listener you can update the custom field value for the issue as null.
And here's the API for the event, from the event object you can get issueLink and from issueLink you can get sourceObject and destinationObject thus you will get objects of both issues involved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Tarun Sapra ,
Yes, I tried the same. But, I am not able to fetch the issue ID of unlinked issue in the script listener. Could you please let me know how to do that.
Thanks,
Swapnil Srivastav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, I have two JIRA instances, The IssueLinkDeletedEvent is available in only one instance. Could you have any idea why is that?
Thanks,
Swapnil Srivastav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The even was introduced in 7.5 i think, hence one JIra instance can be an earlier version of Jira.
The even object in the listener should return to you the issueLink and using issueLink you can get source and destination object both.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I see. Ok, I am trying the script listener in one instance, one with version 7.6.6. Is there any alternative for the jira instance with version earlier of 7.5, mine is 7.4.4 to be precise. Any help would be appreciated.
Thanks and Regards,
Swapnil Srivastav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got the script listener working for instance 7.6.6. Still open to any possible alternatives for version 7.4.4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.