Answers.Body: <p>I'd suggest this is a question of whether there should be low-level and high-level variations of the API. Typically a low-level api is not aware of the semantics (e.g. what "closed" means in real life - it just sets the right field to the value given), whereas the higher level api might. So should there be a separate higher-level function that knows it should call three low-level api functions when "closed", and let the lower-level functions only do one thing each.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-02T21:22:03.817Z
Answers.LastActivityDate: 2017-02-02T21:22:03.817Z
Answers.UserDisplayName: Demerit
Body: <p>When I change the case status with the API to a case stated which is Closed. Then the end date of the case and the end date of the case roles is not set. </p>
  
  <p>When I change the case status from the user interface the end date is set and the end of the case roles is set. </p>
  
  <p>Is this behaviour correctly or should I file an issue and solve the bug in the API? </p>
  
Tags: <api><civicase>
Title: Case status change to a closed status does not update the end date and relationships of the case
ThreadText: # Case status change to a closed status does not update the end date and relationships of the case
  
  (Asked by: username_0 on 2017-01-31)
  
  When I change the case status with the API to a case stated which is Closed. Then the end date of the case and the end date of the case roles is not set.
  
  When I change the case status from the user interface the end date is set and the end of the case roles is set.
  
  Is this behaviour correctly or should I file an issue and solve the bug in the API?
  
  **Tags:** api, civicase
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-02-02. Score: 1
  
  I'd suggest this is a question of whether there should be low-level and high-level variations of the API. Typically a low-level api is not aware of the semantics (e.g. what "closed" means in real life - it just sets the right field to the value given), whereas the higher level api might. So should there be a separate higher-level function that knows it should call three low-level api functions when "closed", and let the lower-level functions only do one thing each.
  
  
  ---
  
  