Hi
I have an Jira automation that creats a new issue in another project in 'Issue Create'
One of the fields to be copied is a insight field. The field exist in both project but different schemes wich means the key is different but name is the same. Using the default select fields to copy doesnt work becasue of that so Im trying to use more options -> JSON to copy the data.
Problem is that if I access the field value {{issue.customfield_24100}} I get "myvalue (XXX-1234)" The name and the key of the object. I cant use this data to set the field in the other project.
I try to use {{issue.customfield_24100.substringBefore("(")}} to only get "myvalue" which should work fine but substringBefore() doesnt work on insight data it seems, only text fields.
I tried {{issue.customfield_24100.toString().substringBefore("(")}} and that doesnt work either.
Anyone knows how I can regex the Name attribute only from the isnight field without the object key?
Ok I managed to get the name out with issue.customfield_24100.summary but the insight field wont take just the name it seems.
This is the JSON I use
{
"fields": {
"Customfield_24100": "{{issue.customfield_24100.summary.asJsonStringArray}}",
}
}
Ive tried
issue.customfield_24100
issue.customfield_24100.summary
issue.customfield_24100.summary.asJsonStringArray
issue.customfield_24100.summary.asJsonString
nothing of them can update the insight field
Hey @Tobbe
To confirm, you have an 2 schemes on your asset custom field, each scheme pointing to a different object schema for a different project? Example:
For Customfield_24100:
Scheme 1 -> Object Schema 1 -> Project 1
Scheme 2 -> Object Schema 2 -> Project 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
correct, and the objects are the same. in this case countries. So I was thi8nking if I get the country name from one custom field I could copy the name to another. But it looksl ike asset custom fields nede an object and not only a name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.