Forums

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

Adjust custom date field based on custom numeric field?

Bud Herz
Contributor
June 2, 2025

Illustrious and knowledgeable community, I have this question:

Pre Reqs:
Custom date field called QA Start Date 

Custom numeric field called ST Review time est

When Sprint starts, automation looks at sprint end date and back dates the QA Start Date field based on number entered in the ST Review time est field.

Question:
What is the best way to accomplish this? 



Reason:
QA needs to establish transparently how much time we estimate is needed for the ST review to ensure Scrum Master is pushing the Devs to deliver in time for QA to finish within the sprint.

2 answers

1 accepted

0 votes
Answer accepted
Bud Herz
Contributor
June 4, 2025

Everyone was very helpful. I'm thankful for that. Our project runs two sprints and we could not solve it pulling a date from some previous sprint as an end date. 

If we execute the process during Sprint Planning it's accurate enough for what we want to do. 

I solved this by moving the calculation to be based on 'now' + number of days
Example: {{now().plusDays(2)}}

So it branches for each calculation between 1 and 9. 


Trigger  = ST Review time

Add certain number of days to current date

set the resolved date to field Qa Start Date

 

Example:

Date is 6/4/2025

ST Review time est = 3

Calculate {{now().plusDays(7)}}

result: QA Start Date = 6/11/2025




0 votes
arielei
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 2, 2025

Hey @Bud Herz 

Please explain your condition:

Trigger  = Sprint Starts

Look for the sprint end date

add the ST Review time est to the value.

set the resolved date to field Qa Start Date

 

Example:

sprint end date : 15/06/2025

ST Review time est = 3

result: Qa Start Date = 18/06/2025

 

Is this what you need?

Ariel.

 

 

Bud Herz
Contributor
June 2, 2025

@arielei  - yes that is what I am looking to solve. I suppose to be completely clear it would be like this? --


Trigger  = Sprint Starts

Look for the sprint end date

subtract the ST Review time est from the value.

set the resolved date to field Qa Start Date

 

Example:

sprint end date : 15/06/2025

ST Review time est = 3

result: Qa Start Date = 12/06/2025





arielei
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 2, 2025

Hey @Bud Herz 

So build to following automation, from global automation:

Trigger: Sprints Starts

Branch on: For Each: issues in the sprint

Edit work-item:

field = Qa Start Date

Value = {{sprint.endDate.minusDays(issue.customfield_10287)}}

** Replace the "10287" with your custom field number.

 

you can also add logs if you want to view the runs.

Screenshot 2025-06-02 at 18.40.02.pngScreenshot 2025-06-02 at 18.40.24.png

 

Bud Herz
Contributor
June 2, 2025

@arielei  YESSSS this works! I had been chasing it with 
{{CreatedSprint.endDate.minusDays(issue.customfield_12345)}}

Could you help me fine tune this for a current sprint? 
-- I just tested it on some samples and found the tickets that rolled over and include previous completed sprints will subtract from the previous sprint end date, not the current sprint. 

Much appreciated to get us this far though. Thank you.

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 2, 2025

Hi @Bud Herz 

One problem with the suggested rule is inside of the branch, {{sprint}} actually refers to {{issue.sprint}} which is a list of values...as you note for work items that have been in multiple sprints.

The solution is to do one of these:

  • capture {{sprint.endDate}} in a created variable before the branch, perhaps named varEndDate, and then use that variable in the expression as {{varEndDate.toDate.minusDays(issue.customfield_12345)}} ...assuming your custom field is an integer value
  • use smart value, list filtering to only use the needed sprint in {{issue.sprint}} where the state equals "active", and perform the math on that specific endDate

 

Kind regards,
Bill

arielei
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 2, 2025

Hey @Bud Herz 

Easy :-)

First, Copy the automation you have made.

 

Replace the trigger to "Scheduled" (do-not set any JQL in it!)
New branch : based on JQL: Sprint = "Sprint Name"

and keep all actions as in the original automation.

 

after run - disable it so it wont run on the schedule date :-)

Screenshot 2025-06-02 at 19.51.30.png

Bud Herz
Contributor
June 2, 2025

Thanks for the input @Bill Sheboy 

Bud Herz
Contributor
June 2, 2025

Thanks @arielei I will try all of this out.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events