Something changed on June 20th that broke my automation rules when updating an object that has a Date attribute.
Before June 20th I had the following steps in my rule:
The attribute was of type: Date
The value being assigned was: {{now.convertToTimeZone("America/Los_Angeles").format("MM/dd/yyyy")}}
Before June 20th in my audit log, there were no errors for this step.
Starting on June 20th the following errors started showing up preventing the object from being created:
The image reads:
Error creating Object
Hello everyone,
This is partly speculation, as I haven’t found documentation that clearly states the return types of date functions.
I resolved the issue by using this value when updating Date attributes:
{{now.convertToTimeZone("America/Los_Angeles").jiraDate}}
It seems .jiraDate returns a proper Date type, while .format() likely returns a String, which caused the error.
I’m still trying to find official documentation or a changelog where Atlassian announces these kinds of changes. If anyone knows where to find that, I’d really appreciate the help.
Hi @Hector Vega -- Welcome to the Atlassian Community!
Both of the expressions you note return string values for the date:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-format---
The symptom may be related to related to how the date is parsed just-in-time when stored by the rule action, and your original format was no longer supported / parsed. You could ask your Jira Site Admin to check with the Atlassian Support team to confirm this: https://support.atlassian.com/contact/#/
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.
Hi @Hector Vega
To my knowledge the date format in assets on an attribute is yyyy-MM-dd or yyyy/MM/dd
Check this by getting an object via the Assets API , and look for the value or searchvalue in the API call output of the attribute on the object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mate, if you can might be worth putting in a support ticket.
https://support.atlassian.com/contact/
We had a similar issue with assets and it turned out to be a bug reported here: bug: https://jira.atlassian.com/browse/JSDCLOUD-16674 which they fixed pretty quickly.
It looks like there is a lot of data/field type changes happening under the hood for Assets right now to make it faster and work better, which is changing how some of the data is used or works. As an admin I have recieved a few emails from Atlassian noting "maintenance changes". But it didn't go into it as far as function return types etc. This is the article linked in the email: https://community.atlassian.com/forums/Jira-Service-Management-articles/Reminder-Changes-coming-into-effect-in-Assets-for-Jira-Service/ba-p/2936741
I will say though, the fix we put in, in the interim I had to do a bit of manipulation too and was also getting an error and as Hector noted, I had to change the format because it kept taking it as a String which was why it was looking good in my audit log but not working.
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.