It would be nice (per a patron) if there was a way for patrons to enter a note about the item they have checked out - this DVD is scratched - the binding was torn - etc. Then this note emails to the library and shows up at check in so the librarian knows that the item is damages or has an issue.
Created attachment 41801 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summery" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in.
Created attachment 41921 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summery" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in. Obsoletes: 41801 - Bug 14224: Allow patron notes about item shown at check in
CONFLICT (content): Merge conflict in opac/opac-user.pl CONFLICT (content): Merge conflict in C4/Circulation.pm Tests are missing for the new subroutine. GetIssues which takes issue_id is more a GetIssue subroutine, don't you think? Why are you doing an ajax request? It won't work if the user does not have javascript enabled.
Hi Jonathan, Do you think it's worth adding a new subroutine GetIssue for this special case of GetIssues? GetIssues will still return an arrayref when called with issue_id, so the return type matches the plural "s" at least. I'm doing an ajax request to minimize overhead when sending the request (i.e. no need to send note data for all issues when only one has been changed) and when recieving (i.e. no need to render a new template and send a whole document when only an "ok" or "nok" is needed). And as a bonus it allows the user to write a second note while the first one is beeing sent/processed to the server. To be honest I thought javascript was concidered a requirment for Koha. I'm using NoScript myself, and am always positivly surprised when a page works without having to enable javascript. How about keeping the ajax-version and adding a fallback for browsers without javascript?
(In reply to Martin Stenberg from comment #4) > Hi Jonathan, > > Do you think it's worth adding a new subroutine GetIssue for this special > case of GetIssues? GetIssues will still return an arrayref when called with > issue_id, so the return type matches the plural "s" at least. GetIssue would not return an array, but the matching issue. > I'm doing an ajax request to minimize overhead when sending the request > (i.e. no need to send note data for all issues when only one has been > changed) and when recieving (i.e. no need to render a new template and send > a whole document when only an "ok" or "nok" is needed). And as a bonus it > allows the user to write a second note while the first one is beeing > sent/processed to the server. > > To be honest I thought javascript was concidered a requirment for Koha. I'm > using NoScript myself, and am always positivly surprised when a page works > without having to enable javascript. > > How about keeping the ajax-version and adding a fallback for browsers > without javascript? You can add 2 forms in the page, the one needing JS can be hidden with a css rule. When the page is loading, a JS code could hide one and display the other one. I suppose it's the way to go.
Additional note: the ajax part should be moved to svc/ and some of this code put in a subroutine.
Created attachment 56682 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summery" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in. =============================================================================== NOTE: - This patch is not yet ready for testing. This patch fixes merge conflicts and fixes the atomic update so this the database updates correctly. - Still to do: - GetIssue/GetIssues - subroutine for ajax code - moving ajax part to svc/ Sponsored-by: Catalyst IT
(In reply to Aleisha Amohia from comment #7) > - Still to do: > - GetIssue/GetIssues > - subroutine for ajax code > - moving ajax part to svc/ and tests for new subroutines.
Created attachment 57440 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in. =============================================================================== NOTE: - This patch is still not ready for testing - am committing and attaching just to keep track of my changes. - So far I have moved the ajax code into svc/patron_notes. - I have also made use of the built-in letters and notices functions to send this email etc (easier to test, removes a lot of unnecessary code etc), so I have removed the opac-sendissuenote.tt file and instead added a note to the database in 'letters' table which will be added to the message queue when the note is submitted. - Testing: - Schema needs to be rebuilt before testing - Turn on 'AllowIssueNote' syspref - Show message_queue in mysql to test the notice is being sent - Still to do: - GetIssue/GetIssues - tests for new subroutines - fallback form for browsers without JS - New ideas: - Also came up with the idea to add the comments to the staff client dashboard (the way suggestions and patron detail updates show up on the main page) so librarians can mark notes as 'seen' Sponsored-by: Catalyst IT
Created attachment 57577 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in. =============================================================================== UPDATE 3: - This patch is still not ready for testing - am committing and attaching just to keep track of my changes. - So far I have - moved the ajax code into svc/patron_notes. - made use of the built-in letters and notices functions to send this email etc (easier to test, removes a lot of unnecessary code etc), so I have removed the opac-sendissuenote.tt file and instead added a note to the database in 'letters' table which will be added to the message queue when the note is submitted - GetIssue subroutine to return the matching issue - Created a new GetPatronNote subroutine to fetch the notes on the circulation.pl page (previously the librarian could only see the note on checkin on the returns.pl page, which is not the only place you can check in) - Testing: - Schema needs to be rebuilt before testing - Turn on 'AllowIssueNote' syspref - Show message_queue in mysql to test the notice is being sent - Still to do: - tests for new subroutines - fallback form for browsers without JS - Show patron notes on the staff client dashboard (the way suggestions and patron detail updates show up on the main page) so librarians can mark notes as 'seen' Sponsored-by: Catalyst IT
Hi Aleisha, The getter and setter subroutines (GetIssue, SetIssueNote, SendIssueNote, GetPatronNote) should not be added to C4 but use Koha::Issue[s] instead. Let me know if you need help to do so. And you won't have to provide new tests ;) Ideally the svc script should not be added, but you should use the REST API instead. However the routes for checkins do not exist yet.
Created attachment 57763 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in. =============================================================================== UPDATE 4: - This patch is still not ready for testing - am committing and attaching just to keep track of my changes. - So far I have - moved the ajax code into svc/patron_notes. - made use of the built-in letters and notices functions to send this email etc (easier to test, removes a lot of unnecessary code etc), so I have removed the opac-sendissuenote.tt file and instead added a note to the database in 'letters' table which will be added to the message queue when the note is submitted - GetIssue subroutine to return the matching issue - Created a new GetPatronNote subroutine to fetch the notes on the circulation.pl page (previously the librarian could only see the note on checkin on the returns.pl page, which is not the only place you can check in) - Moved getter and setter subroutines into Koha::Issue (as per Jonathan's comments in Comment 11) - Testing: - Schema needs to be rebuilt before testing - Turn on 'AllowIssueNote' syspref - Show message_queue in mysql to test the notice is being sent - Still to do: - fallback form for browsers without JS - Show patron notes on the staff client dashboard (the way suggestions and patron detail updates show up on the main page) so librarians can mark notes as 'seen' Sponsored-by: Catalyst IT
(In reply to Jonathan Druart from comment #11) > Hi Aleisha, > The getter and setter subroutines (GetIssue, SetIssueNote, SendIssueNote, > GetPatronNote) should not be added to C4 but use Koha::Issue[s] instead. Let > me know if you need help to do so. > And you won't have to provide new tests ;) > Ideally the svc script should not be added, but you should use the REST API > instead. However the routes for checkins do not exist yet. Hi Jonathan, My latest patch moves those subroutines into Koha::Issue. Are you sure we don't need tests? I think we'll leave the svc stuff in the checkins file for now while the routes for checkins do not exist. I will now be working on the fallback form for browsers without JS.
(In reply to Aleisha Amohia from comment #13) > (In reply to Jonathan Druart from comment #11) > > Hi Aleisha, > > The getter and setter subroutines (GetIssue, SetIssueNote, SendIssueNote, > > GetPatronNote) should not be added to C4 but use Koha::Issue[s] instead. Let > > me know if you need help to do so. > > And you won't have to provide new tests ;) > > Ideally the svc script should not be added, but you should use the REST API > > instead. However the routes for checkins do not exist yet. > > Hi Jonathan, > > My latest patch moves those subroutines into Koha::Issue. Are you sure we > don't need tests? By using Koha::Issue I meant using it as an object (so no need to add you subroutine to the module). For instance: $issue = Koha::Issue::GetIssue({issue_id => $issue_id}); could be $issue = Koha::Issues->find( $issue_id); and $issue becomes a Koha::Object-based object, not an hashref SetIssueNote($issue_id, $clean_note) could be Koha::Issues->find( $issue_id )->set({ notedate => dt_from_string, note = $clean_note })->store; etc.
Created attachment 57802 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Run updatedatabase 3) Make sure the branch has an email address specified 4) Check out an item to a patron 5) Log in with the patron you checked out the item for 6) In "your summery", write a message in the new "Note" field for the item checked out. Hit ENTER to save/send. 7) Success message should be seen and an email sent to the email address specified for the branch which the item was checked out from. 8) Log in with staff account and check in the item 9) The note should be shown The note can be changed by the patron at any time while the item is checked out. Each change will send a new email to the branch. Only the latest note version will be shown on check in. =============================================================================== UPDATE 5: - This patch is still not ready for testing - am committing and attaching just to keep track of my changes. - So far I have - moved the ajax code into svc/patron_notes. - made use of the built-in letters and notices functions to send this email etc (easier to test, removes a lot of unnecessary code etc), so I have removed the opac-sendissuenote.tt file and instead added a note to the database in 'letters' table which will be added to the message queue when the note is submitted - GetIssue subroutine to return the matching issue - Created a new GetPatronNote subroutine to fetch the notes on the circulation.pl page (previously the librarian could only see the note on checkin on the returns.pl page, which is not the only place you can check in) - Fallback form for when JS is deactivated - Testing: - Schema needs to be rebuilt before testing - Turn on 'AllowIssueNote' syspref - Show message_queue in mysql to test the notice is being sent - Test with and without JS - will provide instructions for this later - Still to do: - Making use of Koha::Issue[s] as per Comment 11 and Comment 14 - Show patron notes on the staff client dashboard (the way suggestions and patron detail updates show up on the main page) so librarians can mark notes as 'seen' - will do in a new patch when this is complete Sponsored-by: Catalyst IT
(In reply to Jonathan Druart from comment #14) > By using Koha::Issue I meant using it as an object (so no need to add you > subroutine to the module). > For instance: > $issue = Koha::Issue::GetIssue({issue_id => $issue_id}); > could be > $issue = Koha::Issues->find( $issue_id); > and $issue becomes a Koha::Object-based object, not an hashref > > SetIssueNote($issue_id, $clean_note) > could be > Koha::Issues->find( $issue_id )->set({ notedate => dt_from_string, note = > $clean_note })->store; > > > etc. Hi Jonathan, I'm having issues using Koha::Issues->find($issue_id). I'm receiving this error: Can't locate object method "_new_from_dbic" via package "Koha::Issue" at /home/vagrant/kohaclone/Koha/Objects.pm line 87 Do you know what could be causing this? Aleisha
(In reply to Aleisha Amohia from comment #16) > Hi Jonathan, > > I'm having issues using Koha::Issues->find($issue_id). > I'm receiving this error: > Can't locate object method "_new_from_dbic" via package "Koha::Issue" at > /home/vagrant/kohaclone/Koha/Objects.pm line 87 > Do you know what could be causing this? > > Aleisha Hi Aleisha, I have tried this small snippet: use Koha::Issues; my $issue = Koha::Issues->find(1); say $issue->branchcode; and it works as expected. Do you have a small part of code to recreate the error you got?
(In reply to Jonathan Druart from comment #17) > Hi Aleisha, > I have tried this small snippet: > use Koha::Issues; > my $issue = Koha::Issues->find(1); > say $issue->branchcode; > and it works as expected. > Do you have a small part of code to recreate the error you got? use Koha::Issues; my $issue_id = $query->param('issue_id'); if ( $issue_id =~ /\d+/ ) { $issue = Koha::Issues->find($issue_id); } This returns the error. I have checked that issue_id is being assigned correctly and it is, so can't work out what I'm doing wrong.
(In reply to Aleisha Amohia from comment #18) That should work. Do you have a patch applying against master I could test to recreate the problem?
(In reply to Jonathan Druart from comment #19) > (In reply to Aleisha Amohia from comment #18) > > That should work. Do you have a patch applying against master I could test > to recreate the problem? Feel free to try with the most recent patch here.
Created attachment 57829 [details] [review] Bug 14224: Just a try with Koha::Issues->find
(In reply to Aleisha Amohia from comment #20) > (In reply to Jonathan Druart from comment #19) > > (In reply to Aleisha Amohia from comment #18) > > > > That should work. Do you have a patch applying against master I could test > > to recreate the problem? > > Feel free to try with the most recent patch here. It works as expected for me. Your try :)
(In reply to Jonathan Druart from comment #22) > It works as expected for me. > Your try :) Have no idea why that exact thing hasn't been working for me on multiple different dev boxes. Will try it again when I get into work tomorrow. Thanks :)
Created attachment 57853 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database - perl installer/data/mysql/updatedatabase.pl 3) (You may have to rebuild schema but I think the patch should apply the schema changes for you) 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows. Sponsored-by: Catalyst IT
I have tried it, but I get the following error: https://postimg.org/image/wj3mqhszj/ on plack.log No property note for Koha::IssueNo property notedate for Koha::IssueNo property notedate for Koha::IssueNo property notedate for Koha::Issue Tested on KohadevBox debian jessy 8
Fixed the previous error (cache error) tested and signed
Aleisha, Have a look at your patches, there are some weird stuffs to fix: 1/ kohastructure: you re-add the entire item table 2/ update db: you should specify the "after" sql clause to keep the same order as the kohastructure (not necessary useful but good practice to have) 3/ There is no need to use strict and warnings alongside Modern::Perl; 4/ The svc script has a BibLibre copyright 5/ I don't understand the need of the new subroutine in the svc script (ajax_auth_cgi). You should not need it, have a look at how the other svc scripts deal with authentication 6/ QA script fails with: FAIL installer/data/mysql/sysprefs.sql FAIL sysprefs_order Not blocker: Sysprefs AllowIssueNotes is bad placed (see bug 10610)
Created attachment 58277 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database - perl installer/data/mysql/updatedatabase.pl 3) (You may have to rebuild schema but I think the patch should apply the schema changes for you) 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows. Sponsored-by: Region Halland
(In reply to Jonathan Druart from comment #27) > Aleisha, Have a look at your patches, there are some weird stuffs to fix: > 1/ kohastructure: you re-add the entire item table > 2/ update db: you should specify the "after" sql clause to keep the same > order as the kohastructure (not necessary useful but good practice to have) > 3/ There is no need to use strict and warnings alongside Modern::Perl; > 4/ The svc script has a BibLibre copyright > 5/ I don't understand the need of the new subroutine in the svc script > (ajax_auth_cgi). You should not need it, have a look at how the other svc > scripts deal with authentication > 6/ QA script fails with: > FAIL installer/data/mysql/sysprefs.sql > FAIL sysprefs_order > Not blocker: Sysprefs AllowIssueNotes is bad placed (see bug > 10610) Hi Jonathan, I fixed all of these except the first point - what do you mean I re-add the entire items table? Sorry, I don't understand. Aleisha
(In reply to Aleisha Amohia from comment #29) > I fixed all of these except the first point - what do you mean I re-add the > entire items table? Sorry, I don't understand. Hi Aleisha, Look at your patch, the kohastructure.sql file: You drop and recreate the issues table. Note that you must add the 2 new columns to the old_issues table as well.
Created attachment 58325 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database - perl installer/data/mysql/updatedatabase.pl 3) (You may have to rebuild schema but I think the patch should apply the schema changes for you) 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows. Sponsored-by: Region Halland
Created attachment 58326 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database - perl installer/data/mysql/updatedatabase.pl 3) (You may have to rebuild schema but I think the patch should apply the schema changes for you) 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows. Sponsored-by: Region Halland
(In reply to Jonathan Druart from comment #30) > Hi Aleisha, > Look at your patch, the kohastructure.sql file: You drop and recreate the > issues table. > Note that you must add the 2 new columns to the old_issues table as well. Fixed that all up - ready for testing again.
I think this is a great new feature. A few issues and suggestions: - The preference should be retrieved via the template instead of in the Perl script: https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML7:_use_system_preference_TT_plugin - The date in the checkin message should be formatted using the KohaDates plugin. - On the circulation page, I think it makes more sense to put the patron note in the column which shows the "Checked in" message since that's where the librarian would be looking for confirmation of the transaction. Since there is no way to find out what note was attached to something you just checked in on returns.pl, I wonder if the notification shouldn't work the same as the hold notice: In a blocking modal?
Created attachment 58372 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database - perl installer/data/mysql/updatedatabase.pl 3) (You may have to rebuild schema but I think the patch should apply the schema changes for you) 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland
Hi Owen, (In reply to Owen Leonard from comment #34) > I think this is a great new feature. A few issues and suggestions: > > - The preference should be retrieved via the template instead of in the Perl > script: > > https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML7: > _use_system_preference_TT_plugin > > - The date in the checkin message should be formatted using the KohaDates > plugin. > - On the circulation page, I think it makes more sense to put the patron > note in the column which shows the "Checked in" message since that's where > the librarian would be looking for confirmation of the transaction. > I have implemented all these changes in the latest patch. > Since there is no way to find out what note was attached to something you > just checked in on returns.pl, I wonder if the notification shouldn't work > the same as the hold notice: In a blocking modal? I am working on a follow-up feature in Bug 17698 that allows a 'seen' system for the patron notes - similar to how we approve tags and comments made in the OPAC. I think this suggestion would be best implemented in that patch rather than this one if that's okay with you (would like to get this signed off and passed so I can finish 17698)! Thanks Aleisha
Created attachment 58606 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database - perl installer/data/mysql/updatedatabase.pl 3) (You may have to rebuild schema but I think the patch should apply the schema changes for you) 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland
Created attachment 58622 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland
I realised I had taken some shortcuts with the object-oriented stuff and wasn't doing it properly. The latest patch fixes that. This is ready to test.
(In reply to Aleisha Amohia from comment #39) > I realised I had taken some shortcuts with the object-oriented stuff and > wasn't doing it properly. The latest patch fixes that. This is ready to test. We already had a Koha::Issues become Koha::Checkouts. This seems to go backwards. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17796 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16870
Aleisha, it seems that your last patch kept the 2 subroutines in C4::Items. Since you are not using them, you can remove them.
Created attachment 59469 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland
(In reply to Aleisha Amohia from comment #36) > > - On the circulation page, I think it makes more sense to put the patron > > note in the column which shows the "Checked in" message since that's where > > the librarian would be looking for confirmation of the transaction. Was it supposed to work this way in your latest version? The note was still appearing in the first column of the table in my latest tests.
(In reply to Owen Leonard from comment #43) > Was it supposed to work this way in your latest version? The note was still > appearing in the first column of the table in my latest tests. The first column of the table also has the Checked In message. I moved it out of the Title (etc) column into that column, so yes, this is the way it is meant to work. :)
Please, upgrade your templates to bootstrap 3 (see bug 16239) and https://wiki.koha-community.org/wiki/Interface_patterns http://getbootstrap.com/css/#grid
Created attachment 59637 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland
(In reply to Josef Moravec from comment #45) > Please, upgrade your templates to bootstrap 3 (see bug 16239) and > > https://wiki.koha-community.org/wiki/Interface_patterns > http://getbootstrap.com/css/#grid I only found one place I needed to update a button to bootstrap 3. This is ready to sign off again, unless someone else can find other places that need updating ... would really like to get this one through now.
Ad 3) Rebuild schema Change for for table issues are in your patch, but for old_issues not - probably better to be consistant here, just for more convinience testing. But not reason to fail the patch
Created attachment 59641 [details] [review] [SIGNED-OFF] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
I'd like to get feedbacks about these few questions: 1. Maybe the pref AllowIssueNotes should be renamed AllowCheckoutNotes? 2. Does everybody think that "PATRON_NOTE" template code is meaningful enough? (In reply to Jonathan Druart from comment #41) > Aleisha, it seems that your last patch kept the 2 subroutines in C4::Items. > Since you are not using them, you can remove them. Note that this is still valid, C4::Circulation::GetItemIssues is readded by your patch whereas it has been removed by bug 17679.
(In reply to Jonathan Druart from comment #50) > I'd like to get feedbacks about these few questions: > 1. Maybe the pref AllowIssueNotes should be renamed AllowCheckoutNotes? I think the initial devs might not have been aware of our terminology: https://wiki.koha-community.org/wiki/Terminology Could we fix this later on in a separate patch later on? This has been taking a long time already. > 2. Does everybody think that "PATRON_NOTE" template code is meaningful > enough? Don't have a better idea right now - it matches how it's called in the GUI.
Created attachment 59761 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
(In reply to Jonathan Druart from comment #50) > (In reply to Jonathan Druart from comment #41) > > Aleisha, it seems that your last patch kept the 2 subroutines in C4::Items. > > Since you are not using them, you can remove them. > > Note that this is still valid, C4::Circulation::GetItemIssues is readded by > your patch whereas it has been removed by bug 17679. Fixed in the latest patch. (In reply to Katrin Fischer from comment #51) > (In reply to Jonathan Druart from comment #50) > > I'd like to get feedbacks about these few questions: > > 1. Maybe the pref AllowIssueNotes should be renamed AllowCheckoutNotes? > > I think the initial devs might not have been aware of our terminology: > https://wiki.koha-community.org/wiki/Terminology > Could we fix this later on in a separate patch later on? This has been > taking a long time already. I agree with Katrin - any other additional comments about language etc. can be fixed once this has passed, but would really like to get this through. Reattached patch removes the GetItemIssues from the patch.
Created attachment 59779 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59780 [details] [review] Bug 14224: Check if the columns do not exist before creating them Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59781 [details] [review] Bug 14224: Do not reintroduce GetItemIssue, it's dying Bug 17680 is removing it. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59782 [details] [review] Bug 14224: Reintroduce previous copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59783 [details] [review] Bug 14224: Remove SQL query in svc script Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59784 [details] [review] Bug 14224: Fix prevent submit That did not work, the form was submitted anyway Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59785 [details] [review] Bug 14224: Make strings translatable The strings should be translatable. This patch also removes the error as it appears that we only have 1 error. To improve we could surround the store with an eval. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59786 [details] [review] Bug 14224: Replace AllowIssueNotes with AllowCheckoutNotes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I'd like either a signoff on these follow-ups or someone else to QA.
Created attachment 59787 [details] [review] Bug 14224: Update Copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 59788 [details] [review] Bug 14224: Improve escaped characters To recreate the problem, submit a note like doh"doh Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
And 2 more. I do not really care about the number of patches, someone can squashed them. I think that makes the changes more readable and separate the different problems.
(In reply to Jonathan Druart from comment #55) > Created attachment 59780 [details] [review] [review] > Bug 14224: Check if the columns do not exist before creating them > > Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Probably better to ommit "IGNORE" when using column_exists function, what do you think?
(In reply to Josef Moravec from comment #66) > (In reply to Jonathan Druart from comment #55) > > Created attachment 59780 [details] [review] [review] [review] > > Bug 14224: Check if the columns do not exist before creating them > > > > Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > > Probably better to ommit "IGNORE" when using column_exists function, what do > you think? But it's only think, otherwise everything looks good
Created attachment 59796 [details] [review] Bug 14224: Check if the columns do not exist before creating them Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Josef Moravec from comment #66) > (In reply to Jonathan Druart from comment #55) > > Created attachment 59780 [details] [review] [review] [review] > > Bug 14224: Check if the columns do not exist before creating them > > > > Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > > Probably better to ommit "IGNORE" when using column_exists function, what do > you think? Yes definitely, especially because bug 17234.
Created attachment 59798 [details] [review] Bug 14224: Do not reintroduce GetItemIssue, it's dying Bug 17680 is removing it. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59799 [details] [review] Bug 14224: Reintroduce previous copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59800 [details] [review] Bug 14224: Remove SQL query in svc script Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59801 [details] [review] Bug 14224: Fix prevent submit That did not work, the form was submitted anyway Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59802 [details] [review] Bug 14224: Make strings translatable The strings should be translatable. This patch also removes the error as it appears that we only have 1 error. To improve we could surround the store with an eval. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59803 [details] [review] Bug 14224: Replace AllowIssueNotes with AllowCheckoutNotes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59804 [details] [review] Bug 14224: Update Copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59805 [details] [review] Bug 14224: Improve escaped characters To recreate the problem, submit a note like doh"doh Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 59806 [details] [review] Bug 14224: Check if the columns do not exist before creating them Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
(In reply to Jonathan Druart from comment #62) > I'd like either a signoff on these follow-ups or someone else to QA. Signed your followups
Thanks Josef!
Created attachment 61847 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 61848 [details] [review] Bug 14224: Do not reintroduce GetItemIssue, it's dying Bug 17680 is removing it. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61849 [details] [review] Bug 14224: Reintroduce previous copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61850 [details] [review] Bug 14224: Remove SQL query in svc script Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61851 [details] [review] Bug 14224: Fix prevent submit That did not work, the form was submitted anyway Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61852 [details] [review] Bug 14224: Make strings translatable The strings should be translatable. This patch also removes the error as it appears that we only have 1 error. To improve we could surround the store with an eval. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61853 [details] [review] Bug 14224: Replace AllowIssueNotes with AllowCheckoutNotes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61854 [details] [review] Bug 14224: Update Copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61855 [details] [review] Bug 14224: Improve escaped characters To recreate the problem, submit a note like doh"doh Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 61856 [details] [review] Bug 14224: Check if the columns do not exist before creating them Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Test plan step 4): AllowIssueNotes should read AllowCheckoutNotes ------ Test plan step 7): Enter "Buchrücken ist beschädigt", click "Submit changes", field shows: "Buchr�cken ist besch�digt". Same with éàè etc. Same in message "...has been saved and sent to the library." Text seems to be OK in database (select note from issues;) If I reload the page, text displays correctly. ------ Test plan step 17: If I return an item with a hold placed on it, the note does not show. I see only the message about confirming hold.
(In reply to Marc Véron from comment #91) > Test plan step 4): > AllowIssueNotes should read AllowCheckoutNotes > > ------ > > Test plan step 7): > Enter "Buchrücken ist beschädigt", click "Submit changes", field shows: > "Buchr�cken ist besch�digt". Same with éàè etc. > Same in message "...has been saved and sent to the library." > > Text seems to be OK in database (select note from issues;) > > If I reload the page, text displays correctly. > > ------ > Hi Aleisha, the issue with öäüéàè etc. can bi fixed with the following: --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -938,6 +938,7 @@ Using this account is not recommended because some parts of Koha will not functi var $self = $(this); var title = $(this).parent().siblings('.title').html(); var $noteinput = $(this).siblings('input[name="note"]').first(); + var $noteformessage = $noteinput.val(); var ajaxData = { 'action': 'issuenote', @@ -957,9 +958,8 @@ Using this account is not recommended because some parts of Koha will not functi $("#notesaved").removeClass("alert-error"); $("#notesaved").addClass("alert-info"); $noteinput.data('origvalue', data.note); - $noteinput.val(data.note); message = "<p>" + _("Your note about %s has been saved and sent to the library.").format(title) + "</p>"; - message += "<p style=\"font-style:italic;\">" + data.note + "</p>"; + message += "<p style=\"font-style:italic;\">" + $noteformessage + "</p>"; $self.hide(); } else if(data.status == 'removed') { $("#notesaved").removeClass("alert-error");
(In reply to Marc Véron from comment #91) > Test plan step 4): > AllowIssueNotes should read AllowCheckoutNotes > > ------ > > Test plan step 17: > If I return an item with a hold placed on it, the note does not show. I see > only the message about confirming hold. The problem is NOT related to this patch set. If there is a hold, the pop-up window concerning the hold hides other messages on the main screen (returns.pl). :(
(In reply to Marc Véron from comment #93) > (In reply to Marc Véron from comment #91) > > Test plan step 4): > > AllowIssueNotes should read AllowCheckoutNotes > > > > ------ > > Test plan step 17: > > If I return an item with a hold placed on it, the note does not show. I see > > only the message about confirming hold. > > The problem is NOT related to this patch set. If there is a hold, the pop-up > window concerning the hold hides other messages on the main screen > (returns.pl). > :( See: Bug 18438 - Check in: Modal about holds hides important check in messages
Created attachment 62196 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62197 [details] [review] Bug 14224: Do not reintroduce GetItemIssue, it's dying Bug 17680 is removing it. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62198 [details] [review] Bug 14224: Reintroduce previous copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62199 [details] [review] Bug 14224: Remove SQL query in svc script Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62200 [details] [review] Bug 14224: Fix prevent submit That did not work, the form was submitted anyway Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62201 [details] [review] Bug 14224: Make strings translatable The strings should be translatable. This patch also removes the error as it appears that we only have 1 error. To improve we could surround the store with an eval. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62202 [details] [review] Bug 14224: Replace AllowIssueNotes with AllowCheckoutNotes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62203 [details] [review] Bug 14224: Update Copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62204 [details] [review] Bug 14224: Improve escaped characters To recreate the problem, submit a note like doh"doh Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62205 [details] [review] Bug 14224: Check if the columns do not exist before creating them Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Tested all 10 patches together, works as expected. I will add a follow-up patch for comment #92 (minor issue with display of äöü)
Created attachment 62206 [details] [review] Bug 14224: (follow-up): Make äöü display properly after input This patch iixes display of öäü etc. immediately after input. To reproduce do the following for test plan step 7): - Enter "Buchrücken ist beschädigt", - Click "Submit changes" Result: - Field shows: "Buchr�cken ist besch�digt". Same with éàè etc. - Same in message "...has been saved and sent to the library." To test apply patch, repeat steps above, verify that text appears correctly. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62633 [details] [review] Bug 14224: Allow patron notes about item shown at check in This patch adds a "Note" input field to checked out items in the "your summary" section. The field allows patrons to write notes about the item checked out, such as "this DVD is scratched", "the binding was torn", etc. The note will be emailed to the library and displayed on item check in. Patch adds two fields to the "issues" table - "note" and "notedate". Patch adds syspref "AllowIssueNotes" - default off. Test Plan: 1) Apply this patch 2) Update database 3) Rebuild schema 4) Turn on 'AllowIssueNote' syspref 5) Check out three different items to a borrower (may be easiest to check out to yourself) 6) Log in as that borrower (or yourself) on the OPAC side and go to your summary 7) Confirm text field shows under Note column for all checkouts. Set a note for each issue, confirm all save. 8) Check the message_queue in mysql for the entries for ALL THREE issue notes. 9) Disable javascript in your browser 10) Refresh your summary page. Confirm that you can no longer edit the notes in the text field. Click the 'Create/edit note' button and confirm you are redirected to a new page. 11) Confirm that the correct title and author show for the note button you clicked. 12) Set the note and click Submit -> confirm you are redirected back to summary page and note is saved 13) Confirm there is a new entry in message_queue 14) Enable javascript and go back to the your checkouts page in the staff client for the borrower you issued the items to 15) Check in TWO items 16) Confirm that the issue notes show under the "Date due" column for the two items you checked in, and are accurate to the item (i.e. the right issue note under the right item) 17) Go to circ/returns.pl and check in the final item using the barcode. Confirm the issue note shows and the date is formatted correctly. Sponsored-by: Region Halland Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62634 [details] [review] Bug 14224: Do not reintroduce GetItemIssue, it's dying Bug 17680 is removing it. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62635 [details] [review] Bug 14224: Reintroduce previous copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62636 [details] [review] Bug 14224: Remove SQL query in svc script Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62637 [details] [review] Bug 14224: Fix prevent submit That did not work, the form was submitted anyway Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62638 [details] [review] Bug 14224: Make strings translatable The strings should be translatable. This patch also removes the error as it appears that we only have 1 error. To improve we could surround the store with an eval. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62639 [details] [review] Bug 14224: Replace AllowIssueNotes with AllowCheckoutNotes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62640 [details] [review] Bug 14224: Update Copyright Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62641 [details] [review] Bug 14224: Improve escaped characters To recreate the problem, submit a note like doh"doh Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62642 [details] [review] Bug 14224: Check if the columns do not exist before creating them Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62643 [details] [review] Bug 14224: Use encode_json instead of to_json To handle unicode characters properly
Created attachment 62644 [details] [review] Bug 14424: DBIC Schema changes
(In reply to Marc Véron from comment #106) > Created attachment 62206 [details] [review] [review] > Bug 14224: (follow-up): Make äöü display properly after input Marc, This patch worked but actually could hide a problem. The issue was in the svc script, encode_json must have been used.
Pushed to master for 17.05, thanks Jonathan!
This won't get ported back to 16.11.x as it is a new feature
<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.item>> - <<biblio.author>> (<<biblio.biblionumber>>). What is biblio.item supposed to print here? I got this mail: M De Rooy has added a note to the item - Schwartz, Randal L (23). And must say that it might not be that clear.. Do we need biblio.title and an item number ?
(In reply to Marcel de Rooy from comment #122) > <<borrowers.firstname>> <<borrowers.surname>> has added a note to the item > <<biblio.item>> - <<biblio.author>> (<<biblio.biblionumber>>). > > What is biblio.item supposed to print here? > I got this mail: > M De Rooy has added a note to the item - Schwartz, Randal L (23). > > And must say that it might not be that clear.. > Do we need biblio.title and an item number ? Thank you for noticing this bug - I have made a new bug report to fix this at Bug 18915
We had a question about what email this note would be emailed to- the Kohaadminemail set up in System preferences or the Item's Home Branch's email set up in Libraries and Groups. However, when testing this new system preference "allowcheckoutnotes' it appears that the patron that left the note receives the email not the librarian. Can you verify that this is the case.?
(In reply to Kelly McElligott from comment #124) > We had a question about what email this note would be emailed to- the > Kohaadminemail set up in System preferences or the Item's Home Branch's > email set up in Libraries and Groups. However, when testing this new system > preference "allowcheckoutnotes' it appears that the patron that left the > note receives the email not the librarian. Can you verify that this is the > case.? Yes that sounds like a bug, could you report it?
(In reply to Jonathan Druart from comment #125) > (In reply to Kelly McElligott from comment #124) > > We had a question about what email this note would be emailed to- the > > Kohaadminemail set up in System preferences or the Item's Home Branch's > > email set up in Libraries and Groups. However, when testing this new system > > preference "allowcheckoutnotes' it appears that the patron that left the > > note receives the email not the librarian. Can you verify that this is the > > case.? > > Yes that sounds like a bug, could you report it? I can confirm this is the case. :/
(In reply to Christopher Brannon from comment #126) > (In reply to Jonathan Druart from comment #125) > > (In reply to Kelly McElligott from comment #124) > > > We had a question about what email this note would be emailed to- the > > > Kohaadminemail set up in System preferences or the Item's Home Branch's > > > email set up in Libraries and Groups. However, when testing this new system > > > preference "allowcheckoutnotes' it appears that the patron that left the > > > note receives the email not the librarian. Can you verify that this is the > > > case.? > > > > Yes that sounds like a bug, could you report it? > > I can confirm this is the case. :/ I believe this has been fixed in Bug 19496!