Forums

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

scriptrunner post function won't trigger

Matt Parks
December 15, 2017

I have a basic understanding of why the function won't trigger, but I'm wondering if anyone can provide a workaround.

 

I have two different workflows: one for Epics and another for Requirements that exist as issues with Epics.

 

In the Requirements workflow, I have added a Linked Transition (JSU) post function on the transition to the Done status that will trigger a specific transition on its Epic when all of its siblings are in the Done status. Basically, whenever all issues within the Epic are Done, move the Epic to a Ready to Test status. I have confirmed that, on its own, this post function executes properly.

 

However, I have added a ScriptRunner workflow function on the transition in the Epic workflow that is being updated by the Linked Transition post function I mentioned above. This function checks a JQL query and requires that all issues within the Epic are in the Done status in order for the transition to be allowed. I have confirmed that this condition works properly on its own.

 

My problem is that, once I add the condition to the Epic workflow, the Linked Transition post function no longer executes. My guess is that there is a timing issue where the Epic isn't fully aware that the last issue in the Epic has transitioned to Done status, so it doesn't allow the transition to execute. Afterwards, I can manually transition the Epic to the Ready to Test status.

 

I have moved the Linked Transition post function all the way to the bottom of the list of post functions (after the issue is stored in the DB and re-indexed), but this doesn't have any effect. Is there a way that I can notify the Epic that all of its children are in Done status while the final child is transitioning to the Done status so the condition is met?

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Niranjan
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 Champions.
September 16, 2020

Hi @Berry Kersten ,

You can try using 

com.atlassian.jira.jira-view-issue-plugin:datesmodule

com.atlassian.jira.jira-view-issue-plugin:peoplemodule

2 votes
Niranjan
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 Champions.
September 15, 2020

Hi @Berry Kersten  ,

You can use script fragments to hide UI elements.

https://scriptrunner.adaptavist.com/6.6.0/jira/fragments/HideUIElement.html

 

Go to Admin → Script Fragments, and select Hide system or plugin UI element  and select the project and UI elements that you would like to hide.

Berry Kersten
Contributor
September 16, 2020

Hi @Niranjan great, thanks! Found it :-)

One more question, I don't see script fragments for the People and Dates panel.

Is it possible to add them manually that you know of?

Schermafbeelding 2020-09-16 om 09.12.36.png

support for vo
Contributor
January 20, 2021

Hi Berry,
Did you find a solution for your request ? I would like to do the same ...
Thanks.
Catherine

Berry Kersten
Contributor
January 21, 2021

Hi Catherine,

Yes, that's:

com.atlassian.jira.jira-view-issue-plugin:datesmodule

com.atlassian.jira.jira-view-issue-plugin:peoplemodule

 

Schermafbeelding 2021-01-21 om 11.54.20.png

Like eli.cohen likes this
support for vo
Contributor
January 22, 2021

Hi Berry,
Thanks a lot for your reply.
I tried exactly the same on a preProd instance. Then stop/start Jira. It doesn't work. Reboot the server, and it is the same.
We use Jira Server V8.5.5.

Script fragment.png

Do you think it is a problem ?

Berry Kersten
Contributor
January 22, 2021

I'm not a Groovy guru, but in the condition, can you try !=  instead of == ?

Like Azfar Masut likes this
eli.cohen
March 3, 2021

Is there also a way to disable the issue export button can't find the element on the fragment 

TAGS
AUG Leaders

Atlassian Community Events