Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Event still inactive even if it is part of a workflow

Mouna Hammoudi
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 12, 2023

I would like an event to be fired when a transition is executed. 

Capture.PNG

Here is the whole picture 

Capture2.PNG

The transition is still shown as inactive even though it is used by a workflow: 

Capture3.PNG

How can I fix this problem and make the transition valid?

The event is also not fired when I click on the transition enter image description here

2 answers

0 votes
Darin Hafer February 18, 2025

Hello @Mouna Hammoudi I understand the issue you are reporting. I see the same. And I have the solution.

I am aware that the event must be associated with a notification scheme or a workflow. I see from your screenshot that you put the SR post-function just before the post-function that fires the 'Generic Event'.

I did the same, but then I learned that when you associate it with a workflow, DO NOT use the scriptrunner Fire Event post-function. 

Instead, change the existing post-function to fire your event instead of 'Generic Event'.

For @Nic Brough -Adaptavist- benefit, when we look at the events in the system (secure/admin/ListEventTypes.jspa), they appear 'Inactive' unless you associate the event to a workflow. If we use the SR post-function to fire an event, we see that the event remains 'Inactive', so using the SR post-function doesn't satisfy.

Screenshot 2025-02-18 at 2.08.37 PM.png

For me, to get this to recognize the workflow post-function, I had to fire the event from the existing post-function, like so:

Screenshot 2025-02-18 at 2.16.14 PM.png

and to satisfy the need for it to be "associated with a workflow", create a dummy workflow used by no projects. In the dummy workflow, change the default post-function make a reference to your event.

Once you do, your events suddenly become active.

Screenshot 2025-02-18 at 2.14.36 PM.png

Once active, you can fire them via a post-function or in custom code.

0 votes
Nic Brough -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 12, 2023

This happens when all the workflows that fire the event are inactive, or there are none using it at all.

You probably need to publish the draft workflow where you have added the event.

A number of versions ago, there was a minor bug in Jira that meant you also have to have triggered the event at least once to get Jira to realise that the event is active.  I do not know if that has been fixed, but a good test remains behind it - try triggering the event and then going back to look at its state.

Mouna Hammoudi
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 12, 2023

@Nic Brough -Adaptavist-  

It has already been published, it's not just a draft. Even though it has been published, it's still shown as inactive.

Nic Brough -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 12, 2023

And what about the rest of the answer?

Mouna Hammoudi
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 12, 2023

@Nic Brough -Adaptavist- 

I have triggered the event many many times and still, nothing happens.

Mouna Hammoudi
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 12, 2023

@Nic Brough -Adaptavist- 

 

I have triggered the event many times, here is the proof

 

Capture.PNG

However, the iTrac SF is still inactive

Capture2.PNG

Nic Brough -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 12, 2023

So it is active.  What makes you think it is inactive?

Mouna Hammoudi
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 12, 2023

@Nic Brough -Adaptavist- 

 

I have checked the list of events and it is still shown as inactive.

Nic Brough -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 12, 2023

Could you show us that?  I can't see inactive events when they are active, so I'm a bit stuck on what you are seeing.

Suggest an answer

Log in or Sign up to answer