Forums

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

I have some issues with figuring out how to add a value in a custom field with scripted JMWE field

Dave Bosman [Realdolmen]
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.
April 15, 2022

Hi guys,

I am trying to figure out on how to add a value in a custom field with JMWE and I'm new to nunjucks. 

The field is a group picker field that needs to be filled in when specific conditions are met.

Depending on these conditions it will be a different group that needs to be added to the field. 

Following seemed the most logical, however it does not work. 
{% set issue.fields.customfield_10063.name = "myGroup" %}

Anyone here that knows how to solve it? Or point me in the general direction? 

Thanks in advance,

Regards,

Dave

 

 

1 answer

0 votes
David Fischer
Community Champion
April 15, 2022

Hi @Dave Bosman [Realdolmen] ,

you can use a Set Issue Fields post-function, select the destination field (your Group Picker field), and for the value use something like:

groupName

 Of course, if the group name depends on some conditions, you'll need to add some Nunjucks code. What is the condition that drives the group name?

Suggest an answer

Log in or Sign up to answer