Forums

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

A4J: JQL Condition does not support "addedAfterSprintStart" / "removedAfterSprintStart"

Phil McArdle May 22, 2024

Hi friends,

I'm trying to use the JQL Condition feature of Automation for Jira to run some queries using ScriptRunner JQL Functions, and I can use the following JQL successfully:

issueFunction IN incompleteInSprint("[Board Name]", [Sprint Name])

 But not..

issueFunction IN addedAfterSprintStart("[Board Name]", [Sprint Name])

I have validated that the issue in question responds correctly to this JQL outside of A4J, but, when run the same JQL within A4J's JQL Condition the condition fails.

Does anyone know why this would be?

Many thanks!

1 answer

0 votes
Kalyan Sattaluri
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.
May 22, 2024

Hello @Phil McArdle 

I just checked and below syntax works for me in data center's Automation:

issueFunction in addedAfterSprintStart("NEXTGEN", "KPMS 2021-S40;2")

where NEXTGEN = board name and KPMS*** = Sprint Name.

To troubleshoot, Please make sure that this board's (NEXTGEN in my case) filter query has the Project where you are authoring the automation rule.

In other words, when you run this query outside of automation, the issues you see, should be of the same project where you are authoring the automation rule.

If they are in a different project than where you are authoring the rule, you need to expand your scope. Which, depending on your firm/admin rules, maybe or may not be possible.

Hope it helps. Thanks!

Phil McArdle May 22, 2024

Hi Kalyan,

I'm authoring the automation role as a global rule because it spans multiple projects, and the agile board I'm referencing has the same projects in its filter.

Kalyan Sattaluri
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.
May 22, 2024

Have you tried to just give board name:

issueFunction in addedAfterSprintStart("NEXTGEN")

Cause If its a custom board created just for this information and sprint was not created for this board, then unfortunately providing Sprint argument may not work...

Below is the blurb from Scriptrunner's site:

If a board and sprint are used, but the sprint was not created from that particular board,then the function will not show any results. The sprint needs to have been created from the board used in the function. This is a limitation on the information we receive from Jira when an issue is moved into a sprint after the sprint has started.

Phil McArdle May 23, 2024

Hi Kalyan,

Thanks so much for continuing to engage on this question - per my original post, I am using the board name & sprint name in the function (I've just had to redact them for my question).

Further, the sprints in question were created from this board.

As per the original question, the JQL works fine anywhere except the JQL Condition feature of Automation for Jira.

Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.4
TAGS
AUG Leaders

Atlassian Community Events