Add the option for users to receive notices by SMS for recalls. This requires adding recalls to messaging preferences.
Created attachment 93905 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. Sponsored-by: Toi Ohomai Institute of Technology
Hi Aleisha, should this be "NSO"?
Probably more appropriate to be BLOCKED as it depends on the recalls feature that we currently use with our clients but still hasn't made it upstream.
Created attachment 104984 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
Patch no longer applies 8-(
(In reply to David Nind from comment #5) > Patch no longer applies 8-( I'm waiting for Bug 19532 to get through so I can rebase this on top of that :)
Created attachment 131702 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
Created attachment 132044 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
Patch no longer applies 8-(.. apologies for not getting back on to this one sooner. Applying: Bug 23781: SMS notices and messaging preferences for recalls Using index info to reconstruct a base tree... M Koha/Recall.pm M Koha/Recalls.pm M installer/data/mysql/en/mandatory/sample_notices.yml M installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql M koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc Auto-merging installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql Auto-merging installer/data/mysql/en/mandatory/sample_notices.yml Auto-merging Koha/Recalls.pm Auto-merging Koha/Recall.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 23781: SMS notices and messaging preferences for recalls
Created attachment 140242 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
Created attachment 140244 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
The patch no longer applies 8-(... Apologies for not getting around to testing sooner, will be quicker this time!
Created attachment 147107 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
Shouldn't at least the Return recalled item be set by default to email for everyone? Right now, after the update, nobody will receive anything, if I understand correctly. Whereas the current behaviour is that everyone receives everything. So if we update, the people who have the items will not be notified that they must return their items early, which could lead to overdues, misunderstandings and general confusion.
I tested the patch. On my git installation I got a 500 error when confirming the recall (step 14). I tried again on a sandbox, thinking it was maybe just me, but I also got the error there. The error starts with The method Koha::Recall->borrowernumber is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 900 Koha::Object::AUTOLOAD('Koha::Recall=HASH(0x562e4e503260)') called at /kohadevbox/koha/Koha/Recall.pm line 361 Koha::Recall::set_waiting('Koha::Recall=HASH(0x562e4e503260)', 'HASH(0x562e4e65fa28)') called at /kohadevbox/koha/circ/returns.pl line 195 eval {...} at /kohadevbox/koha/circ/returns.pl line 2 CGI::Compile::ROOT::kohadevbox_koha_circ_returns_2epl::__ANON__('CGI::Compile=HASH(0x562e4df5ec98)', '', '/kohadevbox/koha/circ/returns.pl', '/kohadevbox/koha/circ', 'ARRAY(0x562e4e66f7c0)') called at /usr/share/perl5/CGI/Compile.pm line 151 CGI::Compile::ROOT::kohadevbox_koha_circ_returns_2epl::returns_2epl at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30 CGI::Emulate::PSGI::__ANON__('HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/App/WrapCGI.pm line 95 Plack::App::WrapCGI::call('Plack::App::WrapCGI=HASH(0x562e4e6775a0)', 'HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/App/CGIBin.pm line 50 Plack::App::CGIBin::serve_path('Plack::App::CGIBin=HASH(0x562e4259e1c0)', 'HASH(0x562e4e615208)', '/kohadevbox/koha/circ/returns.pl') called at /usr/share/perl5/Plack/App/File.pm line 34 Plack::App::File::call('Plack::App::CGIBin=HASH(0x562e4259e1c0)', 'HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Middleware/LogWarn.pm line 22 Plack::Middleware::LogWarn::call('Plack::Middleware::LogWarn=HASH(0x562e49faa950)', 'HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Middleware/Log4perl.pm line 30 Plack::Middleware::Log4perl::call('Plack::Middleware::Log4perl=HASH(0x562e49faaf68)', 'HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x562e4e615208)') called at /usr/share/perl5/Plack/Middleware/HTTPExceptions.pm line 20 Plack::Middleware::HTTPExceptions::try {...} at /usr/share/perl5/Try/Tiny.pm line 100 and continues on...
Created attachment 148248 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology
Created attachment 148260 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Works as described and all tests are passing.
Applying: Bug 23781: SMS notices and messaging preferences for recalls Using index info to reconstruct a base tree... M Koha/Recall.pm M Koha/Recalls.pm M installer/data/mysql/en/mandatory/sample_notices.yml Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/en/mandatory/sample_notices.yml Auto-merging Koha/Recalls.pm CONFLICT (content): Merge conflict in Koha/Recalls.pm Auto-merging Koha/Recall.pm CONFLICT (content): Merge conflict in Koha/Recall.pm
Created attachment 150430 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(In reply to Marcel de Rooy from comment #19) > Applying: Bug 23781: SMS notices and messaging preferences for recalls > Using index info to reconstruct a base tree... > M Koha/Recall.pm > M Koha/Recalls.pm > M installer/data/mysql/en/mandatory/sample_notices.yml > Falling back to patching base and 3-way merge... > Auto-merging installer/data/mysql/en/mandatory/sample_notices.yml > Auto-merging Koha/Recalls.pm > CONFLICT (content): Merge conflict in Koha/Recalls.pm > Auto-merging Koha/Recall.pm > CONFLICT (content): Merge conflict in Koha/Recall.pm Fixed, set back to Signed Off.
Created attachment 150441 [details] [review] Bug 23781: SMS notices and messaging preferences for recalls This patch adds recalls notices (pick up a waiting recall or return a requested recall) to the messaging preferences. To test: 1) Apply Bug 19532 2) Apply this bug 3) Update database, rebuild dbix files 4) Ensure UseRecalls syspref is enabled and values have been set in the circulation rules for recalls 5) Go to a borrower (Person A) account page in the Intranet or the OPAC 6) Go to messaging preferences 7) Notice there are now preferences for two recalls notices 8) Select email as a preference 9) Find a different borrower (Person B) and set their messaging preferences to SMS 10) Check out any item to Person B 11) Go to the OPAC logged in as Person A and find that item 12) Recall the item 13) In the terminal, look at the message_queue in the database. There should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS 14) Go back to the Intranet and check in the item. Confirm the recall when checking in 15) Look at the message_queue in the database again. There should be a 'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. 16) Confirm tests pass t/db_dependent/Koha/Recall.t t/db_dependent/Koha/Recalls.t Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com>
QA tools fail on exec flag and other things.
Created attachment 155346 [details] [review] Bug 23781: Make atomic updates executable and perltidy fixes
(In reply to Marcel de Rooy from comment #23) > QA tools fail on exec flag and other things. Attached a patch to address these and set back to Signed Off, ready for QA please! :)