Due Date Smart Values

Homesh Agarwal May 1, 2024

Hi all! I'm creating an automation rule for my Service Planner. The parent item/ task contains the Installation date of the equipment, and under the sub-tasks, I want Jira to automatically calculate 2 months from the Installation date. I'm pretty new to this and would like your input on the Smart Values formula I can use to automate my workflow.

A quick heads up, the field in my Parent ID is called 'Installation Date'. 

 

ChatGPT suggested me this formula: {{issue.fields.customfield_10075.addMonths(2)}}
However, it is not working and my automation ain't successful.
My Installation Date field is a general date field with the ID of customfield_10075

2 answers

0 votes
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.
May 1, 2024

Hi @Homesh Agarwal 

I recommend not using a bot for Jira questions like this; they cannot access and assess the context for your Jira site to provide correct answers.

And so, the wrong date increment function was recommended.  Please try this one: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-plus-unit---

 

Have you confirmed that field is available / configured for subtasks?

 

Next, you describe using a marketplace app / addon.  Some of those apps add custom fields to Jira which are static (i.e., the value is always present) while others dynamically fill the field using code.

First, confirm your smart value / custom field id is available to issues using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

If the field is not present, it is not supported by automation rules, and you may need to ask the vendor of the app how to proceed.

If the field is present, and it is not listed in the dropdown values, you may need to set the field using JSON.  For example,

{
"fields" : {
"customfield_12345" : "{{issue.yourDateField.plusMonths(2).jiraDate}}"
}
}

Please look here to learn more about that method: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Date-picker-custom-field

If that does not work, the field may be dynamically generated by the app, and not editable by rules.  Check with the app vendor to confirm that.

 

Kind regards,
Bill

0 votes
Ben Finn
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 1, 2024

Almost perfect. I believe you need to use plusMonths(2). Please give that a try.

Homesh Agarwal May 1, 2024

Yes, this is working. But I've added an App called 'Fields' to create Custom fields- State, City, and Location which are dropdown fields with the ability to add new options on the go.

Now I've marked these fields on the parent task, and wish to copy the same to my sub-tasks. I'm unable to find these on my automation list. Any idea what might be the reason and how can I resolve this?Fields- Custom Fields App.pngPicture2.png

Ben Finn
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 1, 2024

Hi @Homesh Agarwal

With that there isnt much you can do. If its not available then its not available. A lot of custom fields aren't. With your automation, does it give you the option to use JSON? image.png

Suggest an answer

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

Atlassian Community Events