Defect #9599

JSON REST API : How do i update 'issue status'

Added by Francis West about 8 years ago. Updated about 8 years ago.

Status:ClosedStart date:2011-11-18
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:Invalid Affected version:

Description

I am trying to close a ticket via the JSON REST api,

ticket['issue']['status'] shows me {u'id': 1, u'name': u'New'}

if i change this to something else the rest of the ticket updates. however the status remains the same, the user can change the status via the web ui, so this shouldn't be a permissions issue.

for example I set:

{u'id': 5, u'name': u'Closed'}

History

#1 Updated by Jean-Philippe Lang about 8 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

You can change the status by setting status_id to the appropriate status id.

#2 Updated by Francis West about 8 years ago

  • Status changed from Closed to Reopened

sorry to reopen, but I've tried using status_id thus:

x['issue']['status_id'] = 3 or 'Closed'

do i need to delete x['issue']['status'] ? I've also tried that to no avail!

no changes occur, not errors are report, no HTTP status codes other than 200, nothing in the logs to say if any action was taken or not.

please help!

#3 Updated by Mischa The Evil about 8 years ago

  • Status changed from Reopened to Closed

Francis West wrote:

sorry to reopen, but I've tried using status_id thus:

x['issue']['status_id'] = 3 or 'Closed'

do i need to delete x['issue']['status'] ? I've also tried that to no avail!

no changes occur, not errors are report, no HTTP status codes other than 200, nothing in the logs to say if any action was taken or not.

please help!

Please move further discussion to How to update issue status/priority using Rest API? since it should be implemented already as JPL stated thus making it a possible syntax problem.

Also available in: Atom PDF