CRM-6080 Sort activities in case listing by date as default

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.3
    • Fix Version/s: None
    • Component/s: CiviCase
    • Labels:
      None

      Description

      The default CaseView.tpl doesn't specify a default sort on the activity listing. Since we're building a timeline it only make sense to me to load the activities sorted by date to begin with. Added new lines 513 and 514:
      sortname: 'display_date',
      sortorder: 'asc',
      to the flexigrid definition to effect this...

        Attachments

          Activity

          [CRM-6080] Sort activities in case listing by date as default
          David Greenberg added a comment -

          There is a default sort for this list which was spec'd by folks at Physician Health Program and seems to work well for them. The pattern is:

          • Scheduled activities by date ascending
          • followed by Completed activities by date descending

          The intent is to show what's coming up next (scheduled) on top, then below to show history of completed activities from most recently completed.

          Shawn P. Duncan added a comment -

          Where is that specified? I'd be quite happy with that. I don't see the result that way on demo.civicrm.org either. I just went to verify, and opened a demo case that already existed: http://drupal.demo.civicrm.org/civicrm/contact/view/case?action=view&reset=1&id=13&cid=151&context=home

          Screen shot from demo attached. The current default for Scheduled activities is date *descending* which is what motivated my concern.

          Dave D added a comment -

          I think it was OVERDUE ones by date ascending, then the rest by date descending.
          It would be in BAO/Case.php

          Kurund Jalmi added a comment -

          Right, by default it is ORDER BY overdue_date ASC, activity_date DESC, ca.id DESC . It's in CRM/Case/BAO/Case.php line 887

            People

            • Assignee:
              David Greenberg
              Reporter:
              Shawn P. Duncan

              Dates

              • Created:
                Updated:
                Resolved: