Unable to update a custom field using Jira Automation

Chiara Squilloni March 1, 2024

Hi all,

I need to copy the value of a custom field in another custom field. I am using jira automation. The trigger is manual, I tried a lot of ways:

Screenshot 2024-03-01 160516.png

or in the "other" configuration putting this simple json:

{
"fields": {"customfield_10034": "customfield_10088"
}}

but the automation fail with an error "Campi sconosciuti impostati durante la modifica. Questi campi potrebbero non essere disponibili per il progetto/tipo. Verifica la configurazione dei tuoi campi personalizzati. Campi ignorati -

Destinatari Email (customfield_10036)
Nessun campo o valore campo da modificare per ticket (ciò potrebbe essere causato da alcuni valori campo inesistenti in un progetto specifico):
SMEC-5080"
that tells me that the custom field is unknown.
Both the custom field exists, one is Text Field (single line) and the other is Text Field (multi-line), they are both on the screen and Plugins have all the permission.
Am I missing something?

3 answers

1 accepted

2 votes
Answer accepted
Valerie Knapp
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 1, 2024

Hi @Chiara Squilloni , thanks for your question.

I was able to get something to work -

image.png

Is there a reason you aren't using the ... to just do a copy from the specified field in the trigger issue, like this -

image.png

Or did you try this already and it didn't work?

Please give us your feedback and either I or someone else will try to help.

Cheers

 

Chiara Squilloni March 1, 2024

Hi Valerie,

Yes, I tried also this but nothing change.

 

Chiara

Valerie Knapp
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 1, 2024

Hi @Chiara Squilloni , ok, thanks. 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/ 

In the destinari email field, have you tried including the curly brackets-

{{issue.customfield_10088}}

^ like this?

Another thing I often try is to have an action to log the value of something like this {{issue.customfield_10088}} and then you can check in the audit log what is being retrieved.

Please can you test this and give us your feedback?

Cheers

Chiara Squilloni March 4, 2024

Hi Valerie, 

I try also this Screenshot 2024-03-04 093909.png

but doesn't work.

Can you please explain me the check on the audit log?

I have to modify the custom field on one issue manually and than check on the audit log?

Thank you,

 

Chiara

2 votes
Trudy Claspill
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 1, 2024

Hello @Chiara Squilloni 

When trying to use smart values to set the value of a field, as @Valerie Knapp noted the smart value has to be surrounded by curly braces.

Additionally, depending on the types of these fields you may need to use a different smart value reference.

What type of field is the source field, from which you are copying the data?

What types of field is the destination field, to which you are trying to copy the data?

 

For instance, if the source field is a User/People field, and you want to copy the user's email address to a text field, Then to get the email address attribute from the user field you would need to use 

{{issue.<source field name>.emailAddress}}

Information about the smart values available for User/People fields can be found here:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/

Chiara Squilloni March 4, 2024

Hi Trudy,

one is Text Field (single line) and the other is Text Field (multi-line).

If I put 

{
"fields": { {{issue.customfield_10034}}:{{issue.customfield_10088}}
}}

 

in the Json the error change and tells me that the json is invalid

Trudy Claspill
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 4, 2024

Which field is the single line and which is the multiple line?

Try as shown below - put double quotes around each smart value.

{
"fields": {
"{{issue.customfield_10034}}":"{{issue.customfield_10088}}"

}
}

 

Trudy Claspill
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 5, 2024

Hello @Chiara Squilloni 

Regarding your last question about having changed to a Scheduled trigger and no actions getting executed:

Check the details of the trigger configuration. Do you have this box checked or unchecked?

Screenshot 2024-03-05 at 9.53.06 AM.png

Like Chiara Squilloni likes this
Chiara Squilloni March 5, 2024

Thank you @Trudy Claspill

you made my day!!! I didn't saw this! Now all this work!

 

Thank you so much!

Trudy Claspill
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 7, 2024

Hello @Chiara Squilloni 

You're welcome!

If you problem has been solved with the help of my responses, please consider clicking the Accept Answer button. That will mark your post as Solved and help others searching the community find the posts with validated answers.

Chiara Squilloni March 7, 2024

Hi @Trudy Claspill there is not the option in your answer.

Screenshot 2024-03-07 202141.png

Trudy Claspill
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 7, 2024

Hi @Chiara Squilloni 

The Accept Answer button is only at the top of an answer thread, not available on individual responses within the thread.

Screenshot 2024-03-07 at 1.19.20 PM.png

 

0 votes
Chiara Squilloni March 5, 2024

Hi dear @Trudy Claspill and @Valerie Knapp I have an update but I still have a problem.

I was triyng this automation on my sandbox and maybe there's something I didn't set about persmissions, also if I migrate the project from the production enviorment.

So I try in production environment and all works... but know I change the trigger, because I need to act on a set of issue that I find by a jquery.

So I change the trigger from manual to scheduled and I put the jquery that find more than 2000 issue, but wen I do "execute rule" or wait for the execution I find "no issue affected"... why?

Valerie Knapp
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

Hi @Chiara Squilloni ,

Could it be this issue that @Trudy Claspill mentioned -

image.png

You could have a JQL search that returns a number of issues but if they haven't been updated, the automation wouldn't run.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events