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

Extracting all the initiatives, where the stories have not been updated/edited for the past 5 days

Khayyam Shaukat Syed October 15, 2021

I am trying to create a list of all the all the inititative where the stories have not updated. 

Therefore i wrote JQL below to limit my search to the stories only that i am interested / were not updated in the last 5 days.

updated < startOfDay(-5) AND resolution = unresolved AND issuetype not in (Sub-task,Epic)

The JQL above gives the intended results & it works fine. However,

Now when i try to access all the parents of the stories given by the JQL mentioned above, it does not return a singly value. See Below :

issuefunction in portfolioparentsof(" updated < startOfDay(-5) AND resolution = unresolved AND issuetype not in (Sub-task,Epic)") & issuetype = Initiative.

 

Can you please advise what am i doing wrong that the result are not reflected at all. Also please correct me if there is a better way to access this info

1 answer

0 votes
Radek Dostál
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.
October 15, 2021

This seems to return initiatives for me. At first I thought the ampersand (&) is the problem but no it returns the same results with AND as well.

 

  • Are both Portfolio and ScriptRunner licensed?
  • Can you check the customfield_id of your Parent Link from
https://yourjira.com/rest/api/2/field

Searching for 'Parent Link' you should find a json object like so

{"id":"customfield_14336","name":"Parent Link","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[14336]","Parent Link"],"schema":{"type":"any","custom":"com.atlassian.jpo:jpo-custom-field-parent","customId":14336}}

Please include that object in a comment.

 

  • Are the stories using 'Parent Link' to be connected with Initiatives,

Can you pick one story from the results, and run this

https://yourjira.com/rest/api/2/issue/<ISSUE-KEY>?fields=updated,resolution,issuetype,customfield_14336

where the customfield_id is that of your parent link id

 

 

edit1: Also the JQL you pasted I assume was copied, yet it contains a dot in the end - could that not be it? Although it should give you a JQL search error "this issuetype doesn't exist" if that were the case.

edit2: Are those stories linked to Initiatives directly or are they linked to an Epic? If so, the portfolioParentsOf should only get the Epic, but since your jql states you only want Initiatives => 0 results; something worthwhile to check, probably this is the case

 

Maybe we can spot something weird in your json's perhaps, seems to work for me locally at least.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events