web client: grid columns aren't displaying in order specified in tt2 files

Bug #1731278 reported by Kathy Lussier on 2017-11-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Low
Unassigned
3.0
Undecided
Unassigned
3.1
Low
Unassigned
3.2
Undecided
Unassigned

Bug Description

When manually adding specific columns to display in a web client grid, the columns should display in the order in which they were entered. However, this isn't happening. As an example, in t_checkin_table.tt2, we specify the following fields to display by default:

Alert Msg
Balance Owed
Barcode
Bill #
Checkin Date
Family Name
Finish
Location
Route To
Start
Title
Circulation Modifier
Circulation Library

However, when retrieving the checkin interface, these fields display in the following order:

Alert Msg
Start
Route To
Title
Location
Checkin Date
Bill #
Family Name
Finish
Circulation Modifier
Barcode
Balance Owed
Circulation Library

Remington Steed (rjs7) wrote :

After deleting my browser grid settings (via eg/staff/admin/workstation/stored_prefs), on a 3.1-beta server, I'm seeing something similar to this bug on Chrome (though not the same order of columns that Kathy described). But in Firefox I see exactly the expected columns in expected order. Some research revealed that JavaScript sort in Firefox is stable, while it is unstable in Chrome. This means our current column-sorting code relies on browsers to maintain sort order of "equal" columns during the sort process, but some browsers don't play along. The solution is for us to explicitly track and maintain the column order that we want. Dan Wells has a branch for this, coming soon.

Changed in evergreen:
status: New → Confirmed
Dan Wells (dbw2) wrote :

Here is a branch:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbwells/lp1731278_preserve_explicit_column_sort

working/user/dbwells/lp1731278_preserve_explicit_column_sort

Overall, I do wonder whether sorting during every 'expandPath' is a good way to go, but changing that would greatly expand the scope of this fix. Any opinions on that?

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.1-rc
Dan Wells (dbw2) on 2018-03-20
Changed in evergreen:
importance: Undecided → Low
Changed in evergreen:
milestone: 3.1-rc → 3.1.1
Changed in evergreen:
milestone: 3.1.1 → 3.1.2
Changed in evergreen:
milestone: 3.1.2 → 3.1.3
Kathy Lussier (klussier) wrote :

This works for me. Because Dan had an outstanding question on the implementation, I have pushed my signoff to the working repo. I'm in favor of getting the current fix in rather than expanding the scope.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/kmlussier/lp1731278_preserve_explicit_column_sort_signoff

tags: added: signedoff
Changed in evergreen:
milestone: 3.1.3 → 3.1.4
Changed in evergreen:
milestone: 3.1.4 → 3.1.5
Changed in evergreen:
milestone: 3.1.5 → 3.1.6
Changed in evergreen:
milestone: 3.1.6 → 3.2.1
Changed in evergreen:
milestone: 3.2.1 → 3.2.2
Changed in evergreen:
milestone: 3.2.2 → 3.2.3
Changed in evergreen:
milestone: 3.2.3 → 3.3-beta1
status: Confirmed → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers