Hi, I can't figure out how to copy [Select List (multiple choices)] custom field from linked issue.
Other fields work fine.
I need to copy one more custom field - customfield_10177.
The type of this field is Select List (multiple choices).
Smart value {{issue.issuelinks.inwardIssue.customfield_10177}} doesn't work.
I want the rule to be manually triggered from the edited issue.
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
Have you confirmed that each of those field edits actually works as you expect? The concern is two-fold:
Next, for multiple-select option field, you may need to use JSON to add the values: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-select-custom-field
If we assume the data for customfield_10177 is actually loaded with the issuelinks smart value, and there is one-and-only-one issue in the inwardIssue attribute, this might work with the function asJsonObjectArray():
{
"fields": {
"customfield_10177": {{issue.issuelinks.inwardIssue.customfield_10177.asJsonObjectArray("value")}}
}
}
Kind regards,
Bill
there is only one linked issue and the copied custom fields exist in both issues
the type of source and destination customfield_10177 is [Select List (multiple choices)] and the valid options for this field are also the same
other copied custom fields work exactly as I wanted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was not noting the fields exist (or not) in the issue types used. But instead that the {{issue.issuelinks}} smart value does not load all of the associated data by default for a specific issue. If it did, one could imagine a situation were a single issue with linked ones could pull thousands of others, in an ever increasing tree of links, including duplicates of the same issue. Regardless of that...
Did you try the JSON expression I suggested rather than setting the field from the dropdown list?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
there is only one linked issue (source) from which I am trying to copy values to my trigger issue
I added some images of my rule, so you can see that I tried JSON expression you suggested and there is also an image with an error from the audit log
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the updated information, and...for the issue shown in the log, RT-1, it seems that field is not available.
Can you set that field manually from the Jira UX to confirm it is editable?
Have you tried this how-to article to determine if the field is supported by rules for edits: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the field Proces (customfield_10177) is available in RT-1 as you can see from this screenshot
I didn't read the article you suggested yet but I think my field can be edited by rules, because I created another rule, which is triggered automatically from the source issue when the link is created and the fields are populated just fine
So I am asking again, is there any way how can I populate the fields by using my manually triggered rule (triggered from destination issue)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "destination issue" is only relevant for the issue linking triggers.
For all others, such as Manually Trigger, the rule must go get the issue data. When you want to update the trigger issue from another one, try this:
Finally, for questions like this, I recommend starting with your Jira Site Admin for help. They will know the context of your site's configuration, your company's business, and thus be able to help faster with rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used the Lookup Issues action and the {{lookupIssues.first.customfield_10177}} smart value for copying the value and it works fine, but only when the value of the original field is made up of exactly one of the available options. If it is a combination of two or more options, the rule clears the value of my "target" field so it ends up empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My mistake as I forgot this was a multiple-select option field, and so JSON must be used with advanced edit. Please try this, as noted in my first response but now using the lookup results:
{
"fields": {
"customfield_10177": {{lookupIssues.first.customfield_10177.asJsonObjectArray("value")}}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
excelent
now my rule works exactly as i wanted
many thanks to you Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline 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.