Reports: Org Unit Selector Widget Sort Order

Bug #1479531 reported by Josh Stompro on 2015-07-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned

Bug Description

The Org Unit selector widget that comes up when a base filter of an org unit is set to "In List" displays the short code for the OU, but is sorted by the long name.

This can cause unusual results if your short codes don't follow closely with your long name settings for org units.

We were trying to group the short codes a certain way by including a prefix, to make it easier to select those OU's as a group when creating reports, but since they are sorted by the "name" and not the short code, it didn't work out.

I think it would be beneficial for the org unit selection box to sort by the displayed field, which for now is the short code.

Josh

Erica Rohlfs (erohlfs) wrote :

Confirmed in version 2.8.2

Changed in evergreen:
status: New → Confirmed

Sorry for not including the version info.

We are running EG 2.8.2 also.

It looks like the org unit widgets calls open-ils.actor:open-ils.actor.org_tree.retrieve which returns the org units ordered by the name.
https://github.com/evergreen-library-system/Evergreen/blob/master/Open-ILS/web/reports/oils_rpt_widget.js#L298

Would it be better to modify open-ils.actor:open-ils.actor.org_tree.retrieve so it takes an argument for which type of sort to do? Or would it be better to sort the org tree once it is returned to the report module?

I'm leaning toward modifying open-ils.actor:open-ils.actor.orge_tree.retrieve since this issue could happen in other instances where the short code is displayed vs the name. But I'm biased because I don't know javascript very well, while the changes to the perl code look simple.

Josh

Jane Sandberg (sandbej) on 2018-03-22
tags: added: sorting
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers