It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation Smart calues not rendering

Hello, 

I have an automation rule, which contains the following line : 

Created: {{issue.created.format("dd/MM/yyyy")}}

 

And I get an error that this row cannot be rendered correctly. I made some tests and if  I remove the .format part it's working. Can you give me some advice on how can I fix this issue? 

1 answer

Hello @galin.ivanov 

I have been trying out similar smart values using dates which has not been very successful. The problem I have alteast is that your jira instance i set to another date format. You can check this by going to Jira administration -> System -> Advanced settings

image.png

My smart values behaves just as you describe when i try to format it by myself. I can only use the default format. I don't know why it behaves like this.

My solution was to create a regular text custom field and put the date there. It doesn't show up on the side next to other date fields, but atleast I could format the date in a way that is more common in my country. Not the best solution but it does the job for me.

Best regards,

Alexander

Hello @Alexander_Ling ,

 

And thank you for you update, but even if i try using the default format is still the same behavior: 

Error rendering smart-values when executing this rule:Failed to get value for issue.created.format("dd/MMM/yy h:mm a"): Created: {{issue.created.format("dd/MMM/yy h:mm a")}}

 

Failed to get value for issue.created.format("dd/MMM/yy"): Created: {{issue.created.format("dd/MMM/yy")}}

 

I have checked and out Jira instance settings are the same as yours.

 

Best Regards,

Galin

Can you try to change the rule into writing the date in the description or in a comment? image.png

The idea for this automation is to send the date in an mail. It needs to check the due date and if it's less 1 day till due date, to send mail.

Yes, but I just wanted to see if you could print the value into a simple text field so the absolute basic is working.

Can you screenshot the entire rule you are trying to run?

I have used to log the result, and here is the result  Created: 2020-01-15T13:49:38.6+0200

image.pngimage.png

Hm. I can write {{issue.created.format("dd/MMM/yy")}} and it works fine. I can also write  {{issue.created.format("dd/MMM/yy h:mm a")}} so I can't really replicate the issue. The only time I can get a similar error is when I try to set a date-field to another format that is not defined in the jira instance.  So I don't think I am able to help with your kind of issue.

One question though, since you want to automate this, why don't you run a scheduled trigger? This will allow you to use JQL without any other triggers needed. Maybe you already thought of this or maybe you have a better solution, just making sure that you know that the scheduled trigger exists. :-)

It's mainly scheduled trigger, just I moved the braking part of it in different automation to see what's the issue, and how to solve it.

 

Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you