Forums

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

json as REST request

Issa Shaikh July 22, 2019

Hi ALL,

 

If I send following json as REST request

 

{ 

"fields": {

       "project":

       {

              "key": "XXX"

       },

       "summary": "kernel : CVE-2019-1044",

       "description": "A security feature bypass vulnerability exists when Windows Secure Kernel Mode fails to properly handle objects in memory.To exploit the vulnerability, a locally-authenticated attacker could attempt to run a specially crafted application on a targeted system, aka 'Windows Secure Kernel Mode Security Feature Bypass Vulnerability'.",

       "issuetype": {

              "name": "Vulnerability"

              },

       "customfield_11702": "CVE-2019-1044",

       "customfield_11703": "7.2",

       "customfield_10906": [ { "name": "qa.security" } ]

       }

}

 

I get error

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'customfield_10906' cannot be set. It is not on the appropriate screen, or unknow' at line 1

 

While the same if I send to YYY project

{ 

"fields": {

       "project":

       {

              "key": "YYY"

       },

       "summary": "kernel : CVE-2019-1044",

       "description": "A security feature bypass vulnerability exists when Windows Secure Kernel Mode fails to properly handle objects in memory.To exploit the vulnerability, a locally-authenticated attacker could attempt to run a specially crafted application on a targeted system, aka 'Windows Secure Kernel Mode Security Feature Bypass Vulnerability'.",

       "issuetype": {

              "name": "Vulnerability"

              },

       "customfield_11702": "CVE-2019-1044",

       "customfield_11703": "7.2",

       "customfield_10906": [ { "name": "qa.security" } ]

       }

}

This passes returning Issue ID and key as response.

 also to mention, YYY project mandates mentioning of story points which XXX project does not.

 

Any suggestions?

1 answer

1 accepted

0 votes
Answer accepted
Aleksandr Zuevich
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.
July 22, 2019

Hi,

I suppose you have customfield_10906 on the create issue screen for project YYY while you don't have it for project XXX.

Issa Shaikh July 23, 2019

Hi Aleksandr,

Thank you very much for the suggestion.

Actually the field 10906 was hidden for this project. so the json was not working.

It's working now. cheers :)

Suggest an answer

Log in or Sign up to answer