Forums

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

{{issue}} smart variable is not set when issue created rule is fired in JIRA Cloud automation

Daniel Harrison June 6, 2021 edited

I have setup a project automation rule with the following:

 

1. When: Issue created

2. Edit Issue Field: Due date =  {{issue.[<customField>]}}

[EDIT] To clarify the exact "edit".  I want to perform a date operation using two custom fields.  customField1.minusDays(customField2).  The issue is that both of the field values are always empty, since I cannot use the smart variable for issue. or createdIssue.

 

When the rule runs, the audit logs says it is successful.  However, the date is never set.  I have tried a large variation of setting issue fields (not just date) and I cannot get it to work.

 

I have reverted to just adding an audit log when issue is created and logging the values.  The logged values are always empty.

Different variations such as:

{{issue.fields}} OR {{issue.fields.asJsonString}} OR {{fields.asJsonString}} OR {{createdIssue.fields.asJsonString}} OR {{triggerIssue.fields.asJsonString}} OR {{issue.key}  

 

I am unsure where to go from here.

1 answer

2 votes
Callum Carlile _Automation Consultants_
Community Champion
June 7, 2021

Hi @Daniel Harrison 

Are you trying to populate the Due Date field with the same date in another date field? If so, you can use the Copy From function (the 3 dots next to the field in the edit field action), so in this case, you wouldn't need to use the smart values

Daniel Harrison June 7, 2021

Hi Callum,

I want to set the due date using date operations on two custom fields.

customField1.minusDays(customField2).  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events