mutation CloseIncident($incidentId: String!) {
closeIncident(incidentId: $incidentId) {
assigned {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
assignment {
action {
__typename
}
actionId
assignment {
actions {
__typename
}
id
latestAction {
__typename
}
latestActionId
nextAt
nextTraining {
__typename
}
}
assignmentId
present
progressPct
}
canChangeStatus
completedDate
createdAt
dueDate
}
}{
"incidentId": "string"
}{
"data": {
"closeIncident": [
{
"assigned": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
},
"assignment": {
"action": {
"__typename": "Action"
},
"actionId": "id",
"assignment": {
"actions": [
{
"__typename": "ActionToTrainingAssignment"
}
],
"id": "id",
"latestAction": {
"__typename": "Action"
},
"latestActionId": "id",
"nextAt": "value",
"nextTraining": {
"__typename": "Training"
}
},
"assignmentId": "id",
"present": true,
"progressPct": 1
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
}
]
}
}closeIncident
Closes an incident and returns its review task plus any OSHA tasks that closing created. Does nothing and returns an empty list while the incident has no type or severity.
closeIncident(incidentId: String!): [Action!]!Arguments
Id of the incident to close.
Returns
The user the action is assigned to.
The training occurrence this action tracks, for 'TRAINING' actions.
Whether the action can be completed with markActionDone rather than through the module that owns it.
When the action was completed.
When the action was created.
When the action is due.
Id of the action.
Short title of the action.
Notes entered when the action was marked done.
Id of the organization the action belongs to.
Id of the related record: the inspection result for 'FINDING', the incident for 'INCIDENT', the action itself for 'TRAINING' and the equipment for 'EQUIPMENT'.
The kind of record the action belongs to: one of 'INCIDENT' (Incident), 'FINDING' (Inspection finding), 'TRAINING' (Training), 'PERMIT' (Permit), 'INVENTORY' (Inventory) or 'EQUIPMENT' (Equipment).
One of 'TODO' (To do), 'COMPLETED' (Done) or 'IN_PROGRESS' (In progress).
One of 'CORRECTIVE' (Corrective), 'PREVENTIVE' (Preventive), 'TASK' (Task) or 'TRAINING' (Training).
mutation CloseIncident($incidentId: String!) {
closeIncident(incidentId: $incidentId) {
assigned {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
assignment {
action {
__typename
}
actionId
assignment {
actions {
__typename
}
id
latestAction {
__typename
}
latestActionId
nextAt
nextTraining {
__typename
}
}
assignmentId
present
progressPct
}
canChangeStatus
completedDate
createdAt
dueDate
}
}{
"incidentId": "string"
}{
"data": {
"closeIncident": [
{
"assigned": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
},
"assignment": {
"action": {
"__typename": "Action"
},
"actionId": "id",
"assignment": {
"actions": [
{
"__typename": "ActionToTrainingAssignment"
}
],
"id": "id",
"latestAction": {
"__typename": "Action"
},
"latestActionId": "id",
"nextAt": "value",
"nextTraining": {
"__typename": "Training"
}
},
"assignmentId": "id",
"present": true,
"progressPct": 1
},
"canChangeStatus": true,
"completedDate": "value",
"createdAt": "value",
"dueDate": "value"
}
]
}
}