Forums

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

Set Single Group Picker field to it's previous value on workflow transition

Allie Stewart
Contributor
November 22, 2024

Hi,

One one of my workflow transitions, I need to set the value of my field "Support Team" back to it's previous value.  This field is a single user group picker.

  • I've tried using {{fieldChange.fromString}}, {{changelog.from}}, etc. in the workflow on "set field" post function but that doesn't work.
  • I've tried to do this in Automation using the smart values above, but that doesn't work either.
    • { "fields": { "customfield_10132": { "value": "{{fieldChange.fromString}}" } } }

And the automation throws errors like this: 

(Class com.atlassian.jira.issue.fields.rest.json.beans.GroupJsonBean), not marked as ignorable at [Source: N/A; line: -1, column: -1] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.GroupJsonBean["id"]) (customfield_10132))

 

I can't find documentation on how to set to a previous value of a user group picker.  Can anyone give me a little guidance?

Thanks.

 

 

1 answer

0 votes
Jehan Bhathena
Community Champion
November 23, 2024

Hi @Allie Stewart 

For Single Group Pickers the fromString, there is a square bracket in the value :

image.png

Try creating a variable with the below smart value, and updating the field with the variable:

{{fieldChange.fromString.substringAfter("[").substringBefore("]").trim()}}

image.png

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events