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

How to get JIRA system-event information using JJUPIN/SIL?

Jannik Luyten
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.
September 29, 2013

Hi everyone

I am putting up a synchronisation between two JIRA instances using JJUPIN/SIL. All is going well, altough there are a few points that I can't seem to get across:

  1. When an issue transition occured and a jira-generic-issue event is sent, how do I pick up which transition was made? (I need its name). The only information I have now, is the new status of the issue, but I need to know which transition to call on the second system;
  2. When a jira-comment-(updated/deleted) event is sent, how do I retrieve information regarding this comment? I.e. for an updated comment, I do not have _any_ information regarding the content or the id of the comment that was altered. The same for a deleted comment;

At this point I am unaware of the ability to get event-specific information. Is this possible? Does anyone know a workaround/solution for the above problems?

Any help on this would be highly appreciated!

Kind regards

Jannik

1 answer

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
Florin Manaila
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.
September 29, 2013

Hi Jannik,

For both your questions, the short answer is "no, at the moment that is not possible, but there are workarounds". And now I will go into a bit of details about each use-case.

1. The event object itself does not contain this information. There is a piece of vague info that says the event source is an "action", but that's it (adding a comment is also considered an action). It does not specify an individual action/transition, so i doubt that we could retrieve the transition name/id from the event object. As a workaround, you could use separate events for each transition.

2. The story with comments is similar, except the behavior here is inconsistent. For example, the Comment Added event contains the comment, while Comment Deleted does not. The (partial - will not work for delete) workaround here would be to get all the comments using getAllCommentIds and then use getCommentById to get all their properties like created and updated date and use these properties to identify the comment that was last added/deleted.

If you think that providing any of the info contained within the event directly in the SIL script of the listener, please open an Improvement request on bugs.kepler-rominfo.com.

Hope this helps!

Jannik Luyten
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.
September 29, 2013

Thank you for your fast and informative response!

It's a shame though, that this is not possible, as this makes the use case of full synchronisation of issues between JIRA instances somewhat of a fairytale. Or at least very cumbersome. Adding new fields, modifying a workflow, all these things do not scale well as you would need to modify several, if not a lot, SIL scripts to get the synchronisation horse back on track.

TAGS
AUG Leaders

Atlassian Community Events