The OOTB template for Software projects allows an Epic to be closed even though there are Issues in the Epic that are not closed.
I want to prevent the closing of an Epic unless all of it's Issues are closed.
There is a "Sub-Task blocking condition" for the Done status has but that doesn't work for Epics.
Hi Diane,
Welcome!
You are correct, OOTB, no such condition is included.
But this is a popular use-case and while the problem can be resolved through business rules and training of the users, sometimes a firmer restriction is wanted.
There are a few possibilities with apps however:
Hope this helps!
- Tessa
Hi Tessa,
What would the coding in Scriptrunner be if I don't have the JMWE add-on available? Could you help me with this one? Requirement: "Close epic only possible when all stories and bugs related are closed". And I would add that coding than as a post-function "Script validator"?
Thank you for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Something like this may help :
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLink
import com.atlassian.jira.issue.link.IssueLinkManager
// Allow logging for debug and tracking purposes
import org.apache.log4j.Level
import org.apache.log4j.Logger
// Script code for easy log identification
String scriptCode = "Check all items resolved -"
// Setup the log and leave a message to show what we're doing
Logger logger = log
//logger.setLevel( Level.ERROR )
logger.setLevel( Level.ALL )
logger.debug( "$scriptCode Triggered by $issue.key" )
passesCondition = true
if (issue.issueType.name == 'Epic')
{
IssueLinkManager issueLinkManager = ComponentAccessor.issueLinkManager
def found = issueLinkManager.getOutwardLinks(issue.id).any{
it?.destinationObject?.getResolution() == null
}
if (found){
logger.debug( "GetResolution empty found" )
passesCondition = false
} else {
logger.debug( "GetResolution no empty found" )
passesCondition = true
}
}
// Always allow all other issue types to execute this transition
else
{
logger.debug( "$scriptCode Not Epic return true" )
passesCondition = true
}
I would add here also link type verification eg. check only "Issues in Epic", but not all linked issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I am looking for the same functionality in the Jira Cloud next-gen software project. Can anyone help? Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rather than investing money in the apps, build the logic.
Create an automation rule on which when all tasks inside epic move to Done or Closed then add the value to custom number field = 1, then add the workflow condition of number field value must be equal to 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the Jira Misc Workflow Extensions add-on. This will allow you to add a validator to the workflow transition, checking the status of Stories within an Epic.
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.
In the Software Basic project type there are no stories. There are Epics, New Features, Improvements, Bugs, Tasks and Sub-Tasks. No parent-child links at all except between Tasks and Sub-Tasks and sort of with Epics and all other issue types except sub-tasks. The team I'm setting this up for does not really want stories or features, they just want tasks and sub-tasks and would like a parent of Tasks in some way. I see with the Basic Software project I can sort of create a parent of Tasks through Epics. So will the validator work between Epics and its Issues of any type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes it should. You can link Tasks to Epics in the same way you would with Stories. Make sure the Task create/edit/view screens all have Epic Link as a field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how to check the stories in epic..
I'm seeing under validator called Linked Status (JSU).. But I'm not able to find the right option for the below collumn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Amarendar Musham if you have JSU, use a JQL Condition (rather than a validator), it achieves a similar goal but doesn't show the transition button or allow the drag on the Kanban view.
You need to configure a JQL statement that checks that all child issues are done, for example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nigel Budd (CV)Thank you very much for this easy solution using JSU - it worked perfectly for me with your instructions. You really helped me out here and saved me time!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a comparable solution for Jira Cloud and, more specifically, for the Jira Next-Gen projects?
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.
Rather than investing money in the apps, build the logic.
Create an automation rule on which when all tasks inside epic move to Done or Closed then add the value to custom number field = 1, then add the workflow condition of number field value must be equal to 1.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.