Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,231
Community Members
 
Community Events
184
Community Groups

How to split labels from the output of ConfiForms Field that is in  [A,B,C,D] format

I'd like to be able to select 1 or more metrics from a multiselect confiform dropdown and when the form creates a jira story, it should automatically add the corresponding label for each of the metrics selected to the label field in the story.

 I am using "Smart Multi-select" field type in ConfiForms field.

 The output from that is in  [A,B,C,D] format. JIRA considers it one label rather than seperate. I want these 4 labels gets created? how to do that I used array keyword as well.

{ "fields": { "project": {"key": "SATS"}, "summary": "[entry.Summary.escapeJSON]", "description": "Issue: [entry.Issue.escapeJSON] \r\n \r\n Requester: [entry.Requestor.escapeJSON] \r\n \r\n Tech contact: [entry.Techcontact.escapeJSON] \r\n \r\n Metric(s): [entry.Metrics.LinkedMetricSep.escapeJSON] \r\n \r\n Metric Label(s): [entry.Metrics.MetricLabelSep.escapeJSON] \r\n \r\n Benefits: [entry.Benefits.escapeJSON] \r\n \r\n Workaround: [entry.Current.escapeJSON] \r\n \r\n To Be: [entry.ToBe.escapeJSON] \r\n \r\n Additional Comments: [entry.Comments.escapeJSON]", "labels": ["Dynamos"], "customfield_10153": "[entry.Summary.escapeJSON]", "duedate": "[entry.DeployDate.jiraDate]", "reporter": {"name": "[entry._user]"}, "issuetype": {"id": "5"}, } }

 

1 answer

0 votes
Alex Medved _ConfiForms_
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.
Apr 21, 2023

Hi

Is this the expression in question? 

[entry.Metrics.MetricLabelSep.escapeJSON] 

Alex

Yes Alex. I want to seperate the lebels. As of now it's coming in format (A,B,C,D) and its getting as one label, I tried removing seperater comma but with space also it considers one label itself.

Alex Medved _ConfiForms_
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.
Apr 23, 2023

Although, I dont know your form's configuration but I believe this is what it should be

[entry.Metrics.transform(MetricLabelSep).asArray]

Alex

error.PNG

We are getting this error Alex. Could you let us know what is wrong here?

Alex Medved _ConfiForms_
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.
Apr 26, 2023

Try

[entry.Metrics.transform(MetricLabelSep).asArray.escapeJSON]

Alex 

No that didn't help. We tried trimAllSpaces today and it is working now.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events