Query 'issueFunction in addedAfterSprintStart' and 'issueFunction in removedAfterSprintStart'

E March 10, 2021

Hi all,

I want to create a query where I can see all items added and removed from current sprint (scope changes).

When using separate boards with added after sprint and removed after sprint I do get the correct result but when I try to combine these 2 issue functions (added and removed) then I don't get the complete list.  This is how I used this in SQL:

(issueFunction in addedAfterSprintStart( "board1", "sprint1")) and (issueFunction in removedAfterSprintStart("board1", "sprint1"))

What am I doing wrong here?

Thank you in advance.

Best regards,

Elke

3 answers

1 accepted

2 votes
Answer accepted
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.
March 10, 2021

Hi @E 

You are checking for things added to the sprint AND removed from it.  If you change your AND to an OR it should work as you expect.

Best regards,

Bill

E March 16, 2021

off course, how simple it can be :-)  Thank you for your reply.

Like Bill Sheboy likes this
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.
March 16, 2021

I am glad that helped.

Also please consider liberal usage of parentheses when needed for your JQL expressions that include OR clauses.  It seems JQL sometimes has a different understanding of Boolean algebra / order of precedence than most learn in school.  ;^)

0 votes
Ahlem MASTOURI January 9, 2024

@Robin Surland Are you sure this is working in Jira Cloud ?

0 votes
Adan Ruiz June 7, 2023

Hi @Bill Sheboy good day! I saw the recommendation you gave for the following function and it works pretty well, thanks a lot,

 (issueFunction in addedAfterSprintStart( "board1", "sprint1")) OR (issueFunction in removedAfterSprintStart("board1", "sprint1"))

 

Quick question, is there any way we can list multiple sprints in the function? so for instance instead of doing this way: calling 2 sprints:

issueFunction in removedAfterSprintStart("Board Name", "Sprint Name") OR issueFunction in removedAfterSprintStart("Board Name", "Sprint Name")

 

Is there a way to list multi sprints:   issueFunction in removedAfterSprintStart("Board Name", Sprint in ("Sprint Name1", "Sprint Name 2", "Sprint Name ...")

 

Im working with smart filters so when I select one specific sprint, I'd like to call in just that specific sprint.

 

Thanks for your advise!

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.
June 9, 2023

Hi @Adan Ruiz -- Welcome to the Atlassian Community!

I do not believe I suggested those functions...I am using Jira Cloud and not using ScriptRunner.  You may want to check the documentation or contact for ScriptRunner to learn if that is possible.  My reading of the info seems to indicate that is not possible: https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-functions

Kind regards,
Bill

Like Adan Ruiz likes this
Adan Ruiz June 10, 2023

Thanks for the link, it is a good reading :) 

Robin Surland November 7, 2023

The evergreen query in Jira Cloud if you have ScriptRunner is issueFunction in addedAfterSprintStart(BoardName) and (sprint in OpenSprints()). 

Like Filipe Fontes likes this
Isabella Musial November 14, 2023

@Bill Sheboy Curious as to if there is a way to use Added / Removed in a general sense. I would love to add this to Rich Filters custom values so that it looks at all the sprints in a Board. 

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.
November 14, 2023

Hi @Isabella Musial 

I do not know that answer.  You may want to try posting a new question, and perhaps link back to this one if needed.  Otherwise only the people following this old thread will see it to offer suggestions.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer