Answers.Body: <p>For both pages you're talking about it's templates/CRM/Case/Form/Selector.tpl, but what's interesting is that I know case id used to be there. Browsing the code history it looks like it was removed around v4.5, but without investigating further I can't say why. But take a look at 4.4 for example to see how it used to be. It's not sortable there, but might get you started.
  <a href="https://github.com/civicrm/civicrm-core/blob/4.4/templates/CRM/Case/Form/Selector.tpl" rel="nofollow">https://github.com/civicrm/civicrm-core/blob/4.4/templates/CRM/Case/Form/Selector.tpl</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-21T21:02:33.053Z
Answers.LastActivityDate: 2016-07-21T21:02:33.053Z
Answers.UserDisplayName: Demerit
Body: <p>My client makes extensive use of cases, and the case ID is an important identifier. CiviCRM tends to downplay the case ID, however, often placing more emphasis on the case subject, which isn't as helpful to us.</p>
  
  <p>The default results list display when searching for cases does include the case ID in the 'Client' column (along with client name and phone number), and so this results list is not sortable by case ID. If I wanted to edit the template file  that describes this results listing, how could I go about that in order to have the case ID in its own column, and be a sortable column?</p>
  
  <p>We also use the listing of cases visible from the 'Cases' tab of a contact's summary screen. This presents a similar listing of case, but in this instance the case ID is not shown at all. Again, how would I go about changing this display in order to have the case ID in its own column, and be a sortable column?</p>
  
  <p>I've spent a fair bit of time digging into this so far, and to be honest I'm struggling even to identify the correct template files to customise (it feels a bit like going down the rabbit hole in Alice in Wonderland!)</p>
  
Tags: <civicase><custom-templates>
Title: How to change the display of case listings to show and/or sort on case ID
ThreadText: # How to change the display of case listings to show and/or sort on case ID
  
  (Asked by: username_0 on 2016-07-21)
  
  My client makes extensive use of cases, and the case ID is an important identifier. CiviCRM tends to downplay the case ID, however, often placing more emphasis on the case subject, which isn't as helpful to us.
  
  The default results list display when searching for cases does include the case ID in the 'Client' column (along with client name and phone number), and so this results list is not sortable by case ID. If I wanted to edit the template file that describes this results listing, how could I go about that in order to have the case ID in its own column, and be a sortable column?
  
  We also use the listing of cases visible from the 'Cases' tab of a contact's summary screen. This presents a similar listing of case, but in this instance the case ID is not shown at all. Again, how would I go about changing this display in order to have the case ID in its own column, and be a sortable column?
  
  I've spent a fair bit of time digging into this so far, and to be honest I'm struggling even to identify the correct template files to customise (it feels a bit like going down the rabbit hole in Alice in Wonderland!)
  
  **Tags:** civicase, custom-templates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-21. Score: 1
  
  For both pages you're talking about it's templates/CRM/Case/Form/Selector.tpl, but what's interesting is that I know case id used to be there. Browsing the code history it looks like it was removed around v4.5, but without investigating further I can't say why. But take a look at 4.4 for example to see how it used to be. It's not sortable there, but might get you started.
  <https://github.com/civicrm/civicrm-core/blob/4.4/templates/CRM/Case/Form/Selector.tpl>
  
  
  ---
  
  