Forums

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

Smart value for due dates and custom field date

Alexis Gutierrez January 25, 2023

Hi everyone, 

I'll looking for a smart value to auto create a due date 2 weeks from the date scheduled. Due Date is the system date but the Date scheduled is a custom field. For example, my team schedules a date with a customer. I have a rule that moves the task to pending deployment lane when the date scheduled value has been created. I would like to have the due date be auto created to show 2 weeks from the scheduled date. 

Please let me know if that is possible.

Thank you,

Alex

1 answer

0 votes
Trudy Claspill
Community Champion
January 25, 2023

Hello @Alexis Gutierrez 

Yes, that is possible.

You would use the Edit Issue action in your rule to set the Due Date field.

This page provides details about smart value functions you can use with date fields

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

Look for the section describing

{{[date].plus[Unit]([number])}}

You would replace [date] with your custom field; i.e. issue.Date Scheduled, and replace [Unit] and [number] with appropriate values for your calculation.

Alexis Gutierrez January 25, 2023

Hi Trudy,

I tried this: {{issue.DateSchedule.plusDays(14)}}

It's not giving me creating the date but its also not showing that there is an error. In the log it's not showing there is an issue with the smart value.

image.png

Trudy Claspill
Community Champion
January 25, 2023

Hello Alexis,

What is the name of the source field? Is it Date Scheduled (with a space) or DateScheduled (without a space)?

If you have not correctly identified the source field, the automation will not produce an error in this scenario.

To make sure you have identified the field correctly, you can also try adding a Log action to print out the value of the field to the rule's Audit Log.

Alexis Gutierrez January 25, 2023

I have updated it to show the space but still the Due Date is not being populated. 

Trudy Claspill
Community Champion
January 25, 2023

What type of field is Date Scheduled?

What is printed to the Audit Log when you add a Log action to log the value of the Date Scheduled field?

Alexis Gutierrez January 25, 2023

I'm not sure what you mean by add a log action, that only shows the time it takes for the rule to work correct? Date Scheduled is a custom date field.

Trudy Claspill
Community Champion
January 25, 2023

Log is an Action that you can add to your rule.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action

Screen Shot 2023-01-25 at 11.42.53 AM.png

You can use it to add messages to the rule's Audit Log when a rule executes.

Screen Shot 2023-01-25 at 11.44.28 AM.png

 

Click the Show More link to the right of an entry in the Audit Log to display the details for that entry.

Screen Shot 2023-01-25 at 11.45.39 AM.png

Suggest an answer

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

Atlassian Community Events