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?
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you try to change the rule into writing the date in the description or in a comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have used to log the result, and here is the result Created: 2020-01-15T13:49:38.6+0200
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
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.