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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to post data to custom fields using rest api as server responds with status 400(BadRequest)

We have a form where the data from individual fields is stored in corresponding custom fields.

This worked perfectly when we delivered to the client. But It's not working after a month. 

We created new custom fields and shared them to relevant screens. But server responds with bad request when we try to create an issue using custom fields and rest api. 

However, we're able to create the request from service desk portal.

Moreover, We're able to create a request in the project with fields like "Summary" : "something", "Description": "Elaboration". 

So, we see nothing wrong with the api. 

We've checked and double checked to ensure that custom fields are shared to proper screens. 

Yet, we're not able to figure out why the code that ran perfectly a month ago has issues now...

If there're any internal changes we're not aware of, please feel free to let us know.

I tried to be as elaborate as possible. But if you need more information to understand the issue, feel free to shoot a question.

Thanks in advance.

Here's the code snippet:'/submitproject'isAuthorised, (req,res=> {  

  const reqBody = req.body;  const reqFields = reqBody.requestFieldValues;  

const bodyData = `{    "requestParticipants": [      "${reqBody.requestParticipants}"    ],   

 "serviceDeskId": "${config.get("jiracred.servicedesk.serviceDeskId")}",    

"requestTypeId": "${config.get("jiracred.servicedesk.requestTypeId")}",    

"requestFieldValues": {      

"customfield_11141": "${}",      

"customfield_11140": "${reqFields.owner}",     

 "customfield_11142": "${reqFields.submitter}",     

 "customfield_11144": "${reqFields.businessNeeds}",      

"customfield_11145": "${reqFields.behalfOf}",     

 "customfield_11146": "${reqFields.objectives}",      

"customfield_11167": "${reqFields.category}",     

 "customfield_11147": "${reqFields.release}",      

"customfield_11148": "${reqFields.softwareReplaced}",      

"customfield_11221": "${reqFields.businessContact}",      

"customfield_11150": "${reqFields.projectLength}",      

"customfield_11165": "${new Date()}",      

"customfield_11151": "${reqFields.projStartDate}",      

"customfield_11152": "${reqFields.projEndDate}",     

 "customfield_11153": "${reqFields.stakeholders}",      

"customfield_11154": "${reqFields.businessBenefits}",      

"customfield_11155": "${reqFields.risks}",      

"customfield_11156": "${reqFields.inScope}",      

"customfield_11157": "${reqFields.outOfScope}",     

 "customfield_11158": { "value" : "${formatText(        reqFields.revenueImpact      )}" },

0 answers

Suggest an answer

Log in or Sign up to answer
Site Admin

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you