Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation - Set a list value with the project of another issue

Gaston Him
Contributor
May 4, 2022

Dear community, 

I'm still trying to automate a bit my service desk and I've chosen to create as many projects as I have customers. 

Besides, I clones each issue in a central one (software company managed) to have a central project with a consolidated backlog and in which I can manage sprints. 

In this frame I need to set a custom_field to keep the track of the original project. 

I created a Project Picker (single project) custom field, and I'm trying to set it. 

I'm trying to do it through an automation triggered at issue creation, and then for the related issue I edit the issue with this JSON : 

{
    "fields": {
         "customfield_10085": { "name" : "{{ProjetClient}}" }
    }
}

 

I used a variable ProjetClient which is equals to {{project.name}}

 

The audit log  : 

Edit issue
Error while parsing additional fields. Not valid JSON.
(I've tried also some other syntaxes...)
Any advice ?
Thx a lot, in advance, for your feedback,
Regards.

2 answers

0 votes
Alberto Salvante
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 4, 2022

Hi Gaston,

Please try this one:

{
"fields": {
"customfield_10060": {"key": "{{project.key}}"}
}
}

customfield_10060 is the project picker custom field.

I've tried this syntax in my instance and it works.
Hope it will helps.

Best,
Alberto

0 votes
John Funk
Community Champion
May 4, 2022

Hi Gaston,

Why don't you just create a simple single line text field and populate it with the project code or name when you do the automation? It's just one more field to add. 

Gaston Him
Contributor
May 24, 2022

Hi John, 

I'd love to, but I prefer to set a dropdown list, the user could be able to pick a value rather than set a free text. 

I've planned to set metrics based on this custom field, so the value is quite important for me. 

Have an excellent day, 

Regards.

John Funk
Community Champion
May 24, 2022

Understood - but if you are setting the value, why do you need a dropdown list for someone to pick from? If it's that important, I wouldn't think you would want someone changing it. 

But I also might be misunderstanding the whole thing. :-)

Gaston Him
Contributor
May 24, 2022

You're right, I didn't give the entire picture. In my way of working I could have several project for the same customer. 

I wan't to check also if the customer way of working is aligned with mine and if this piece of data is accurate or wrong (so I have to change the value).

If it is wrong I have to educate my customer ;-)

Thanks a lot for your time. 

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer