Change Defect Status

Applies to QAComplete 14.4, last modified on June 20, 2024

To update an item in your project, you can send the PUT command to the needed resource to replace the item’s existing contents with new contents, or you can send the PATCH command to update the needed fields of the item.

The example below demonstrates how to use the PATCH command to update the needed fields.

To learn how to use the PUT command to update the entire defect, see Change Defect Properties.

Request

curl -u [email protected]:p@ssword -X PATCH -d @defect.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/rest-api/service/api/v1/projects/11873/defects/12

The defect.txt file contains the description of the defect’s fields to update.

{
  "Title": "Floating toolbar improvements",
  "Status": "Active"
}

Note: The Title and Status parameters are required. Specify them even if you do not need to modify them.

The server will update the specified defect’s fields. The other fields will remain unchanged.

Response

The server will return information on the updated defect:

{
  "id": 12,
  "title": "Floating toolbar improvements",
  "status": "Active",
  "__permissions": {
    "acl": 7
  },
  "act_finish": "0001-01-01T00:00:00.0000000",
  "act_hrs": 0,
  "act_start": "0001-01-01T00:00:00.0000000",
  "assignee_user_id": 0,
  "closed_by": 0,
  "custom_fields": [],
  "date_closed": "0001-01-01T00:00:00.0000000",
  "date_created": "2015-09-07T00:52:27.0700000",
  "date_opened": "2015-09-07T00:52:27.0700000",
  "date_resolved": "0001-01-01T00:00:00.0000000",
  "date_updated": "2015-09-07T00:52:27.0700000",
  "description": "The design of the floating toolbar needs improvement so that it’s clearer what the user needs to do.",
  "est_finish": "0001-01-01T00:00:00.0000000",
  "est_hrs": 0,
  "est_hrs_remaining": 0,
  "est_start": "0001-01-01T00:00:00.0000000",
  "folder_id": 0,
  "import_id": 0,
  "nbr_events": 0,
  "nbr_files": 0,
  "nbr_notes": 0,
  "nbr_tasks": 0,
  "opened_by": 0,
  "opened_by_company": "EDGB",
  "opened_by_email": "[email protected]",
  "opened_by_name": "Smith, John",
  "original_id": 0,
  "owner_name": "Smith, John",
  "owner_user_id": 25264,
  "pct_complete": 0,
  "priority_code": " ",
  "project_id": 11873,
  "resolved_by": 0,
  "severity_code": " ",
  "update_user_id": 25264,
  "user_name": "Smith, John"
}

See Also

QAComplete REST API
/projects/{ProjectId}/defects/{Id} (PATCH)
/projects/{ProjectId}/defects/{Id} (PUT)

Highlight search results