Update Close issue field with JIRA SOAP API

I am trying to update a field of an issue using JIRA API and PHP.

$soapClient = new SoapClient("http://jira.example.com/jira/rpc/soap/jirasoapservice-v2?wsdl");
$token = $soapClient->login('userId', 'passwd') or die('Username/Password is not correct!');
$data = array('fields'=>array('id'=>'customfield_11662','values'=>array('SDLCT-3')));
$soapClient->updateIssue($token,'SDLCT-3', $data)

SDLCT-32 is an CLOSED issue whose customfield_11662 field  is not being updated by the script.

But the script works fine for All the open, inprogress, reopened  issues.


Fatal error:  Uncaught SoapFault exception: 
com.atlassian.jira.rpc.exception.RemoteValidationException: Fields not 
valid for issue: 
Errors: {}
Error Messages: [You do not have permission to edit issues in this 
project.] in 
Stack trace:
 SoapClient->__call('updateIssue', Array)
 SoapClient->updateIssue('9a07eb02153408a...', 'SDLCT-3', Array)
#2 {main}
  thrown in C:\xampp\htdocs\JIRA-Requeste-Migration\updateJiraOldKeyToNewIssue.php on line 9


So can any one suggest me how to solve this error and update the field for closed issues?


Thanks in advance...

1 answer

0 vote

Your setup is such that you cannot edit closed issues.  You either need to remove that flag from the workflow (which will also allow edits in the UI) or re-open the issue to edit it, or add an "edit" style transition to the workflow for your script to use.

(Also, consider moving to the REST interface, as SOAP is deprecated and will be removed soon)

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

246 views 1 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you