Wishlist: Add BETWEEN SYMMETRIC feature to reporter

Bug #1846484 reported by Chris Sharp
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned
3.2
Won't Fix
Wishlist
Unassigned
3.3
Won't Fix
Wishlist
Unassigned

Bug Description

One of the most common reports mistakes is that the end user will unwittingly enter the higher value first in a "between" filter, which results in an empty result set, since PostgreSQL accepts those values literally (example, there will be no circulations with a circ date between '2019-10-01' and '2019-09-01'). PostgreSQL offers BETWEEN SYMMETRIC as a solution to this. From the docs:

"BETWEEN SYMMETRIC is like BETWEEN except there is no requirement that the argument to the left of AND be less than or equal to the argument on the right. If it is not, those two arguments are automatically swapped, so that a nonempty range is always implied."

(from https://www.postgresql.org/docs/9.6/functions-comparison.html)

I suggest we alter the SQL builder code to make any "between" or "not between" become "BETWEEN SYMMETRIC" or "NOT BETWEEN SYMMETRIC" in the resulting query. I'm unable to think of a use case where any end user of the Evergreen reporter would want it any other way.

Changed in evergreen:
importance: Undecided → Wishlist
Revision history for this message
Galen Charlton (gmc) wrote :

Noting that BETWEEN SYMMETRIC is available in all Pg versions required by supported versions of Evergreen. I would not be averse to classifying this as a backport-able usability bug.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Chris Sharp (chrissharp123) wrote :
tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.4.1
Changed in evergreen:
milestone: 3.4.1 → 3.4.2
Changed in evergreen:
milestone: 3.4.2 → 3.4.3
milestone: 3.4.3 → 3.5-alpha
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I changed the milestone for this bug to 3.5-alpha because it is classified as Wishlist. I don't think wishlist bugs should be backported.

Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

I'm all for quality of life improvements, especially if they prevent confusion/help desk tickets. Works as advertised. Sign off at user/rogan/lp1846484_symmetric

tags: added: signedoff
Revision history for this message
Bill Erickson (berick) wrote :

Thanks all. Merged to master.

Note I would also be OK with treating this as a bug instead of a wishlist.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
status: Confirmed → Fix Committed
assignee: Bill Erickson (berick) → 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.