Summary: | might be nice to have cookie keep track of patron. | ||
---|---|---|---|
Product: | Koha | Reporter: | Michael Hafen <michael.hafen> |
Component: | Patrons | Assignee: | Chris Cormack <chris> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P2 | CC: | katrin.fischer |
Version: | Main | ||
Hardware: | PC | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: | proposed patches. |
Description
Chris Cormack
2010-05-20 23:38:46 UTC
This could also be done with the session instead of a cookie, and I've changed my code to do so. Michael, do you want to submit a patch for your code tracking active patron in circulation via the session? (In reply to comment #2) I've been thinking about refactoring this feature (because I haven't rebased in a long time) to use the same cookie as the hold button uses. Might be a while before I get to that though, so if someone wants to volunteer to work on it that would make me happy. Michael, could you explain a bit more how this should work? (In reply to Katrin Fischer from comment #4) > Michael, could you explain a bit more how this should work? Sure... I was going to use the cookie tracking from reserves, but I wasn't able to find it. So I'll have to explain this using my own, very out-dated, code. This would effect a few pages: circ/circulation.pl, circ/returns.pl, circ/renew.pl, reserve/request.pl, members/moremember.pl In circulation, request, and moremember you could have code like: $borrowernumber = $query->param('borrowernumber') || $session->param('borrowernumber'); And in all the pages there would be code like: if ( $borrower->{borrowernumber} != $session->param('borrowernumber') { $session->param('borrowernumber', $borrower->{borrowernumber}); } With code like this when a borrower's record is loaded through a search, that borrower's number is stored in the session. After that any access to pages that require a borrower's record to be loaded can present the most recently found borrower by pulling their number from the session instead of the librarian having to search for them. It's most useful in going into the reserves/request.pl page, which is why there is/used to be code to do the same thing using a cookie. I think there are links into moremember from return and renew, so this feature isn't as useful there. Though I have added a link directory to circulation to the top menu, and to the list on the return page so that circulation is one click closer there. (In reply to Michael Hafen from comment #5) > (In reply to Katrin Fischer from comment #4) > > Michael, could you explain a bit more how this should work? > > Sure... I was going to use the cookie tracking from reserves, but I wasn't > able to find it. So I'll have to explain this using my own, very out-dated, > code. > > This would effect a few pages: circ/circulation.pl, circ/returns.pl, > circ/renew.pl, reserve/request.pl, members/moremember.pl > > In circulation, request, and moremember you could have code like: > > $borrowernumber = $query->param('borrowernumber') || > $session->param('borrowernumber'); > > And in all the pages there would be code like: > > if ( $borrower->{borrowernumber} != $session->param('borrowernumber') { > $session->param('borrowernumber', $borrower->{borrowernumber}); > } > > With code like this when a borrower's record is loaded through a search, > that borrower's number is stored in the session. After that any access to > pages that require a borrower's record to be loaded can present the most > recently found borrower by pulling their number from the session instead of > the librarian having to search for them. It's most useful in going into the > reserves/request.pl page, which is why there is/used to be code to do the > same thing using a cookie. I think there are links into moremember from > return and renew, so this feature isn't as useful there. Though I have > added a link directory to circulation to the top menu, and to the list on > the return page so that circulation is one click closer there. This sounds a bit like our 'search to hold' feature. Also there is now a 'last patron' feature (showLastPatron preference). Closing this MOVED, please reopen if you disagree! |