# system.kanoa.operators.endOperatorShiftAssignment(operatorShiftAssignmentId, endDate, userId)

Ends an operator shift assignment by setting its endDate - does not delete the assignment record.

---
### Parameters
**operatorShiftAssignmentId** `Integer`<br />
**endDate** `String`<br />
**userId** `Integer`: The user performing this action (changedBy)<br />

---
### Returns
**rowsAffected** `Integer` records modified - 0 if operatorShiftAssignmentId didn't exist, or on failure<br />
**message** `String` None on success, an error message on failure<br />

---
### Example
```python
operatorShiftAssignmentId = 3
endDate = system.date.now()
userId = 12
rowsAffected, message = system.kanoa.operators.endOperatorShiftAssignment(operatorShiftAssignmentId, endDate, userId)
```
