How to set a condition in jira 4.3.4 workflow with simple conditions with groovy

Coskun June 6, 2013

Hello,
I searched atlassian-answer.

https://answers.atlassian.com/questions/157924/transition-a-story-with-some-subtasks-in-closed-status-and-then-others-in-open-status

But, I could not find what I want
I want that ; when some sub-task is resolved, transition proceed. if not.

I tried a lot of
- issue.subTaskObjects.findAll{it.issueTypeObject.name = "Customer Report"}.every{issue.resolutionObject}

- issue.subTaskObjects.findAll{it.issueTypeObject.name ="Customer Report"}.any{it.statusObject.name ="Resolved"}

like these...

These nor working correctly.

how can ı do this ?
thanks in advance.

2 answers

1 accepted

0 votes
Answer accepted
JamieA
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.
June 6, 2013

In both cases you should be using == not = .

Every and Any are diofferent as you can imagine.

In the 2nd closure in the first line you want "it", not issue. In the second line should be == (again).

If you get it a bit more correct then we can probably help further.

0 votes
Coskun June 8, 2013
Hello Jamie, thanks for your answer. It is working.It is ok. issue.subTaskObjects.findAll{it.issueTypeObject.name ="Customer Report"}.any{it.statusObject.name =="Resolved"} Well, I don't understand one point. at one side it.issueTypeObject.name ="Customer Report" (one equals operator) at other side any{it.statusObject.name =="Resolved"} (two equals operator) In normal, this would be a standard ? or Is there anything else ?

Suggest an answer

Log in or Sign up to answer