Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-2054

When set a Views with more than one field in SORT CRITERIA the result is sorted only by first field.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.x-1.9
    • Fix Version/s: 7.x-1.10
    • Component/s: Solr Views
    • Labels:
      None

      Description

      When more than one field in SORT CRITERIA of a Views, the query string is wrong:

      ... &sort=dc.date_dt+asc*&*sort=fgs_label_s+asc& ...

      instead of

      ... &sort=dc.date_dt+asc*,*fgs_label_s+asc& ...

      To solve edit islandora_solr_views_query.inc:

      // Add sorting.
      if (isset($this->orderby)) {
      module_load_include('inc', 'islandora_solr', 'includes/utilities');
      // Populate sorting parameters.
      foreach ($this->orderby as $field => $order) {

      • $params['sort'][] = islandora_solr_lesser_escape($field) . ' ' . $order;
        + $sortFields[] = islandora_solr_lesser_escape($field) . ' ' . $order;
        }
        + $params['sort'][] = implode(",",$sortFields);
        }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              giancarlo.birello Giancarlo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: