Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I'd like to create a quick filter to show open User Stories within closed Epics

Nigel Thurston-Smith April 7, 2022

As an alternative I could live with displaying closed Epics which contain open User Stories. 

The quick filter must work on a Kanban board.

Does anyone know if this can be done (and how) without resorting to 3rd party tooling please?

3 answers

1 vote
Ste Wright
Community Champion
April 7, 2022

Hi @Nigel Thurston-Smith 

Not natively using JQL - this would require sub-querying (i.e searching on multiple levels of the hierarchy in the same query), which is only available using Apps, such as Scriptrunner 

Native options include...

  • Set Epics as Swimlanes, so it's easy to see where an Epic is closed, whilst a child Issue is open.
  • Use Automation with additional custom fields, to set fields at the same level as the query - so you have something to filter the JQL against

 


Automation

To extend on this, for Closed Epics with open Stores - you could...

  • Create a custom checkbox field - Closed with open children - with one option, "Yes"
  • Leave the field off all Screens, and set its context to only be for Epics
  • Use Automation to populate the field with "Yes" if a closed Epic has open children, or remove the value if not
  • Use this in JQL - eg. issuetype = Epic and status = Done and "Closed with open children" = Yes

Or, to see open Stories with a Closed Epic - you could...

  • Create a custom checkbox field - Epic Parent Closed - with one option, "Yes"
  • Leave the field off all Screens, and set its context to all Story-level Issue Types
  • Use Automation to populate the field with "Yes" if the Issue's parent closes, or remove the value if it reopens
  • Use this in JQL - eg. issuetype = Story and status != Done and "Epic Parent Closed" = Yes

 


Let us know if you think any of these options might work for you! If you need more detailed instructions on how to do the Automation, we can help with this too :)

Ste

Nigel Thurston-Smith April 7, 2022

Thank you this is something I'll definitely look at in more detail - it might take me a while but your suggestions feel like they could work for me.

Like Ste Wright likes this
Ste Wright
Community Champion
April 7, 2022

No worries :)

Looking at some of other responses, I would consider...

 


One-time Need

If this is a one-time need, you could use CSV exports like @Bill Sheboy suggested - for example...

  • Export all Epics
  • Export all Stories, Tasks, etc
  • Use VLOOKUPs to bring the data into one Excel sheet, then do comparisons from there

^ The benefit here is it could be used for other checks - such as Stories with no Epic, etc

 


Conditions/Validators

Whilst I think this is worth considering - it's worth noting...

  • I don't think this is a native condition/validator - which means you might need a workflow App to meet this need
  • It's not a catch-all - for example, I could still add a new/open Story to a closed Epic
  • It's possible to workaround. You want to consider why it's happening, not just try to limit users, who might misunderstand the need.

I would suggest...

  • Look at the reason why Epics and Stories aren't aligning - retrospect with the teams to clarify if this is a process issue, or a tooling issue, etc - and try to respond to those needs
  • Use data hygiene reporting to be a learning opportunity for teams - highlight the benefit of accurate data for reporting, etc
    • You could make this reporting available in real-time in Confluence, or a dashboard, for future use?
  • Consider if Automation can assist with some needs here - for example...
    • Could an Epic be auto-closed if all Stories are closed? And reopened if a new Story is added?
    • Are there other examples of status misalignment to automate - for example, if one Story transitions from "To Do" > "In Progress", should an Epic follow?

 


Let us know your thoughts :)

Ste

Nigel Thurston-Smith April 8, 2022

Well you have given plenty to think about!  The exercise should be a one off - but given the possibility that people can create or move open User Stories to closed Epics it might be a process I need to follow weekly/monthly  depending on how easy it is to run the check.

 

I've started with Steve's suggestion of Epics in swimlanes and I'll see how I get on.  thank you all for your answers.

Like Ste Wright likes this
0 votes
Bill Sheboy
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.
April 7, 2022

Hi @Nigel Thurston-Smith 

Reading through your question and the community responses, I wondered if this was a one-time need for cleanup or an on-going need:

  • One-time need for cleanup: Perhaps run a single query to find all closed epics in the project. grab their keys to convert to a comma-separated values list, and then query a second time for any items which are not-done and which use one of those as an Epic Link: "Epic Link" IN (list of keys of done epics) AND statusCategory != Done
  • On-going need: Perhaps there is some process problem which is leading people to close epics early or to add new work to closed epics.  Rather than add tooling try investigation what is causing those actions to learn how to improve the results.

Kind regards,
Bill

0 votes
Dave Mathijs
Community Champion
April 7, 2022

Hi @Nigel Thurston-Smith , welcome to the Atlassian Community!

Why not prevent closing Epics with open User Stories via a condition or a validator in your workflow?

Please note that there's a difference between the actual status of the Epic, the statuscategory of the Epic (To Do, In Progress, Done) and the "Epic Status" in the Epics Panel of an agile board.

Nigel Thurston-Smith April 7, 2022

Thank you for your suggestion, unfortunately I've inherited the role of Scum master and found lots of loose ends - this being one of them.  So I'm trying to tidy up an existing set of Epics / User Stories some of which have been closed with little thought to the consequences.

I am aware of the difference between the statuscategory of the Epic (To Do, In Progress, Done) and the "Epic Status" in the Epics Panel of an agile board, but you are right to point this out too.

Dave Mathijs
Community Champion
April 7, 2022

Unfortunately, there is no out-of-the-box JQL to filter out those issues (to my knowledge).

You would need a third-party app to generate a JQL like:

issue IN issuesInEpics("statusCategory = Done") AND statusCategory != Done

 

Like Nigel Thurston-Smith likes this
Nigel Thurston-Smith April 7, 2022

Thank you for replying.  Much appreciated.

Suggest an answer

Log in or Sign up to answer