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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Can i check the status of previous post function Edited

Hi,

While using multiple post functions on a transition using JMWE in Jira Server, is there way to check if the previous post function was successful. 

I have created multiple issues on a transition. In the next post function, I would like to display a message that new issues were created after checking if they actually were created. I cannot use the issue links because there could have already been linked issues before the new ones were created.

Please advise.

@David Fischer _Innovalog_ @Radhika Vijji _Innovalog_ 

3 answers

0 votes

It depends on how the previous function records its success (if it does - most do not)

Assuming the function does just create some sub-tasks and nothing more, then the next post function would need to repeat the logic of the previous function to see what it should have done, and run searches or checks to see if it has.

0 votes

Well, it depends on what you mean by "successful". You could configure the Create Issues post-function to stop the transition in case of an error during its execution (the last option on the configuration screen).

But if you want the transition to continue when an error occurs, then you can check if at least one issue was created, using the transientVars.newIssue variable which will contain the last issue created by the post-function.

But ideally you should use Conditional Execution on the Create/Clone Issues post-function to make sure it will be successful, and skip its execution if you know it'll fail.

0 votes

You can also keep a list of all the issues that were correctly created, using the Post-creation script option. Use that script:

if (!transientVars.newIssueKeys)
transientVars.newIssueKeys = []
transientVars.newIssueKeys += newIssue.key

Then in subsequent post-functions on the transition, you'll be able to access the list of issue keys of the issues that were successfully created through the transientVars.newIssueKeys that will hold an array of issues keys.

Suggest an answer

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

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

444 views 5 16
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