Web Staff Client - Boolean Filters in Reporter

Bug #1642337 reported by Terran McCanna
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.1
Fix Released
Medium
Unassigned
3.2
Fix Released
Medium
Unassigned

Bug Description

Boolean filters in the Reports interface no longer give the prompt to "Click OK for TRUE and Cancel for FALSE." Instead, the user has to know what value to type in. (See screenshot.)

Revision history for this message
Terran McCanna (tmccanna) wrote :
Revision history for this message
Kathy Lussier (klussier) wrote :

A dropdown menu or radio buttons with the True / False values would work well here.

Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Jason Boyer (jboyer) wrote :

Given that the egConfirmDialog allows the OK and Cancel button labels to be changed, it could be used so the user can actually click True or False buttons, making things even simpler.

Revision history for this message
Kyle Huckins (khuckins) wrote :

Going on Jason's suggestion, I've pushed up a branch that resolves this issue: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/khuckins/lp1642337-boolean-filters-in-reporter

OK and Cancel buttons have been changed to "True" and "False"(using the values of TEMPLATE_CONF_TRUE and TEMPLATE_CONF_FALSE respectively), and change the value of boolean filters to true or false. This is conditional on the datatype being a boolean, so other filter types will still bring up the egPromptDialog as usual.

Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
tags: added: pullrequest
Changed in evergreen:
assignee: Kyle Huckins (khuckins) → nobody
Revision history for this message
Kathy Lussier (klussier) wrote :

Thanks for your work on this Kyle! It mostly worked for me, but I did encounter a bit of odd behavior when trying to change a boolean value.

If the value is set to 'true' and I select the option to change the value, the dialog doesn't appear for me. Instead, I jump up a bit in the screen and nothing happens to the boolean field. If no value is set or if it is set to false, the dialog appears as expected with the True / False options. I created a screencast here showing the behavior - https://drive.google.com/file/d/1Kx24DWJA5hUkEst7X8pgBuN1lXGqT2TK/view

I see the following in the Console when this occurs:

angular.js:14199 TypeError: c.replace is not a function
    at g (angular.js:12442)
    at k (angular.js:12595)
    at new $uibModal.open.controller (ui.js:416)
    at Object.invoke (angular.js:4771)
    at R.instance (angular.js:10592)
    at ui-bootstrap-tpls.min.js:2
    at angular.js:16696
    at m.$eval (angular.js:17994)
    at m.$digest (angular.js:17808)
    at b.$apply (angular.js:18102)

Kathy Lussier (klussier)
tags: added: needsrepatch
removed: pullrequest
Revision history for this message
Jason Boyer (jboyer) wrote :

Kyle's branch was on the right track, but egConfirmDialog doesn't like it when the message param isn't a string. Here's a branch that signs off on his commit and adds one that turns bools into strings before sending the value to the dialog. It also adds an <Unset> string to the Reporter strings that can be used more in the future as the UI is polished up. (or stripped out entirely as it's currently used only once.)

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

tags: added: pullrequest
removed: needsrepatch webstaffclient
Changed in evergreen:
milestone: none → 3.3-beta1
Changed in evergreen:
milestone: 3.3-beta1 → 3.3-rc
Changed in evergreen:
milestone: 3.3-rc → 3.3.1
Changed in evergreen:
milestone: 3.3.1 → 3.3.2
Revision history for this message
Galen Charlton (gmc) wrote :

I've signed off on the two patches and pushed a follow-up to

working/user/gmcharlt/lp1642337_reporter_bool_filters
https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/gmcharlt/lp1642337_reporter_bool_filters

The follow-up fixes a problem where reports with a Boolean filter set wouldn't actually work (as the report generator expects "t" or "f" rather than JSON booleans) and makes the display of the current value more human-readable.

tags: added: signedoff
Revision history for this message
Dawn Dale (ddale) wrote :

I have tested this code and consent to signing off on it with my name, Dawn Dale and my email address, <email address hidden>

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

Thanks for doing the final testing, Dawn.

I've pushed this to master, rel_3_3, rel_3_2, and rel_3_1. Thanks, Kyle, Jason, and Dawn!

Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
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

Bug attachments

Remote bug watches

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