Hi,
I am a novice with coding and I'm trying to create a confiforms, with these options.
I need help with two things
first one :
Component drodown contains Value1, Value2, Value3
I have 4 Teams in Jira, Team A, Team B, Team C & Team D
if user selects Component Value1 then it should automatically map to Team A
similarly if user selects Value 2 then map to Team B
if user selects Value 3 then it should map to Team C & Team D
OnCreated Jira ticket i should get a ticket with (1). Value1 - Team A (2). Value2 - Team B (3). Value B - Team C & Team D
Second one:
2. on selecting anything from dropdown Value1/value2/value3 it should display another confiforms page
Hi
You can set up rules that set the values in a field based on the selection being made in another field https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-Setvalue
Or have a similar logic inside the IFTTT macro by using Velocity instructions #if()#end
Alex
Thanks Alex. can you please give some sample code/procedure to create Jira issue when one of the components selected from dropdown.
only one selected component should be linked to the created jira ticket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Not sure how your field in ConfiForms is called but the structure in JSON mapping for components in JIRA REST APIs is
"components": [{
"name": "someComponent"
}],
Change someComponent to a reference of ConfiForms field [entry.field_name.label]
(where field_name) is the name of your components field in ConfiForms
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to hear
Accept the answer then;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex, need one more support.
I want to assign Team when user selects component.
if user selects Microservices-Infra Component then "Team A" should be assigned
similarly if component is Security Testing then "Team B" should be assigned
could you plz share procedure to do this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean by “assigning”
Assigned where? To some jira field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is really in the documentation.. you can use Velocity templating
#set($comp = "[entry.Component]")
#if($comp == 'A')
"customfield_XXX": "Team A",
#end
#if($comp == 'B')
"customfield_XXX": "Team B",
#end
#if($comp == 'C')
"customfield_XXX": "Team C",
#end
Of course, I have no idea what field type is your Team field and what mapping it expects... Jira dropdowns expects something different https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/
But I truly believe you understand the concept
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
i tried but its not working. plz check this code and let me know what i'm missing here
set($comp = "[entry.component]")
if($comp == 'Microservices-Infra')
"customfield_14900": "2239",
end
if($comp == Microservices-RegUser)
"customfield_2239": "2239",
end
if($comp == Security Testing)
"customfield_14900": "3417",
end
if($comp == Regression),
"customfield_14900": "4482",
end } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"customfield_14900": "2239", is the correct one. above one was typo error.
getting this error "Invalid format. Expected a ':' after a key at 619 [character 12 line 13]"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Take a look at your IF conditions in the Velocity template... they are missing single quotes around the values to compare...
Also the mapping like
"customfield_14900": "2239"
is for text fields in Jira (see the documentation for Jira REST APIs)
if your "customfield_14900" field in Jira is a select field then the mapping is usually different
"customfield_14900": { "value": "2239" }
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.