Hi!
I am trying to allow the closure of a Story, based only if its sub-tasks met some conditions around the following fields: Priority, Severity and Status.
For the latter, there is already documentation, but I can't find anything about other fields belonging to the sub-tasks.
I appreciate all help!
As far as I know, there is no bundled such condition/validator.
If you know how to write a plugin, just add a validator that checks priority, severity, vice versa as below
@Override
public void validate(Map transientVars, Map args, PropertySet ps) throws InvalidInputException, com.opensymphony.workflow.WorkflowException {
Issue issue = (Issue) transientVars.get("issue");
Collection<Issue> subtasks = issue.getSubTaskObjects();
boolean allHigher = subtasks.parallelStream().allMatch(subtask -> subtask.getPriority().getName().equals("Higher"));
if (!allHigher) {
throw new InvalidInputException("All subtasks should be Higher to proceed this transition");
}
}
You can extend the code to match any, none ...
Hope it helps
Excelent Tuncay! I will try this ASAP and let you know.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do it by implementing your own plugin. You can write condition or validator to allow the transition.
Are you looking for a solution that is already bundled with Jira or marketplace addons?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Tuncay!
I would like a) bundled in Jira b) Own plugin c) Addon.
Probable b) doesn't exist, right?
Thanks
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.