How to copy a date field from an issue into an asset object using Json

Rhea Anand March 6, 2024

I have a field called "Start Date" on an issue. 

 

Using Jira automation, I want to 'create an asset using Scriptrunner' and copy the Start Date field into a date attribute on an object. 

I've tried: 

"Start": "{{issue.Start Date}}"

"Start": "{{issue.Start Date.asJsonString}}"

and none have worked so far. Any ideas?

2 answers

1 accepted

0 votes
Answer accepted
Sankalp Chugh April 3, 2024

Hi @Rhea Anand 

I had a similar issue as the "Start Date" is two words. I added the value to a variable and then used this value. That fixed my issue.

I hope that works for you.

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2024

@Rhea Anand -

Welcome to the community.  Can you clarify your statement of "none have worked so far?"

Are you not getting the custom field value?

Are the object not created in your Assets Schema?

Lastly if you have problem with ScriptRunner for Jira, you should contact the vendor support team to further assist your ask.

Please advise.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Rhea Anand March 6, 2024

@Joseph Chung Yin 

I am not able to copy the Start Date field into the Start field in the object when creating the object. 

If i leave the Start Date field out of the automation action, then i am able to create the object. However, I require that field for my use. 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events