Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ScriptRunner Listener in Jira - catch when issue value is cleared Edited

Hi all,


I am writing a ScriptRunner listener in Jira to catch when a couple of issue fields are cleared by the user.  I have the listener firing on an Issue Update event.  If the value of the fields change to another valid value, the listener is being invoked.  However, if the value of the field is cleared and is now null and the field gets deleted from the issue, the listener is not invoked.  What event do I have to catch in order to be invoked when those fields are cleared and the attribute gets deleted from the issue?  I am assuming that the CustomFieldDeletedEvent is looking strictly at custom fields, not at issues.


Also, for the two fields I am interested in (Epic Link and Portfolio's Parent Link), I don't seem to be getting invoked at all on some occassions, yet I do on others (without changing any additional fields on the issue - I only change Epic Link or Parent Link).




2 answers

2 accepted

0 votes
Answer accepted


Indeed, issue update events are not (properly) launched by the Epic-Link field changes, thats a known issue. I guess it dates from the time that the Agile part of Jira was still an add-on developed by an external company, and this field was(is still) s just a UI "placehiolder". the real info is in the link between the Epic and the issue. So i guess you better look for the issuelinkchange event...

I do not use Portfolio, but I guess its a similar issue ?

Yes, thanks!  This morning I started looking at the issuelinkdeletedevent and I am getting called every time (at least with Epic Link changes - haven't coded for Parent Link yet but like you, I suspect the same).

Ah, and here is the problem.  I need to catch if the Epic Link was cleared on a Story, and put back the previous value if so.  If I catch IssueLinkDeletedEvent, my code gets called before any subsequent IssueLinkCreatedEvent.  So if the user just updated the Epic Link, then a subsequent IssueLinkCreatedEvent will be invoked.  If they cleared Epic Link, then just the IssueLinkDeletedEvent will fire.  Is there any way I can tell if a link create event will be fired after me?

0 votes
Answer accepted

I finally got this to work (for Epic Link) by catching IssueChangedEventImpl - that does get fired and invoke the listener when Epic Link changes.  Parent Link is a whole other problem, as IssueChangeEventImpl does not get fired if the value for Parent Link gets cleared - that event will only be fired if the value is set or changed.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

177 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you