Editable Checkout History

Bug #1312699 reported by Tim Spindler
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

We are looking for a feature for patrons to better manage their checkout history including the ability to remove items from the checkout history and allow for sorting of the checkout history. Attached is a functional specification we created.

Revision history for this message
Tim Spindler (tspindler-cwmars) wrote :
Revision history for this message
Holly Brennan (hollyfromhomer) wrote :

I really like this! As a new-ish Evergreen library I haven't heard much feedback about how patrons use the Checkout history. But as a patron myself, I would really enjoy the flexibility offered with this proposed feature. I wouldn't have to download the Excel spreadsheet to sort and edit my list!

Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Dan Pearl (dpearl) wrote :

I am working on this, and my approach veers towards simplicity. The patron will have the ability to designate items in the history list for removal. The "removal" is not strictly removal (internally): it will just prevent the items from being seen by the patron on their history list (displayed or downloaded).

The implementation adds a boolean to the circ record to indicate when the patron has "removed" it.

The design does not delete or anonymize circs. The circ history will be as available to librarians as it is now. If the patron opt out of history tracking, then the purge_circulations function will delete the eligible circs exactly as it does now.

Dan Pearl (dpearl)
Changed in evergreen:
assignee: nobody → Dan Pearl (dpearl)
Revision history for this message
Dan Pearl (dpearl) wrote :

This seems to do the job, albeit in a basic way. It does not do filtering by media type; it is just a "delete this item from my view" facility.

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

Revision history for this message
Kathy Lussier (klussier) wrote : Re: [Bug 1312699] Re: Editable Checkout History

Hi Dan,

Is this ready for a pullrequest tag?

Thanks!
Kathy

  On 11/21/2014 9:24 AM, Dan Pearl wrote:
> This seems to do the job, albeit in a basic way. It does not do
> filtering by media type; it is just a "delete this item from my view"
> facility.
>
> http://git.evergreen-
> ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dpearl/hist_edit
>

Revision history for this message
Tim Spindler (tspindler-cwmars) wrote :

Kathy,

We have done testing on a dev server but have not had a chance to do any with production data.

Tim

Dan Pearl (dpearl)
tags: added: pullrequest
Kathy Lussier (klussier)
Changed in evergreen:
assignee: Dan Pearl (dpearl) → nobody
milestone: none → 2.next
Revision history for this message
Kathy Lussier (klussier) wrote :

Hi Dan,

I loaded this code on a VM with a clean Evergreen install, but I'm getting an Internal Server error whenever I tried to access the patron's Check Out history.

Kathy

Changed in evergreen:
assignee: nobody → Josh Stompro (u-launchpad-stompro-org)
Kathy Lussier (klussier)
tags: added: needrepatch
removed: pullrequest
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I got the same 500 internal server error, I tracked it down to some html accidentally being included in a tt2 code block in
/openils/var/templates/opac/myopac/circ_history.tt2

Specifically this bit

                 [% FOR circ IN ctx.circs;
                     attrs = {marc_xml => circ.marc_xml};
+ <td align="center" style="text-align:center;">
+ <input type="checkbox" name="circ_id" value="[% circ.circ.id %]" />
+ </td>
                     PROCESS get_marc_attrs args=attrs; %]
                     <tr>

If you move those 3 lines out of the tt2 code block the page gets parsed successfully.

This patch still needs html formatting work though, the layout doesn't quite make sense yet. I think there should be a new column for the checkbox, which I think was intended, but the html for the table isn't in the correct place.

I'll take a stab at cleaning it up.

The functionality works fine, I'm able to delete (hide) individual items. I think it would be good to have an extra confirmation dialog since there is no user accessible way to undo the hide, especially if someone uses the select all.

Josh

Revision history for this message
Ben Shum (bshum) wrote :

Retagging for conformity.

tags: added: needsrepatch
removed: needrepatch
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

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

Here is a branch that fixes the internal server error.

tags: added: pullrequest
removed: needsrepatch
Changed in evergreen:
assignee: Josh Stompro (u-launchpad-stompro-org) → nobody
Kathy Lussier (klussier)
Changed in evergreen:
assignee: nobody → Kathy Lussier (klussier)
Revision history for this message
Kathy Lussier (klussier) wrote :

