Answers.Body: <p>You need to base it on the entire history of activity subjects which is a bit tricky. I'm not sure how to do it in a drupal view.</p>
  
  <p>In pseudocode it would be something like SELECT ChangeCaseStatus activity with MAX(date) earlier than activity date currently being output. If null then Active.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-31T18:33:42.410Z
Answers.Text: Hmm.. haven't figured it out yet. I don't see an option to see the entire history of activity subjects. Seems like when I pull case activities, it is already set to the most recent status.
Answers.UserDisplayName: Kristine
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-31T18:58:58.837Z
Answers.Text: Yeah I don't know how you'd do this in a drupal view. I usually do case reporting separately, so that you have access to run your own SQL where needed.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-26T19:18:50.630Z
Answers.LastActivityDate: 2019-04-27T14:35:15.467Z
Answers.LastEditDate: 2019-04-27T14:35:15.467Z
Answers.UserDisplayName: Demerit
Body: <p>I'm on Drupal 7 and CiviCRM 5.10 (yes, I'll update to 5.12 this weekend). I have a case with multiple case status: Active, Maintenance, Closed. When case activities are entered in the system, it doesn't seem to save the case status at the time the case activity is entered. For example:</p>
  
  <ul>
  <li>4/26/19 Case Opened </li>
  <li>4/26/19 Client meeting</li>
  <li>4/28/19 Case status changed from active to maintainence </li>
  <li>4/30/19 Housing visit</li>
  <li>4/31/19 Housing visit</li>
  </ul>
  
  <p>If I were to create a Views report of the case activities, I see that the case status for 4/26/19 is labeled "Maintenance" but it should "Active" (which is the case status at the time it was entered).</p>
  
  <p>Does anyone know how I could create a report and pull the case status AT the time of the activities entry?</p>
  
Tags: <civicase>
Title: Case Status at a Specific Time
ThreadText: # Case Status at a Specific Time
  
  (Asked by: username_0 on 2019-04-26)
  
  I'm on Drupal 7 and CiviCRM 5.10 (yes, I'll update to 5.12 this weekend). I have a case with multiple case status: Active, Maintenance, Closed. When case activities are entered in the system, it doesn't seem to save the case status at the time the case activity is entered. For example:
  
  * 4/26/19 Case Opened
  * 4/26/19 Client meeting
  * 4/28/19 Case status changed from active to maintainence
  * 4/30/19 Housing visit
  * 4/31/19 Housing visit
  
  If I were to create a Views report of the case activities, I see that the case status for 4/26/19 is labeled "Maintenance" but it should "Active" (which is the case status at the time it was entered).
  
  Does anyone know how I could create a report and pull the case status AT the time of the activities entry?
  
  **Tags:** civicase
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-26. Score: 1 | Accepted answer
  
  You need to base it on the entire history of activity subjects which is a bit tricky. I'm not sure how to do it in a drupal view.
  
  In pseudocode it would be something like SELECT ChangeCaseStatus activity with MAX(date) earlier than activity date currently being output. If null then Active.
  
  > **Comments:**
  > **username_0**: Hmm.. haven't figured it out yet. I don't see an option to see the entire history of activity subjects. Seems like when I pull case activities, it is already set to the most recent status.  
  > **username_1**: Yeah I don't know how you'd do this in a drupal view. I usually do case reporting separately, so that you have access to run your own SQL where needed.  
  
  ---
  
  