Description
Aleisha Amohia
2016-11-30 02:28:59 UTC
Created attachment 57851 [details] [review] [NOT READY FOR TESTING] Bug 17698: Make patron notes show up on staff dashboard Test plan will come when patch is complete Sponsored-by: Catalyst IT Created attachment 58779 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'issue notes pending'. 14) Go to circulation home page. There should be no link to Issue notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Issue notes pending: 2' 17) Go to circulation home page. There should be a link to Issue notes. Click Issue notes 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 22) Confirm the barcode link to the item works as expected. 23) Confirm the cardnumber link to the user works as expected. 24) Confirm all table details show correctly. Sponsored-by: Catalyst IT Created attachment 58780 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'issue notes pending'. 14) Go to circulation home page. There should be no link to Issue notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Issue notes pending: 2' 17) Go to circulation home page. There should be a link to Issue notes with a 2 next to it. Click Issue notes 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 22) Confirm the barcode link to the item works as expected. 23) Confirm the cardnumber link to the user works as expected. 24) Confirm all table details show correctly. Sponsored-by: Catalyst IT Created attachment 58786 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'issue notes pending'. 14) Go to circulation home page. There should be no link to Issue notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Issue notes pending: 2' 17) Go to circulation home page. There should be a link to Issue notes with a 2 next to it. Click Issue notes 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 22) Confirm the barcode link to the item works as expected. 23) Confirm the cardnumber link to the user works as expected. 24) Confirm all table details show correctly. Sponsored-by: Catalyst IT Created attachment 59480 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'issue notes pending'. 14) Go to circulation home page. There should be no link to Issue notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Issue notes pending: 2' 17) Go to circulation home page. There should be a link to Issue notes with a 2 next to it. Click Issue notes 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 22) Confirm the barcode link to the item works as expected. 23) Confirm the cardnumber link to the user works as expected. 24) Confirm all table details show correctly. Sponsored-by: Catalyst IT My only comment about required fixes is that "Issue notes" should be "Checkout notes." Suggestions: - In the table of notes I think it makes more sense to have: Title | Note | Date | Set by | Status | Actions I think it makes more sense to be able to scan the list by title than by note content. And I think it makes sense for the status to be next to the actions. - A nice improvement would be to have the batch action buttons at the bottom be disabled until one or more checkboxes are checked. See Audio alerts for an example. Marking as Failed QA just for the language fix. Created attachment 59638 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Koha QA tools complains: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/checkout_notes/checkout-notes.tt FAIL forbidden patterns forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 104) There are some references to non-existing page issue notes see git grep "issue-notes.pl" And bad terminology: "Back to issue notes", line 104 of checkout-notes.tt Created attachment 59762 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Created attachment 59778 [details] [review] [SIGNED-OFF] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 59809 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first, update database, rebuild schema. 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowIssueNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave an issue note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage issue notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage issue notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an issue note as seen. This should update the status of the issue note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Aleisha, I have rebased your patch on top of the ones I have submitted on bug 14224. You should take a look to apply some changes, for instance: 1/ Return a to_json 2/ Check the existence of the DB columns before inserting them 3/ Use "AFTER" in the ADD column sql query (to enforce fields order) 4/ I do not think checkout_notes should be a new module. I'd say it should go to circ 5/ Make sure the strings are translatable Something important: In svc/issue_notes you are not testing that the logged in user is allowed to call this script. Created attachment 59828 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 59829 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> (In reply to Jonathan Druart from comment #12) > Aleisha, > I have rebased your patch on top of the ones I have submitted on bug 14224. > You should take a look to apply some changes, for instance: > 1/ Return a to_json > 2/ Check the existence of the DB columns before inserting them > 3/ Use "AFTER" in the ADD column sql query (to enforce fields order) > 4/ I do not think checkout_notes should be a new module. I'd say it should > go to circ > 5/ Make sure the strings are translatable (In reply to Jonathan Druart from comment #13) > Something important: In svc/issue_notes you are not testing that the logged > in user is allowed to call this script. I have applied all of these changes and changed all instances (I think) of 'issue note' to 'checkout note'. This is ready to sign off Please update the POD in svc/checkout_notes 29 =head1 NAME 30 31 svc/issue_notes - Web service for managing patron notes set on issues Created attachment 59957 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 61857 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> SQL error in bug-17698_add-noteseen-column-to-issues.sql $dbh->do(q|ALTER TABLE issues ADD noteseen int(1) default NULL AFTER notedate|); and $dbh->do(q|ALTER TABLE old_issues ADD noteseen int(1) default NULL AFTER notedate|); ADD schould be ADD COLUMN Created attachment 62337 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 62351 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); Any chance to put this statement in Koha Object[s] style too? Thanks. Created attachment 64662 [details] [review] Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. (In reply to Aleisha Amohia from comment #24) > Marcel, can you please have a look at this patch. I tried to implement > the change > my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef > } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); > to > my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { > prefetch => [ 'borrower', { item => 'biblionumber' } ] }); > but am having problems on the template side. I can access the item and > biblio information about the issue, but not the borrower information, > even though the query is definitely pulling it correctly. Any > suggestions or ideas as to why this breaks? Yeah, I tested some variations too and did not clear up this problem. Probably we have some *issues* with the relationships of the issues table. We perhaps better address this DBIx problem on a separate report in order to not postpone this development. Please restore the DBIx line that worked. See also bug 18862 Created attachment 64683 [details] [review] Bug 17698: [FOLLOW-UP] Reverting back to original resultset usage See Comment 25 Using patron instead of borrower should do it (see 18862) Created attachment 64835 [details] [review] Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. Hey, I tried testing this patch, seems like it doesn't apply anymore : Applying: Bug 17698: Make patron notes show up on staff dashboard fatal: sha1 information is lacking or useless (Koha/Schema/Result/Issue.pm). error: could not build fake ancestor Patch failed at 0001 Bug 17698: Make patron notes show up on staff dashboard Created attachment 71100 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 71126 [details] [review] Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. Created attachment 71127 [details] [review] Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. Patches rebased, please test! ~/d/koha ❯❯❯ git bz apply 17698 Bug 17698 - Make patron notes show up on staff dashboard 71100 - Bug 17698: Make patron notes show up on staff dashboard 71126 - Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar 71127 - Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 17698: Make patron notes show up on staff dashboard Using index info to reconstruct a base tree... M installer/data/mysql/kohastructure.sql M installer/data/mysql/userpermissions.sql M koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc M koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt M koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt M mainpage.pl Falling back to patching base and 3-way merge... Auto-merging mainpage.pl CONFLICT (content): Merge conflict in mainpage.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc Auto-merging installer/data/mysql/userpermissions.sql Auto-merging installer/data/mysql/kohastructure.sql error: Failed to merge in the changes. Patch failed at 0001 Bug 17698: Make patron notes show up on staff dashboard The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-17698-Make-patron-notes-show-up-on-staff-dashb-H6e7WQ.patch Created attachment 72875 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 72876 [details] [review] Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. Created attachment 72877 [details] [review] Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. I rebased the patches again. Fixed a minor conflict in mainpage.pl -- correctly, I hope! Created attachment 73004 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 73005 [details] [review] Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 73006 [details] [review] Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> There are some mostly small issues: 1) Small rebase conflict in SQL files for permissions 2) Capitalization +<title>Home › Circulation › Checkout Notes</title> 2) Translatability $("#status_" + $issue_id).text("Not seen"); $("#status_" + $issue_id).text("Seen"); 3) Move JavaScript to the bottom - we are currently migrating all pages to do that. See: Bug 17858 - Omnibus: Move staff client JavaScript to the footer 4) Missing [% VERSION %] variable for JavaScript libraries: +<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> See: Bug 12904 - Force browser to load new JavaScript and CSS files after upgrade 5) Typo: + ( 1, 'manage_checkout_nots', 'Mark checkout notes as seen/not seen'), 6) There are also some issues noted by the QA script: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt FAIL forbidden patterns forbidden pattern: Include [% KOHA_VERSION %] in css paths (bug 12904) - May be false positive (line 7) forbidden pattern: Include [% KOHA_VERSION %] in js paths (bug 12904) - May be false positive (line 76) FAIL valid_template parse error - /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt line 134: unexpected token ([) [% note.patron.title [% END %] FAIL circ/on-site_checkouts.pl FAIL valid Global symbol "$pending_onsite_notes" requires explicit package name circ/on-site_checkouts.pl had compilation errors. I've tried to test, but I can't see the link on the circulation home page, possibly to a problem (typo?) with the permissions. Please fix and test. Thank you! Created attachment 73839 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 73840 [details] [review] Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 73841 [details] [review] Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Hi Aleisha, is this ready for retesting or one follow-up missing? (In reply to Katrin Fischer from comment #46) > Hi Aleisha, is this ready for retesting or one follow-up missing? Not yet ready for testing, just rebased. Working on your comments in Comment 42 :) Created attachment 74044 [details] [review] Bug 17698: [FOLLOW-UP] Fixing some small issues Fixing the comments in Comment 42 Ready to test Created attachment 74193 [details] [review] Bug 17698: (QA follow-up) Changes to use Asset TT plugin (bug 20538) Hi Aleisha, I have added a follow-up, to adapt your patches to the recent changes from bug 20538. Then I've started testing, but I can't add a note from the OPAC: No property noteseen for Koha::Checkout I've run the database update and updated the Schema, but keep getting this error. Can you please fix? The last follow-up I would have counted for a QA follow-up as the changes are clearly what I asked for. If this is a small fix, consider changing back to signed off. Created attachment 75837 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 75838 [details] [review] Bug 17698: [FOLLOW-UP] Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 75839 [details] [review] Bug 17698: [FOLLOW-UP] Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Created attachment 75840 [details] [review] Bug 17698: [FOLLOW-UP] Fixing some small issues Fixing the comments in Comment 42 Ready to test Created attachment 75841 [details] [review] Bug 17698: (QA follow-up) Changes to use Asset TT plugin (bug 20538) Created attachment 75842 [details] [review] Bug 17698: [FOLLOW-UP] Rebase and schema update Setting to signed off. 1. Bad resolution conflict, permission self_checkout is re-add (I will fix) 2. The IGNORE modifier is missing in the INSERT statement (I will fix) 3. In the JS console: "ReferenceError: $ is not defined", I did not investigate it. 4. When I hit /circ/checkout-notes.pl from the side bar, the page displays "Checkout notes", nothing else. We should add "There is no checkout notes". (I will fix) 5. The alert id=error is displayed then hide in JS, but it's then displayed half a second. We should hide it by default (css) 6. I would move the "mark seen" and "mark not seen" buttons at the top of the table 7. I would display the table on the confirmation screen as well (I will fix) 8. Cursor on "Select all" and "Clear all" links must be adjusted 9. $(".btn-xs").click(function(event){ The selector should be $("button.seen, button.notseen"), you do not want to apply this function to all other btn-xs on the page (maybe there are only two for now, but who knows later?) 10. html filters are missing (I will fix) 11. span element should surround translatable string, to help translators (I will fix). 12. Important: When a note is updated, it's still marked as seen. Is it the expected behavior? 13. What will happen when hundred of notes will be on this table? Not blocker but we will need a "hide seen" buttons to filters the already seen notes. 14. patron-title.inc must be used to display patron's info (I will fix) Created attachment 76011 [details] [review] Bug 17698: (QA follow-up) Fix minors design issues This patch includes some changes required on comment 57: 1. Bad resolution conflict, permission self_checkout is re-add 2. The IGNORE modifier is missing in the INSERT statement 4. When I hit /circ/checkout-notes.pl from the side bar, the page displays "Checkout notes", nothing else. We should add "There is no checkout notes". 7. I would display the table on the confirmation screen as well 10. html filters are missing 11. span element should surround translatable string, to help translators 14. patron-title.inc must be used to display patron's info Created attachment 76012 [details] [review] Bug 17698: [FOLLOW-UP] Fixing things in Comment 57 3. In the JS console: "ReferenceError: $ is not defined", I did not investigate it. Where do you see this in the console? I cannot recreate on opac-user.pl or on circ/checkout-notes.pl. 5. The alert id=error is displayed then hide in JS, but it's then displayed half a second. We should hide it by default (css) Fixed in this patch 6. I would move the "mark seen" and "mark not seen" buttons at the top of the table Fixed in this patch 8. Cursor on "Select all" and "Clear all" links must be adjusted Fixed in this patch 9. $(".btn-xs").click(function(event){ The selector should be $("button.seen, button.notseen"), you do not want to apply this function to all other btn-xs on the page (maybe there are only two for now, but who knows later?) Fixed in this patch 12. Important: When a note is updated, it's still marked as seen. Is it the expected behavior? I don't see this behaviour. When a note is updated it is marked as not seen. opav/svc/checkout_notes:79: $issue->set({ notedate => dt_from_string(), note => $clean_note, noteseen => 0 })->store; 13. What will happen when hundred of notes will be on this table? Not blocker but we will need a "hide seen" buttons to filters the already seen notes. Added in this patch Created attachment 76028 [details] [review] Bug 17698: Make patron notes show up on staff dashboard This patch adds a user permission for managing issue notes, and a 'noteseen' column to the issues table. To test: 1) Apply Bug 14224 first 2) Apply this patch, update database, rebuild schema. 3) Restart koha-common and memcached 4) Turn on AllowCheckoutNotes syspref if haven't already 5) Issue two items to two different users (one item each) 6) Log into the OPAC as one of the users and add an issue note to their issue 7) Log out and log back into the OPAC as the other user 8) Disable Javascript 9) Refresh opac-user.pl 10) Leave a checkout note on their issue 11) Enable javascript and log into the Staff Client as a superlibrarian user 12) Go to your user's account and edit their permissions to have everything ticked EXCEPT circulate->manage checkout notes. 13) Go to main intranet page. There should be no message saying 'checkout notes pending'. 14) Go to circulation home page. There should be no link to Checkout notes. 15) Go back to user's permissions and tick circulate->manage checkout notes. 16) Go back to main intranet page. There should now be a message at the bottom saying 'Checkout notes pending: 2' 17) Go to circulation home page. There should be a link to Checkout notes with a 2 next to it. Click this link 18) Attempt to mark an checkout note as seen. This should update the status of the checkout note to 'seen' and disable to 'mark as seen' button while enabling the 'mark as not seen' button. 19) Test both buttons with both issues. 20) Test select all and clear all buttons 21) Confirm that buttons at the bottom are only enabled if a checkbox is checked 22) Try selecting both issues and using the buttons at the bottom to mark multiple issue notes at once. 23) Confirm the barcode link to the item works as expected. 24) Confirm the cardnumber link to the user works as expected. 25) Confirm all table details show correctly. Sponsored-by: Catalyst IT Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Amended patch: Remove self-checkout permissions Created attachment 76029 [details] [review] Bug 17698: (follow-up) Changing to Koha Objects style, adding circ sidebar Marcel, can you please have a look at this patch. I tried to implement the change my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); to my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); but am having problems on the template side. I can access the item and biblio information about the issue, but not the borrower information, even though the query is definitely pulling it correctly. Any suggestions or ideas as to why this breaks? This patch also adds the implementation of the circSidebar. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76030 [details] [review] Bug 17698: (follow-up) Koha Objects, access borrower through patron sub See Comment 27 This is ready to be tested. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76031 [details] [review] Bug 17698: (follow-up) Fixing some small issues Fixing the comments in Comment 42 Ready to test Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76032 [details] [review] Bug 17698: (QA follow-up) Changes to use Asset TT plugin (bug 20538) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76033 [details] [review] Bug 17698: (follow-up) Rebase and schema update Setting to signed off. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76034 [details] [review] Bug 17698: (QA follow-up) Fix minors design issues This patch includes some changes required on comment 57: 1. Bad resolution conflict, permission self_checkout is re-add 2. The IGNORE modifier is missing in the INSERT statement 4. When I hit /circ/checkout-notes.pl from the side bar, the page displays "Checkout notes", nothing else. We should add "There is no checkout notes". 7. I would display the table on the confirmation screen as well 10. html filters are missing 11. span element should surround translatable string, to help translators 14. patron-title.inc must be used to display patron's info Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76035 [details] [review] Bug 17698: (follow-up) Fixing things in Comment 57 3. In the JS console: "ReferenceError: $ is not defined", I did not investigate it. Where do you see this in the console? I cannot recreate on opac-user.pl or on circ/checkout-notes.pl. 5. The alert id=error is displayed then hide in JS, but it's then displayed half a second. We should hide it by default (css) Fixed in this patch 6. I would move the "mark seen" and "mark not seen" buttons at the top of the table Fixed in this patch 8. Cursor on "Select all" and "Clear all" links must be adjusted Fixed in this patch 9. $(".btn-xs").click(function(event){ The selector should be $("button.seen, button.notseen"), you do not want to apply this function to all other btn-xs on the page (maybe there are only two for now, but who knows later?) Fixed in this patch 12. Important: When a note is updated, it's still marked as seen. Is it the expected behavior? I don't see this behaviour. When a note is updated it is marked as not seen. opav/svc/checkout_notes:79: $issue->set({ notedate => dt_from_string(), note => $clean_note, noteseen => 0 })->store; 13. What will happen when hundred of notes will be on this table? Not blocker but we will need a "hide seen" buttons to filters the already seen notes. Added in this patch Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76036 [details] [review] Bug 17698: (QA follow-up) few more things 1. body tag was missing 2. make "Date" column sortable correctly 3. remove CDATA and type="text/javascript" 4. Handle server-side errors Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 76037 [details] [review] Bug 17698: Do not send pending_checkout_notes from all circ scripts It's safer to send what we need from C4::Auth it's needed from a whole module. The SELECT COUNT(*) query will only be done when needed (so not made from scripts outside of circ) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Thanks Aleisha for your quick follow-up, very appreciated. Take a look at the 2 last follow-ups I have attached, they fixed few more things and remove duplication of code. You should also make sure your commit messages fit the coding guidelines (https://wiki.koha-community.org/wiki/Commit_messages#Examples), maybe you should update your qa-test-tools repo, there are new checks to catch that. This new enhancement is well polished and the code is easy to read. Congrats! Awesome work all! Pushed to master for 18.11 Enhancement, will not be backported to 18.05.x series. Great work though Aleisha, looks like a nice new feature to debut in 18.11.0! The call to GetPreparedLetter in opac/opac-issue-note.pl should pass "lang" in order to make CHECKOUT_NOTE translatable. Created attachment 89964 [details] [review] Bug 17698: (RM follow-up) Pass lang variable so letter can be translated (In reply to Jonathan Druart from comment #73) > The call to GetPreparedLetter in opac/opac-issue-note.pl should pass "lang" > in order to make CHECKOUT_NOTE translatable. Can you test the provided follow-up? Created attachment 90037 [details] [review] Bug 17698: (RM follow-up) Pass lang variable so letter can be translated Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Followup works as expected. Thanks Nick. PQA Last follow-up pushed to master Please people... not pushing follow-ups on released bugs. This messes up the release notes. |