Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to retrieve issue links in delete issue event listener?

dchisholm October 29, 2012

Is it possible to retrieve an issue's links in an event listener when the issue is deleted?

It appears that the links have already been deleted by the time my event listener is triggered. What I'm trying to do is update issues that are linked to the issue that is being deleted.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2012

By the time an issue is deleted, all the related records like links are deleted. Event doesn't contain these details as Maxim mentioned.

Updating JIRA source is one option but you might also want to look at writing a plugin that gives a custom delete operation instead of the standard one. You can then disable the standard one and use the custom operation to store the link details or send it in the event so listeners can process it!

dchisholm October 31, 2012

Is there an event for changes to a link? A handler for that could be used in place of an issue event handler.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2012

Nope. Not yet. See https://jira.atlassian.com/browse/JRA-8505 . Same applies to Delete.

dchisholm October 31, 2012

Thanks for the link. I accepted this answer. While not optimal, these three options are the only choices.

0 votes
Maxim Abramovich October 31, 2012

Hi!

No way to do this without correct JIRA source code, because issue data for event not contains info about links. It has issue self, customFieldValues and watchers.

dchisholm October 31, 2012

For other event types, I can retrieve the issue links from the issue passed into the event handler, but the links are missing by the time the handler is invoked for a delete event. So it appears that JIRA has already partially deleted the issue.

Maxim Abramovich October 31, 2012

You right. For all others events you can get links, but delete event is 'special'.

Delete operation looks like:

- save issue(just like "table row") self, customFieldValues and watchers in event data object

- removeWorklogs (it meant, what you not get not only link, but worklogs too)

- remove sub-tasks

- remove links (!!!!!)

- remove history

.....

- dispatch Event (with event data object from first point)

TAGS
AUG Leaders

Atlassian Community Events