Hi guys, I hope someone can help me.
I need to copy a date stored in an asset object over to a Jira date field.
Using automation, I can look up the date from the object but when I try to copy it over to a Jira date field, I get the error that the format is not correct. The format returned from assets is example; "Fri Oct 24 00:00:00 UTC 2014" this cannot be copied to a Jira date field in this format.
I have tried to use the "create a variable" without success, I have also tried copying the date to a text field, and then copying the value from the text field using the toDate function over to the due date field in Jira as described here, Solved: Pulling Insight date attribute into an issue (atlassian.com)
Nothing seems to work.
Has anyone worked out how to convert an asset date format into a usable date format in a jira date field?
Looks like I didn't need the second variable, I just needed to add .toDate.jiraDate to my first create variable smart value as it was returned as a string. adding {{datevar.toDate.jiraDate}} converted the string to the correct usable jira date format.
Here is a possible idea is to create an automation rule where you can obtain the assets object's attribute and utilize the smart value for date format to convert it to a format for your JSM issue's custom date field -
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
I have not yet test it out, but it should work for you.
Hope this helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Viasat Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joeseph,
Thanks for the reply. I have tried just about every combination of smart fields to convert the date.
What I have done in my automation is create a variable called datevar to look up the attribute "Acceptance date"
I then create an audit log action to confirm the date is pulled from assets.
I then create a second variable called datevartwo and add the smart value of {{datevar.mediumDate}} to convert the date to a format that can be used by the jira issue due date field.
I add another log action to log the output of datevartwo
The audit log shows the datevar variable returns a date from assets as expected in the wrong Jira date format. datevartwo variable is empty so I can only assume Jira cannot convert the date format. This is where I am stuck.
Result of audit log below
As you can see the second log is empty
Any ideas greatly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Richard Shepley did you get a resolution for this? Looking to do the same yet my challenge is doing in DC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.