Forums

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

Jira filter that shows epics without tasks in sprints

Ali Jacobsen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 17, 2023

I am using Jira cloud and need a Jira filter that shows me any epics (this is the parent issue) that are "in progress" but do not have any task, story or bugs (these are the children issues) in the current sprint or future sprints.

 

I have already tried the following filter:

issuetype = Epic AND status = "In Progress" AND project IN ("Project Names Here") AND "Epic Link" is EMPTY AND issueFunction not in hasLinkType("blocks") AND issueFunction not in linkedIssuesOf("issuetype in (Task, Story, Bug) AND Sprint in openSprints()") AND issueFunction not in linkedIssuesOf("issuetype in (Task, Story, Bug) AND Sprint in futureSprints()")

I am getting a return of "no results found". I know this is not correct as I added in a test epic that fulfills this criteria.

Thanks for the help!  

2 answers

1 accepted

0 votes
Answer accepted
James Gootee
November 15, 2018

The risky, convoluted hack I mentioned in my reply:

...

for issue in issuesToUpdate:
    try:
        reporter = issue.fields.reporter.name
    except TypeError:
        try:
            #specific structure hack - this will need to be watched I'm sure.
            rawIssue = issue.raw['fields']['reporter']
            reporterList = rawIssue.items()
            logger.debug('Reporter: %s', reporterList[1][1])
            reporter = reporterList[1][1]
        except:
            reporter = ''
        if reporter is '':
            comment = ''
        else:
            comment = '[~' + reporter + '] '
    comment += 'No due date was assigned so I set it to '

...

0 votes
Andy Heinzer
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 Champions.
November 13, 2018

I saw another user that had a similar error in regards to using python and Jira Cloud recently.  Please see https://community.atlassian.com/t5/Jira-questions/jira-python-Getting-error-on-assignee-gt-TypeError-Resource/qaq-p/930839

Initially I thought this would have something to do with the recent changes Atlassian is making in regards to user objects in the REST API because of GDPR.  But the user in that thread did indicate that in their case their problem was resolved by updating the python package.   I realize theses are not exactly the same error, but both are dealing directly with user objects in Jira Cloud via REST API python calls.  So I hope this helps.

James Gootee
November 15, 2018

Yeah, after looking over https://developer.atlassian.com/cloud/jira/platform/api-changes-for-user-privacy-announcement/?_ga=2.98850909.237961322.1542300824-312546730.1538767719 that you mentioned in that response, this is probably the reason these are failing.

"name" - Removed following the deprecation period

Sounds pretty related.

Since the payload coming back at this time does have the data I need, I've added a really convoluted and risky hack for the time being that looks something like:

I'm rather reluctant to pursue upgrading the Jira package component we use at this time for 2 reasons:

1) This is the only script out of quite a few that use this particular field and currently none of the other scripts fail at retrieving any data needed for their actions. I don't want to open a can or worms at this time if its not necessary, and I worry upgrading might break some other scripts in other unforeseen ways!

2) I don't actually have direct control over the server and the Python configuration where these scripts run, and attempting to get the parties involved that would be needed is another can I'd like to keep closed if at all possible.

I will however keep this in mind, as it definitely does seem like it is directly related to those changes. And if there comes a time that the only resolution that can be reached is by upgrading our package, I'll have to pursue it then.

James Gootee
November 15, 2018

Sorry, the "hack" I refer to I added as a separate answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events