How do I allow a transition 'to Resolved:Fixed' only if all the sub-tasks are closed/resolved?
Is it going to be a validator or a condition? Thanks.
This is a bit more easier. You can use the default "Subtask blocking condition".
Ok. Thank you! Maybe there is some kind of a 'Hello World' example, or a begginer'a guide where I can read basics of how to create JIRA's groovy scripts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I am just "far away" from Java programming. I was wondering if there should be any imports.. like "import com.atlassian.jira.issue.Issue".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you have to use imports!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for your answers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My post is a Java code, you make syntactical changes according to groovy. I'm not familiar with groovy scripting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Collection<Issue> subTaskList = subTaskManager.getSubTaskObjects(issue); InvalidInputException e=new InvalidInputException(); Resolution resolutionObj=issue.getResolutionObject(); if(resolutionObj != null && resolutionObj.getName().equals("Fixed")){ boolean anysubtaskNotclosed = false; for(Issue subTaskObj : subTaskList){ Status subStatus = subTaskObj.getStatusObject(); if(subStatus.getName().equals("Closed")==false && subStatus.getName().equals("Resolved")==false){ anysubtaskNotclosed = true; break; } } if(anysubtaskNotclosed){ e.addError("resolution ", "*All subtasks must be closed before resolving the issue to fixed"); throw e; } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try with the code in workflow validator and it might solve your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you want to allow to resolve issue once all subtasks are closed/resolved then use the condition
check this
if you want allow only fixed as resolution when all subtasks are closed then use validator!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.