Transition issue to another status if validation failed

Nhac Tat Nguyen
Contributor
July 3, 2019

Hi community,

I'm writing a jira plugin to process with workflow.

The workflow looks like this: "Error" <-- "New" --> "In Progress"

Now, I want to validate something when I move ticket from "New" to "In Progress", if it valid so the transition will be passed, and issue will be moved to "In Progress". Otherwise, if the validation fail, I want to move issue from "New" to "Error".

What is solution for this case.

Thanks for your helping!

1 answer

0 votes
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2019

You might use REST API for that

https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-doTransition

and define a logic in your Jira plugin that would transition in specific direction..

You can also use a existing plugins from the marketplace .. there are couple of options and alternatives.. but if you are developing the plugin all depends what you are actually validating..

Nhac Tat Nguyen
Contributor
July 3, 2019

Hi @Mirek ,

I'm developing plugin.

The actually behavior is: When I start working on issue (In Progress), I will create a corresponding  issue in another JIRA system. The case is your issue can only be moved to "In Progress" if the corresponding issue created successful in external JIRA. If the creation failed, your issue have to be moved to "Error" (Instead of In Progress), because there is no corresponding issue.

So in a JIRA plugin in, can we do that?

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2019

Yes, definitively you can. There are existing plugins on the market that allow you to do that .. for example Script Runner or Power Scripts

https://confluence.cprime.io/display/SIL/Remote+systems

https://scriptrunner.adaptavist.com/4.3.18/jira/interacting-with-other-apps.html

By using them you create a script that would have all the logic and you should be able to design that you want to achieve.

Like Nhac Tat Nguyen likes this
Nhac Tat Nguyen
Contributor
July 3, 2019

Thanks for your kindly help. But I want to develop my own plugin.
At the moment, I cannot find any solution to implement my code.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events