Forums

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

Smart value in Automation

Mimi Peters
Contributor
February 9, 2023

Hi There,

I believe its possible but something I can not get the smart value work. Unsure what did I miss.

Use case: 

This rule checks if the reporter of a new issue belongs to one of the 5 groups (Group A, Group B, Group C, Group D, or Group E). If the reporter is in one of the groups, the Labels field is set to the corresponding value: "A" for Group A, "B" for Group B, "C" for Group C, "D" for Group D, and "E" for Group E. The Smart Value syntax uses conditionals to dynamically set the value of the Labels field based on the group of the reporter.

Code:

{{#user_is_in_group(Group A)}}A{{/user_is_in_group}}\n{{#user_is_in_group(Group B)}}B{{/user_is_in_group}}\n{{#user_is_in_group(Group C)}}C{{/user_is_in_group}}\n{{#user_is_in_group(Group D)}}D{{/user_is_in_group}}\n{{#user_is_in_group(Group E)}}E{{/user_is_in_group}}

I receive this error:

Error parsing template: Closing tag (user_is_in_group) does not match opening tag (user_is_in_group("Fraud Team"))
Does anyone tried before and work?
Regards
MMCK.jpg

1 answer

0 votes
Carlos Faddul
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.
February 15, 2023

@Mimi Peters how are you ?

I try in my instance the code

{{#user_is_in_group(Group A)}}A{{/user_is_in_group}}\n{{#user_is_in_group(Group B)}}B{{/user_is_in_group}}\n{{#user_is_in_group(Group C)}}C{{/user_is_in_group}}\n{{#user_is_in_group(Group D)}}D{{/user_is_in_group}}\n{{#user_is_in_group(Group E)}}E{{/user_is_in_group}}

And don't send any errors, Can you paste your smartvalues from screenshot ?

Mimi Peters
Contributor
February 16, 2023

Hi Carlos,

Thanks for the code, I replaced it with my team name and give it a try but it gives an error not allow me to enable the rule and give errors attached.

CK.jpg

{{#user_is_in_group(Contact Center)}}CSC{{/user_is_in_group}}\n{{#user_is_in_group(Fraud Team)}}Fraud{{/user_is_in_group}}\n{{#user_is_in_group(CDD Team)}}CDD{{/user_is_in_group}}\n{{#user_is_in_group(Global Fraud Team)}}FO{{/user_is_in_group}}\n{{#user_is_in_group(Asia Compliance)}}ACOM{{/user_is_in_group}}

Mimi Peters
Contributor
February 25, 2023

@Carlos Faddul  Hiya, still hope to get one rule does it all if possible :) 

Carlos Faddul
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.
February 26, 2023

Hi @Mimi Peters , i'm trying to resolve this with list in smart values, however it's not very promising.

Maybe you can use more simple way the automation.

Captura de tela 2023-02-26 222744.png

Something like this can help you to maintain the automation update and will help you to debug the automation (if someday the automation crash)

Mimi Peters
Contributor
February 26, 2023

Thanks for the suggestion so at least it will reduce half of what I originally planned one rule for each. Was greedy to put all in 1 :) 

Like Carlos Faddul likes this

Suggest an answer

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

Atlassian Community Events