Forums

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

Passing REPORTER name to new JIRA Issue

Deleted user November 26, 2018

Hi there,

From Cherwell I am using rest to create issues in Jira;

rest/api/2/issue

I set the various fields in JSON before calling the API post, but as soon as I add this to the mix;

"reporter":{

"name":"incident.Customer Display Name"

},

it all fails.

HTTP Error Code 400

Bad Request.  The request could not be understood by the server due to malformed syntax....

The text in the error though returns what should be correct;

"reporter":{

"name":"Steven Lees-Smith"

},

I seem to have all the permissions setup correctly in Jira to allow this to happen and as far as I can see I have I have the correct piece of code in there, just a bit stumped.  As soon as I remove that the issue is created, bound to the project, the issue is linked to the Cherwell incident.. so I know the put and the get are solid.

Is there something to do with Reporter I am missing?

Thanks

 

1 answer

1 accepted

0 votes
Answer accepted
brbojorque
Community Champion
November 26, 2018

Try to use the username instead of the name, they are two completely different entities.

name: Local User
username: localuser

Deleted user November 26, 2018

When looking at my profile, my full name and nick name are both the 'Steven Lees-Smith' style.  Is there a particular spot to try and find the user name?

Deleted user November 26, 2018

actually.. found it.  steven.lees-smith

Thanks for the pointer.. just need to see if I can map that from Cherwell somehow.

S.

brbojorque
Community Champion
November 26, 2018

Hi Steven, 

You can inspect the element and figure out the username behind the name.

user.PNG

The value="bryan" is the username

The data-field-text="Bryan Bojorque" is the name

Deleted user November 26, 2018

yeh good tip, found it now.  

Have another issue but will trigger a new question - appreciate the help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events