2 answers

0 votes

You'll need to find or write some code that can do that.

I understood this in the search process. Where can I look for codes to at least understand the principle? search engine syntax and syntax used in a validator are the same or different?

I'm afraid I do not know what "search engine syntax and syntax used in a validator are the same or different?" means.

To prevent a transition, you should usually use a "condition".  In your case, the condition needs to be placed on the transitions for the parent type and the pseudo-code for such a condition is roughly:

  • Read the issue's list of links
  • If a link is of the "cloner" type
    • Look at the status of the linked issue
    • If you find it is not closed, return a "false" so the condition fails
  • When you get to the end of the loop and have found no linked open issues, return a "true" for the condition to pass

Note: I don't know how you are representing "cloner", so I have taken a complete guess at it being an issue link to another issue.

Before I try to expand that into any form of real code, does it make sense?  Have I got the right idea about what you're trying to do?

This is our workflow for parent issue


And this is postfunction for parent issue (transition from column 2 to 4 from the first picture)


That is how it looks on the board (on the 4th column it creates a cloner)


In this screenshot you can see how this clone looks in parent issue


And this is a clone


But without code condition I can't prevent transition of parent issue to the next step (5th column) if linked issue (cloner) isn't closed. You can see it below


Nic, have you some idea about that?)

Sorry, I can't make out what you have tried to do from those.  Only one of them is of the workflow and it looks like it is cloning the current issue correctly, but there's nothing about the conditions you need on the workflow.

I have two workflows for one project (different workflows for different issue types (parent and cloner)): one of them is for issues in parent process and the second one is for cloners. When parent issue is going to the step in the 4th column, it makes clone (issue with another workflow), but condition for parent issue transition to 5th column is that this clone must be in "closed" status (done) in it's workflow.

Ok.  So you need a condition on the source issue workflow that can execute the a coded version of the pseudo-code I gave earlier.  Are you using Script Runner for this, or something else?

Also, I've talked about "source" issue here because in JIRA-speak, "parent" suggests sub-tasks, not clones.

Yes, Nic, we are using Script Runner, JIRA ver.6.1.7. And thanks a lot for clarification about "source" issues! Hoping for you help! smile

Nic, do you have some idea for our case?) Can you tell me, where I can find more information about jql queries? examples may be

JQL has nothing to do with this.

Use JJUPIN. We have a similar recipe here; you need to modify it. See also Nic's answer.


In our case there isn't subtask, we use link issue (cloner)

It's a similar principle, except you look for links instead of subtasks.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

221 views 6 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you