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

Transition PostFunction not firing

Declan Gallagher February 10, 2018

Hi,

I have a Transition PostFunction that is not firing.

 

1. A user creates a Task Sub Task, it goes to Status:New via Transition from Create

2. I have a PostFunction on that Transition, for SubTasks, which is not firing.

 

Any pointers, or how I can debug?

Thanks

JIRA_POSTFUNCTION.png

 

JIRA_WORKFLOW.png

3 answers

1 accepted

1 vote
Answer accepted
Declan Gallagher February 12, 2018

Got this working

I used the PostFunction plugin Transition issue (JMWE add-on)

This allows you to add a Groovy script as a condition.

Wanted to transition all newly created sub-tasks to the same status (non complete) as their parent task.

Thanks

if(issue.parentObject !=null){
if(issue.parentObject.statusObject.name.equals("Some Status")){
return true
}
}
return false
1 vote
Ivan Tovbin
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.
February 10, 2018

Try setting this post function AFTER the "Re-index an issue to keep indexes in sync with the database." post function.

Declan Gallagher February 11, 2018

@Ivan Tovbin

Tried that, same result, still not firing the transition.

Thanks

 

JIRA_POST_NEW.png

Ivan Tovbin
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.
February 11, 2018

Fortunately I've got JWT installed in my test instance, so I've had the chance to test it myself and it does work just fine.

That said I can see a couple of possible reasons as to why it doesn't work for you:

1) The 'Current user' doesn't have the permission to execute the transition you wanna use in your post function.

2) That transition has conditions which are not met, preventing it from being executed.

3) I can't clearly see your post function on the screenshot you have uploaded, but it appears that you want to execute it conditionally based on a boolean expression. Perhaps the expression's conditions are not met or there's some syntax problem with it.

4) May be you've picked the transition you wanna execute wrong? Given that JWT lists ALL of your available transitions across ALL workflows in your instance, I'd say it's a possibility.

Declan Gallagher February 12, 2018

@Ivan Tovbin thanks for your help.

 

Still not working for me, I'll play around more see if I can get it going.

Do you know if there is logs I can check.

 

Thanks

I can perform the. operation manually.

Create a new Task, transition it to the required step.

 

Ref your reasons.

1. It does

2. Its does

3. Removed the condition to test

4. Correct transition

0 votes
Declan Gallagher February 12, 2018

If I use below, it works, but doesn't have the ability to add conditions.

So not fit for my needs, but it implements my requiremenst.

Thanks

https://coresoftlabs.atlassian.net/wiki/spaces/WPB/pages/9306230/Transition+this+issue

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events