actor.org_unit_full_path() discards the assumed row output order

Bug #1851413 reported by Mike Rylander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.4
Fix Released
Medium
Unassigned

Bug Description

Evergreen version: all supported
Postgres version: 9.6 confirmed, probably all

This was originally identified and reported by Erica Rohlfs here at Equinox.

Some code, including UI rendering code in the reporting interfaces, assumes that the order of the full_path stored procedure will be the same as for the ancestors and descendants procedures, which is tree order from top to bottom. However, because the full_path procedure simply UNIONs the other two together without an explicit ORDER BY, that may not be -- and for org hierarchies that have been modified heavily, often is not -- the case in practice. This is due to internals of query planning in Postgres.

The easiest place to see this issues is in the report interface. Select a template folder that is not currently shared, choose Manage Folder, select Share Folder, click Go, and see the dropdown of options. Under some circumstances, the list of org units in the dropdown there are incorrectly ordered (should be from top of the tree down), and some that should be available are disabled.

Watch this space for a forthcoming branch that restores the truth of that assumption by providing an appropriate ORDER BY clause.

Revision history for this message
Mike Rylander (mrylander) wrote :
tags: added: pullrequest reports
Changed in evergreen:
assignee: Mike Rylander (mrylander) → nobody
importance: Undecided → Medium
Changed in evergreen:
milestone: 3.4.2 → 3.4.3
Changed in evergreen:
milestone: 3.4.3 → 3.4.4
Changed in evergreen:
milestone: 3.4.4 → 3.5.2
Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

Took a while to create convoluted report folders on concerto to test it but it worked for me. Sign off at user/rogan/lp1851413_keep_the_path_alive

tags: added: signedoff
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master, rel_3_5, and rel_3_4. Thanks, Mike and Rogan!

Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
status: New → Confirmed
status: Confirmed → Fix Committed
assignee: Galen Charlton (gmc) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.