2 answers

0 vote

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

1.png

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

3.png

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

5.png

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

6.png

And this is a clone

9.png

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

33.png

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.

https://confluence.kepler-rominfo.com/display/TR/Block+%60Close%60+Transition+Until+All+Subtasks+are+Closed

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 Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,181 views 6 19
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot