Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to set Epic ranking and have all Stories within the Epics rank by different teams

Our Jira set up uses:

Defined Releases (timebound)

Epics set to a release to define the larger project

Stories within the Epic to parse out the work to various Component teams

 

Our challenge is that we want to designate a global ranking for Epics within a Release and then have all of their child stories be organized on all of the various teams' boards in the order of the Epic global ranking.  Our biggest challenge is that teams are working on the same projects but in different order...we need all teams working on items in the same order (rank).

 

Any suggestions would be fabulous.  I'm not a jire expert and inherrited managing our releases in Jira.  I don't know how to direct our organization on how to work from a global ranking order that will trickle down to all teams' boards as they are planning Stories for specific sprints.

1 answer

0 votes

By default, the standard rank field is a global field.  If you're using it as intended, then the only thing you need to do here is educate your users that it is global so that they don't mess it up.

If a previous admin has added other ranking fields, you probably want to unpick that, going back to a single one.

Thanks so much for responding however I'm unclear how to control the ranking so it is properly set. 

I have a board for 'all issues' in our organization where I created sprints, start and stop sprints, and view reports at the release level.  How would I set the ranking (assuming I use the default ranking field) to appear in order?  I want to set the ranking at the Epic level and then have all Stories under those Epics fall in line with the Epic ranking?

Do I need to move the Epics around on a Board to arrange them in a certain order?  If so, what prevents teams from moving those Epic's Stories around on their own Boards?

thanks,

janelle

This post is a tad old, but I'm similarly looking for a way of ordering task rank by the parent epic rank. So when I re-rank an Epic, all the tasks/stories in that epic also get re-ranked... Janelle/Nic, do you have ideas?

Like Rafal Mikolajczak likes this

For those that find this of interest, in the end I created a script that using the REST API goes through the backlog and reorders the stories based on their Epic rank. We run the script just after the backlog epics have been checked and ordered. Then allow people to tactically re-rank issues as required. Thus we're only programmatically reordering the list once a fortnight roughly, but gives a good starting place for each issue rank.

@Bill Sim can you share the script?

Sorry that sucked. The formatting didn't work. I'll attach a file if I can.

Note you could ditch the security check stuff. 

It depends on Python Jira.

# -*- coding: utf-8 -*-
"""
Created on Thu Aug 29 13:15:13 2019

@author: bill.sim
"""
# system imports:
import sys
# 3rd party imports:
from jira import JIRA
from jira.exceptions import JIRAError
# (see https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK for details).
# https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/
# https://jira.readthedocs.io/en/master/examples.html
# https://jira.readthedocs.io/en/master/
# local imports:

# Start session ###############################################################
server = "https://<your-server-name>"
try:
    jira = JIRA({"server": server})                          # this uses _netrc file for creds
    # jira = JIRA(options={'server': server}, basic_auth=("user.name", "***************"))
except JIRAError as err:
    if err.status_code == 401 or err.status_code == 403:
        print(err.response)
        msg = "\nLogin to Jira failed. Check your username and password, or check the _netrc setup.\n"
    else:
        print("Login problems - Status code: " + str(err.status_code))
    sys.exit("Exiting due to Jira login problems.")
else:
    """Check permissions of current user"""
    current_user = jira.current_user()
    security_group = 'jira-internal-rankor-user'
    print("Checking '" +
           current_user + 
           "' is member of Rankor Jira security group '" +
           security_group +
           "'. Do they have permission to take the Rankor for a run...")
    allowed_group = jira.groups(security_group)
    if allowed_group:                                                          # If our search for group was ok
        members = jira.group_members(allowed_group)
        allowed_names = [members[member]['name'] for member in members]
        if current_user in allowed_names:
            print("{0} is good to go...".format(current_user))
        else:
            print("{0} is not in security group '{1}'; exiting...".format(current_user, security_group))
            exit()
    else:
        print("Group not found...")
        exit()
#print(allowed_names)
"""
Get list of Epics by rank 
for each i,epic in that enumerate(list):
    get issues in (backlog, parked, open) AND in that Epic order by rank
    top_issue = get issues in epics but not in Epic[0]:Epic[i]
    for each epic-issue in this Epic[i]:
        jira.rank(epic_issue,top_issue)
"""
# PICK AN AND-able PROJECT/board/filter
team_filters = {
        'RND': 'filter="All RnD Work for RnD Boards"',
        'EDG': 'filter="Filter for EDG"',
        'PES': 'filter="Filter for Process Engineering Support"',
        'CAD': 'filter="Filter for CAD Team"',
        'PLT': "project = PLT",
    }

jira_filter = team_filters['RND']

# Get list of Epics ordered by rank
epics_by_rank = jira.search_issues(
    (
         jira_filter +
        " AND issuetype in(Epic) AND Resolution IS EMPTY" + 
        " AND 'Epic Status' != DONE ORDER BY RANK ASC"
    ), 
    maxResults=1000, 
    fields="summary"
)                                                                              # ASSumption there's less than 1000 Epics

if epics_by_rank:                                                              # if we found any epics with that filter
    print("Epics by rank ascending:")
    for i, eachepic in enumerate(epics_by_rank, 1):                            # the 1 means start counting at 1 (still includes 0)
        print(str(i) + "\t" + eachepic.key + "\t" + eachepic.fields.summary)   # show which index and epic we're on
        # Get the issues in the Epic
        issues_in_epic = jira.search_issues (
                (
                    jira_filter +
                    " AND 'Epic Link'=" + eachepic.key + 
                    " AND Status in(Parked, Backlog, Open) ORDER BY RANK ASC"
                ), 
                maxResults=500, 
                fields="summary"
            )                                                                  # assuming less than 500 issues in any one Epic
        # Find the top issue to rank against. Only look at issues in Epics.
        # Only look at issues in Epics we haven't already ranked.
        # Only look at unresolved issues not started
        # Only get one issue (top ranked one)
        # turn the keys in the list into a single string using join
        top_issue = jira.search_issues (
                (
                    jira_filter + 
                    " AND 'Epic Link' IS NOT EMPTY AND" + 
                    " 'Epic Link' NOT IN(" + 
                    ', '.join(
                            [thisepic.key for thisepic in epics_by_rank[0:i]]
                    ) + 
                    ")" + 
                    " AND Status IN(Parked, Backlog, Open) ORDER BY RANK ASC"
                ), 
                maxResults=1, 
                fields="summary"
            )
        # check taht we're not at the end of the list, where we'd find nothing
        if top_issue:
            top_issue = top_issue[0]                                           #  turn list of 1 item into single object
            print("\t\tTop issue on this spin round the loop is: {0}\t{1}".format(top_issue.key, top_issue.fields.summary))
            # go through each issue in the Epic and re-rank it one at a time
            for eachissue in issues_in_epic:
                print("\t\t\t" + eachissue.key + "\t" + eachissue.fields.summary)
                jira.rank(eachissue.key,top_issue.key)
else:
    print("Nothing found")

Ah, that's better.

I make no claim this is perfect, well coded, nor even fully functional. It appears to work as intended on our system. I hope it helps. If if you find a better way, I'd love to know about it.

In our task management process, we only run the script once after the Epics are ranked/organised in a team meeting. Then people are free to reorder the issues to suit tactical requirements between each Epic gooming meeting times. So for us that's about once every two weeks. It takes less than a minute to run on our system, but we only have 10k issues in the system, and you'll see from the script the ordering is done on a single filter.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,528 views 22 32
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you