How to prevent transition of parent issue if cloner isn't closed?

Arman Kurmanay May 19, 2016

2 answers

0 votes
Radu Dumitriu
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.
May 20, 2016

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

Arman Kurmanay May 20, 2016

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2016

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

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2016

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

Arman Kurmanay May 19, 2016

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2016

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?

Arman Kurmanay May 20, 2016

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

Arman Kurmanay May 22, 2016

Nic, have you some idea about that?)

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2016

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.

Arman Kurmanay May 23, 2016

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2016

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.

Arman Kurmanay May 23, 2016

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

Arman Kurmanay May 24, 2016

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2016

JQL has nothing to do with this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events