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?
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
Still no getting all the labels, just the label from [entry.Code] is populating after the confiform generates the Jira issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{ "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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Works perfectly well
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.