I am trying to create a date smart value to be used for start date and due date for subsequent issues created in the same automation.
The create smart variable step is
I run this rule with manual input `2023-12-20`
And I get this log
Why can I not format my date even though it looks like it is correctly cast as a date when I create it ?
@TP that happens because when you create a variable, it will always return a string.
Create variable
Use smart values here: Yes
Define your own smart value, which can be used in other actions and conditions in the same rule. The smart value you define can consist of other smart values, as well as math functions.
Note that this will always return a string. For example, if you created variable called Stakeholders with the smart value {{issue.watchers.distinct}}, your variable would return the list of watchers but the list would be rendered as a string.
So in your last log action, you will need to convert the variable back to a date first and then you can format it in whichever way you want:
Thank you ! I indeed figured it out but it is not spelled out anywhere and it's not intuitive at all. If someone from Atlassian is watching this, please add it to the help text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @TP
The documentation for the Create Variable action describes it is always a string (i.e., text data type). You may find that information here: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable And that documentation is noted in the rule builder when using the action.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.