Forums

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

Time between deadline and start date

Douglas Oliveira
Contributor
September 2, 2021

Good afternoon. 

how do I always leave the deadline at a certain number of days from the start date?
I'm using {{startDate.plusDay(2)}} but it's not working. 

1 answer

0 votes
Trudy Claspill
Community Champion
September 2, 2021

Can you provide more information?

Is this part of an Automation rule? If so, can you show us the rule? And what information is provided in the Audit Log for the rule?

Douglas Oliveira
Contributor
September 2, 2021

image.png

hi @Trudy Claspill is the rule wich i used

Trudy Claspill
Community Champion
September 2, 2021

It appears that your rule is intended to modify the Start Date and Due Date on sub-tasks when the Start Date on a parent task is changed. Is that correct?

How is your rule not working? Is Due Date not getting changed at all, or is it getting changed to an unexpected value?

The Due Date field is being set based on the value of the Start Date field in the subtask. What code are you using to se the subtask Start Date field? Is that working?

What does the Audit Log for this rule say when the rule is executed?

Douglas Oliveira
Contributor
September 2, 2021

It appears that your rule is intended to modify the Start Date and Due Date on sub-tasks when the Start Date on a parent task is changed. Is that correct?

- Correct.

How is your rule not working? Is Due Date not getting changed at all, or is it getting changed to an unexpected value?

- Not work, the Due Date not getting changed.

The Due Date field is being set based on the value of the Start Date field in the subtask. What code are you using to se the subtask Start Date field? Is that working?

- The same of parent issue, it's work.

What does the Audit Log for this rule say when the rule is executed?

- The audit log presents "sucess", don't detect bugs.

Trudy Claspill
Community Champion
September 2, 2021

Please consider using the Log action to write values into the audit log for

1. The subtask Start Date, immediately after the action where you change that value

2. The value result of the calculation you are using to set the Due Date field, before the action where you set that field.

3. The value of the Due Date field after the action where you try to set it.

https://support.atlassian.com/jira-software-cloud/docs/debug-a-rule/

And post the results of those Log actions. That will help with debugging the rule.

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.
September 2, 2021

Hi @Douglas Oliveira 

Adding to what Trudy suggests:

I note in your screen image you have {{startDate.plusDay(2)}}

However the function name is actually plusDays()  

Please update that to learn if it helps.  Thanks!

Best regards,
Bill

Douglas Oliveira
Contributor
September 3, 2021

image.png

The log audit... 

Douglas Oliveira
Contributor
September 3, 2021

hi @Bill Sheboy 

Thanks, 

I fixed it but the problem persists

Douglas Oliveira
Contributor
September 3, 2021

I found out where the error is, it's in the function I'm using, I used the {{now}} function and it's working fine, could anyone tell me which function I should use for the expiration date to be 2 days after the start date?

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.
September 3, 2021

Douglas, have you tried the edit issue action, changing your field to be:

{{issue.Start date.plusDays(2)}}

Douglas Oliveira
Contributor
September 6, 2021

Hello @Bill Sheboy , I tried but not happened again.

Suggest an answer

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

Atlassian Community Events