Forums

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

Labels not crossing over into Jira from my Confiform

William Banks October 15, 2021

I've seen this code work before on a colleague's confiform but I can't figure out why it's not working for my confiform. Basically this confiform generates a Jira issue and I want to attach labels to this Jira issue based on values in other fields in the confiform entry that generates this Jira issue.  Here's the code: 

{ "fields": { "project": { "key": "C500TP" }, "components":[{"name" : "DDT"}], "summary":"DDT - [entry.Task.escapeJSON]", "issuetype": {"name": "Task"}, "labels": "DDT", ["[entry.Code]","[entry.CategoryDM.label]"], "customfield_11848":{"id": "[entry.CodeSelect.Jira]"}, "customfield_16400":"[entry.AssignedDate.jiraDate]", "duedate":"[entry.DueDate.jiraDate]", "assignee":{"name":"[entry.Assignee]"}, "priority": {"name":"[entry.PriorityLevel.label]"}, "description":"[entry.Comments.escapeJSON]", }

The problem is that the only label that is showing up when I open the Jira Issue is the one from the Code field. Any ideas why the other labels aren't being added to the Issue?

I also want to link this Task to a specific Epic based on the value entered in the CategoryDM field, which is a dropdown field.  Any suggestions on how to do that as well?

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
October 15, 2021

Hi

This part does not look right

"labels": "DDT", ["[entry.Code]","[entry.CategoryDM.label]"]

labels should be passed as array according to Jira REST APIs

"labels": ["DDT", "[entry.Code]","[entry.CategoryDM.label]"] 

Also, this part should not end with a comma

"description":"[entry.Comments.escapeJSON]", }

Alex

William Banks October 20, 2021

Still no getting all the labels, just the label from [entry.Code] is populating after the confiform generates the Jira issue.

Alex Medved _ConfiForms_
Community Champion
October 20, 2021

Hard to tell anything more... without seeing what do you have / have tried

Could you share your JSON mapping? And also tell me what "CategoryDM" field is and what values (labels) it has

Alex

William Banks October 20, 2021

Not sure how to share my JSON mapping.

CategoryDM is a drodown menu field. 

 

It's values are SCS, DPMAPS, Timekeeping, Surv_Audit_Eval_Review

Alex Medved _ConfiForms_
Community Champion
October 20, 2021

In your original question you have shared that already, but now I believe you have it fixed as per my earlier comments.

May I see how you have it now?

William Banks October 21, 2021

{ "fields": { "project": { "key": "C500TP" }, "components":[{"name" : "DDT"}], "summary":"[entry.CategoryDM.label] - [entry.Task.escapeJSON]", "issuetype": {"name": "Task"}, "labels":["[entry.Category]","[entry.Code]"], "customfield_11848":{"id": "[entry.CodeSelect.Jira]"}, "customfield_16400":"[entry.AssignedDate.jiraDate]", "duedate":"[entry.DueDate.jiraDate]", "assignee":{"name":"[entry.Assignee]"}, "priority": {"name":"[entry.PriorityLevel.label]"}, "description":"[entry.Comments.escapeJSON]" } }

I added a Category field that autofills with the label for the selected entry for the CategoryDM field, which I've recently changed to a Radio Group field instead of the dropdown field. Still, the only label showing up is the entry from the Code field.

Alex Medved _ConfiForms_
Community Champion
October 21, 2021

Not sure I follow... If you want to access the label of the "CategoryDM" field then you need to put it as 

"labels":["[entry.CategoryDM.label]","[entry.Code]"]

Alex

William Banks October 21, 2021

I did that initially but the label for the CategoryDM entry wasn't showing up as a label in the Jira Issue. Even with the changes I've made it still isn't working. 

Alex Medved _ConfiForms_
Community Champion
October 21, 2021

Honestly, I dont know

I have created a simple form to create a Jira issues on ConfiForms form submit, added the same fields as you have (CategoryDM and Code) and here is the result

http://recordit.co/Yi09xYFgHM

Works perfectly well

Alex

William Banks October 21, 2021

I think I figured out the issue. Need to wait on my Jira admin to remove an automation rule that may be the cause of my label issue. Thank you for your help

Suggest an answer

Log in or Sign up to answer