Thank you Dan for the initial code and Josh for fixing the internal server error! I loaded the code on a new Evergreen installation, and it worked as expected. However, I noticed a typo on line 47 of the upgrade script - ETURN instead of RETURN.

Once the upgrade script is fixed, I'll sign off on the code.

tags: added: needsrepatch
removed: pullrequest
Revision history for this message
Kathy Lussier (klussier) wrote :
tags: added: pullrequest
removed: needsrepatch
tags: added: signedoff
Kathy Lussier (klussier)
Changed in evergreen:
milestone: 2.next → 2.9-beta
assignee: Kathy Lussier (klussier) → nobody
Revision history for this message
Ben Shum (bshum) wrote :

Hmm, the upgrade script seems to be broken. Looks like a cut off function at the end before the last COMMIT;

Also, for an upgrade script, it's generally recommended to use one BEGIN; COMMIT; so that everything is in the same transaction. You can look at lots of examples for that in other upgrade scripts in the directory.

Setting this aside to do better re-testing with the upgrade scripts and pushing off to 2.next. Next time, folks...

tags: added: needsrepatch
removed: pullrequest
Changed in evergreen:
milestone: 2.9-beta → 2.next
status: Triaged → Incomplete
assignee: nobody → Dan Pearl (dpearl)
Revision history for this message
Dan Pearl (dpearl) wrote :

I will take care of these issues.

Revision history for this message
Dan Pearl (dpearl) wrote :
Changed in evergreen:
status: Incomplete → In Progress
tags: added: pullrequest
removed: needsrepatch
tags: removed: signedoff
Kathy Lussier (klussier)
Changed in evergreen:
assignee: Dan Pearl (dpearl) → nobody
status: In Progress → Triaged
Changed in evergreen:
assignee: nobody → Josh Stompro (u-launchpad-stompro-org)
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I just tested this code in a new master build. The functionality seems to work just fine.

Sorting seems to work just fine. Deleting titles seems to work fine. Deleted titles are excluded from the csv export.

I don't think that the fact that sorting was added is in the release notes, I'll add that. That is the feature that our staff and customers are really waiting for, I don't think it should go unmentioned.

Next I'll try adding the feature to a 2.8.4 system to make sure the upgrade works.
Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Nevermind about the sorting, I see now that is a separate feature, LP# 1086934 https://bugs.launchpad.net/evergreen/+bug/1086934 that was released with 2.9.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I tested upgrading a 2.8.4 system with this code, the upgrade script worked fine and the functionality worked like it should. There was a minor merge issue because 2.8.4 doesn't have the sorting enhancement, but it wasn't difficult to fix.

Signoff branch at
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp1312699_history_edit_signoff

tags: added: signedoff
Changed in evergreen:
assignee: Josh Stompro (u-launchpad-stompro-org) → nobody
Revision history for this message
Kathy Lussier (klussier) wrote :

Removing pullrequest tag on this one because it will need to be reworked due to the recent merge of bug 1527342. A change will be needed so that, when a user chooses to delete a title, it should remove the row from action.usr_circ_history instead of setting a delete flag in action.circulation.

tags: removed: pullrequest signedoff
Revision history for this message
Jake Litrell (jake-3) wrote :

Couple of modifications to scan through - this is from speaking with Kathy and based on Dan's work. Some modifications to the wrapper form on the patron's Checkout History page; that calls (and piggybacks on) the 'clear' function bits, which now take an optional list of circ IDs. That can be split out easily enough if need be, I think.

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

Demo at https://mlnc3.mvlcstaff.org/eg/opac/myopac/circ_history

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

I've taken a look at the most recent iteration of this code, and it works for me. I've signed off on it and pushed it to the working repo:

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

Adding a pullrequest tag back on this one. Since Jake and I work for the same organization, I didn't merge it directly to master, but I also think it's a good idea for somebody else to put their eyes on this one before it goes in.

tags: added: pullrequest
Revision history for this message
Ben Shum (bshum) wrote :

Tested and works for me too. Grabbed everything and pushed it along to master.

Thanks Dan, Jake and Kathy!

Changed in evergreen:
status: Triaged → Fix Committed
milestone: 2.next → 2.10-beta
Changed in evergreen:
status: Fix Committed → Fix Released
Revision history for this message
Jason Etheridge (phasefx) wrote :

just noticed that there are two "my $circ_ids" in sub handle_circ_update that throws warnings

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.