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

How to create a Jira issue using IFTTT where the Jira field has a forward slash

Joseph Jandal May 4, 2021

I am using Confluence Confiforms IFTTT macro to create a JIRA issue.  My problem is a custom field in Jira that has a "/" slash in the field name (ie. component/s)  I can't figure out how to include this field slash in the macro.  Everything I tried generates an error becasue of the slash.  I have tried escaping using <esc>/ but that doesn't work either.

4 answers

0 votes
Joseph Jandal May 7, 2021

Alex, thank you.

However, still not working...getting this error: 

  • com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"components":"expected Object"}}

Here's my code:

{
    "fields": {
       "project":
       {
          "key": "MPAS"
       },
       "summary": "[entry.Summary]",
       "description": "[entry.Description.escapeJSON]",
"labels": ["ProjectIntakeRequest.escapeJSON"],
"components": ["Stardust"],
       "issuetype": {
          "name": "Story"
       }
   }
}

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 7, 2021

Please have a look at the answer I have linked earlier - https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-set-components-in-Jira-REST-API-5-x-while-creating-a/qaq-p/529155 

It is all there - you are setting the field incorrectly...

Should be

"components": [{"name":"Stardust"}]
0 votes
Joseph Jandal May 5, 2021

I need to mention also that the custom field 'Component/s' is already define in the story screen. So error message is confusing.

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 5, 2021

It is not confusing really, as it tells you that this field is not on the screen - and this means it is either incorrectly referenced or missing indeed. 

See my previous comment - in your case it is incorrectly referenced in the mapping

Should be "components"

0 votes
Joseph Jandal May 5, 2021

The slash is in the No Format section of the IFTTT:

{     "fields": {        "project":        {           "key": "MPAS"        },        "summary": "[entry.Summary]",        "description": "[entry.Description.escapeJSON]", "labels": ["ProjectIntakeRequest.escapeJSON"], "Component/s": ["Stardust"],        "issuetype": {           "name": "Story"        }    } }

Here's the error I get:

  • com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"Component/s":"Field 'Component/s' cannot be set. It is not on the appropriate screen, or unknown."}}
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.
May 4, 2021

Hi

Where do you have and need for a forward slash? In JSON mapping between Jira and ConfiForms?

Alex

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 5, 2021

Components are not set by "name", but as every other field in the JSON mapping it needs to be set by internal name.. which is "components"

See also some other answer on this https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-set-components-in-Jira-REST-API-5-x-while-creating-a/qaq-p/529155 

Joseph Jandal May 5, 2021

Please show me how the syntax would be in the No Format below:

"labels": ["ProjectIntakeRequest.escapeJSON"],

"Component/s": ["Stardust"],

 

where I am assigning the field Component/s a value of "Stardust"

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 5, 2021

I think you still misunderstand what I am saying... instead of 

"Component/s": ["Stardust"],

you need to put

"components": ["Stardust"],
Joseph Jandal May 5, 2021

I guess I am still not getting it or not communicating properly.  In my case, our custom field name is 'Component/s'  which is a really bad name since component is also a keyword in Jira.

So, how do I reference this field 'Component/s' in my Jira story creation from ConfiForms?  I need to assign it a value of "Stardust".

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 5, 2021

If this is a custom field then it should have an internal name in a way like

customfield_XXX

where XXX is the number assigned to it by Jira when you have created it. and you should use this (internal) name in the mapping (not the label "Component/s" or whatever else you may have as a file label).

Jira expects an internal field name for this field

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events