Automation: DueDate not populating upon create (calculated from created)

Kathleen Buckwalter April 18, 2023

I am trying to create a rule to set the due date of critical bug issue types upon creation to two days after the field "created." I have also used "now" in lieu of "created." No matter what, the created issues' due dates remain empty.

I have selected

  • When: Issue Created
  • Conditions
    • Issue Type equals Bug
    • Severity equals Critical
  • Then: Edit issue fields
    • Due date

I have used

  • {{issue.created.plusBusinessDays(2)}}
  • {{triggerissue.created.plusBusinessDays(2)}}
  • {{now.plusBusinessDays(2)}}

 

I set it

I publish it

I create a bug with severity of critical...I click create. I open the bug...due date is empty.

 

Can someone let me know what I am doing incorrectly?

Screenshot 2023-04-18 at 2.27.05 PM.pngScreenshot 2023-04-18 at 2.27.30 PM.png

3 answers

1 accepted

0 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.
April 19, 2023

Hi @Kathleen Buckwalter 

I just replicated your results, and suggest you submit a defect to Atlassian Support.  It appears the Due Date cannot currently be set from the Issue Edit using the field selection.

If you instead use the advanced edit with JSON, this work-around will work:

{

"fields": {
"duedate": "{{issue.created.plusBusinessDays(2)}}"
}
}

 

Kind regards,
Bill

Kathleen Buckwalter April 19, 2023

Thank you, Bill. 

Like Bill Sheboy likes this
0 votes
Nadine Dauberman October 11, 2023

@Kathleen Buckwalter did this ever get reported to support? I'm having the same issue with the field. 

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2023

Hello @Kathleen Buckwalter 

What information is being written into the Audit Log for the rule when it executes? Notice below the rule name and "Rule Details" it says "Audit Log". Find the last entry where the rule ran and click on the Show More link to the right of that entry. Share with us the details.

Kathleen Buckwalter April 18, 2023

Great idea! Thank you.

It says it was successful, but the due date still says "None"

Screenshot 2023-04-18 at 3.29.59 PM.pngScreenshot 2023-04-18 at 3.33.08 PM.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2023

Thank you for that additional information.

Are you working with issues in a Company Managed project or a Team Managed project?

Are you able to manually set the Due date field through the UI?

Can you add a Log action to write to the Audit Log the smart value you are trying to assign to the Due date field?

Screen Shot 2023-04-18 at 12.43.03 PM.png

 

Then try creating another Critical Bug and check the audit log to see what was printed.

Kathleen Buckwalter April 19, 2023

Thank YOU for helping! 

 

This is a Company-managed project. I can set the date through the UI. 

The log automation was a great idea, Thank you! It was successful in calculating two days out. What else can we rule out? It couldn't be a date format issue, right? Screenshot 2023-04-19 at 8.35.42 AM.png

Kathleen Buckwalter April 19, 2023

It is showing in the email as well. Still not on the issue or the calendar widget. Screenshot 2023-04-19 at 9.49.00 AM.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

I suspect that you may have more than one field named Due date.

Are you a Jira Administrator? If so go to the Custom Fields screen and search for Due date. If there is more than one field with that name, than probably the wrong one has been added to the screen for your project.

If you are not a Jira Administrator then you'll need to work with that person to investigate this.

Kathleen Buckwalter April 19, 2023

Another great suggestion. We do not have a custom field for due date or due anything. This is a tricky one. Screenshot 2023-04-19 at 11.27.14 AM.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

@Bill Sheboy @Kathleen Buckwalter 

I tried this in a Company Managed project and it worked for me.

Screen Shot 2023-04-19 at 10.44.23 AM.png

Screen Shot 2023-04-19 at 10.42.29 AM.png

 

Do you have the Due Date field on the screen you use for the Edit Operation for the type of issue you created?

 

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.
April 19, 2023

Hi @Trudy Claspill -- I did have it on the view when I tried it in the rule with the direct field edit...it set the Due Date field to null after the edit, so I suspected there was something in the smart value, expression parsing.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events