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,554,250
Community Members
 
Community Events
184
Community Groups

Confiform if statements for create new Jira Issue

None of my if statements appear to be working 

Based on a radio group with id 1 = yes, add components

  • #if(${entry.tneeded.hadId("1")}){ "component": [{"name":"A"}], #end
  • #if(${entry.sneeded.hadId("1")}){ "component": [{"name":"B"}], #end

 

Based on radio group with id 1 = project A, id 2 = Project B, set the project 

  • #if(${entry.jiraproject.id == "1"}){ "project":{"key": "PA"}}, #end
  • #if(${entry.jiraproject.id == "2"}){   "project":{"key": "PB"}}, #end

Could not prepare JSON: invalid format, not sure what I'm doing wrong. 

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

That has gotten me closer,

project part works now with 

#if(${jiraproject.label} == 'A') "project":{"key": "PA"}, #end

#if(${jiraproject.label} == 'B')   "project":{"key": "PB"}, #end 

 

but now I get the Invalid format. Duplicate key "components"

#if(${vfxneeded.label} == 'Yes') "components": [{"name":"A"}], #end #if(${audioneeded.label} == 'Yes')  "components": [{"name":"B"}], #end

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.
May 27, 2023

Hi @SKAdmin 

Try this

#set( $components = '' )

#if(${vfxneeded.label} == 'Yes') #set ($components = '{"name":"A"}') #end
#if(${audioneeded.label} == 'Yes') #if($components != '') #set ($components = $components + ',') #end  #set ($components = $!{components} + '{"name":"B"}') #end

#if($components != '')
"components" : [${components}],
#end

 Alex

Like # people like this

That did the trick. Thanks Alex.

Suggest an answer

Log in or Sign up to answer