Web Client: entering user surveys UI causes proliferation of pcrud drones

Bug #1728122 reported by Chris Sharp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned
2.12
Fix Released
High
Unassigned

Bug Description

In the 3.0.0 web client, entering Other -> Surveys within a patron account causes a permission check on every response to any survey the user has answered. This appears to be because of the way the fix for bug 1511358 was developed, which uses a pcrud call to flesh the values of all surveys, survey questions, and survey responses associated with the user. See the IRC discussion at http://irc.evergreen-ils.org/evergreen/2017-10-27#i_332043 and following.

This presents an issue that blocks go-live for PINES on the web client.

Evergreen 3.0.0
OpenSRF 3.0.0
PostgreSQL 9.5
Ubuntu 16.04 LTS

Revision history for this message
Chris Sharp (chrissharp123) wrote :

After some further investigation, I can confirm that the current survey code fleshes the responses of any patron who has answered each survey answered by the current user. I'm not sure what the correct solution is though, and I would appreciate eyes from more experienced Angular/JS developers about what should be done.

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

As discussed in IRC, the fleshing is too aggressive here. Putting together a cleanup patch.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
status: New → Confirmed
Revision history for this message
Bill Erickson (berick) wrote :

Fixes pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1728122-survey-response-flesh-repair

From commit:

Avoid collecting survey/question/answer data via deep pcrud fleshing. Opt instead to organize the data locally using the values fleshed directly on the response object.

Additional fixes included:

1. Avoid displaying survey responses for out-of-scope surveys.
2. Format survey response dates using the configured date format instead of displaying a bare ISO date.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
milestone: none → 3.0.2
tags: added: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Minor tidiness fix coming in about 5 minutes...

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

Fix force-pushed. Good to go.

Revision history for this message
Chris Sharp (chrissharp123) wrote :

Tested on PINES data - working as expected and all the craziness has disappeared.

Thanks, Bill!

Signoff branch:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/csharp/lp1728122-survey-response-flesh-repair

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

Pushed to master, rel_3_0, and rel_2_12. Thanks, Bill and Chris!

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

Remote bug watches

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