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.
https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/event/issue/link/IssueLinkDeletedEvent.html
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
Also, I have two JIRA instances, The IssueLinkDeletedEvent is available in only one instance. Could you have any idea why is that?
Swapnil Srivastav.
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.
It looks like you're new here. Sign in or register to get started.