Bug 23781 - Recalls notices and messaging preferences
Summary: Recalls notices and messaging preferences
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Aleisha Amohia
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 19532
Blocks: 29734 30295 37793
  Show dependency treegraph
 
Reported: 2019-10-08 21:30 UTC by Aleisha Amohia
Modified: 2024-08-30 14:09 UTC (History)
8 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement for recalls adds two new patron messaging preferences and associated circulation notices when UseRecalls is enabled: - Recall awaiting pickup (new notice - PICKUP_RECALLED_ITEM) - Return recalled item (new notice - RETURN_RECALLED_ITEM)
Version(s) released in:
24.11.00
Circulation function: recalls


Attachments
Bug 23781: SMS notices and messaging preferences for recalls (61.80 KB, patch)
2019-10-08 22:30 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (30.20 KB, patch)
2020-05-18 00:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (16.82 KB, patch)
2022-03-15 02:49 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (16.86 KB, patch)
2022-03-23 03:39 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (14.99 KB, patch)
2022-09-07 04:41 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.12 KB, patch)
2022-09-07 04:56 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.01 KB, patch)
2023-02-22 03:56 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.03 KB, patch)
2023-03-15 22:02 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.06 KB, patch)
2023-03-16 12:48 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.02 KB, patch)
2023-04-30 21:19 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.05 KB, patch)
2023-05-01 00:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: Make atomic updates executable and perltidy fixes (9.47 KB, patch)
2023-09-07 23:03 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.04 KB, patch)
2023-11-09 03:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: Make atomic updates executable and perltidy fixes (9.45 KB, patch)
2023-11-09 03:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: Add phone transport option (2.60 KB, patch)
2023-11-09 03:06 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.02 KB, patch)
2023-11-15 21:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: Make atomic updates executable and perltidy fixes (9.49 KB, patch)
2023-11-15 21:17 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: Add phone transport option (2.65 KB, patch)
2023-11-15 21:17 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (15.10 KB, patch)
2024-02-23 14:47 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: Make atomic updates executable and perltidy fixes (9.55 KB, patch)
2024-02-23 14:47 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: Add phone transport option (2.70 KB, patch)
2024-02-23 14:47 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: (QA follow-up) Implement phone notice in code (1.91 KB, patch)
2024-02-23 14:47 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: Database updates (5.75 KB, patch)
2024-04-21 23:14 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: Tests for Recalls messaging preferences (2.57 KB, patch)
2024-04-21 23:14 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (6.97 KB, patch)
2024-04-21 23:15 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781 (follow-up): Reorder atomic updates (2.59 KB, patch)
2024-04-26 02:20 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 23781: Database updates (5.79 KB, patch)
2024-04-26 08:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: Tests for Recalls messaging preferences (2.62 KB, patch)
2024-04-26 08:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (7.01 KB, patch)
2024-04-26 08:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781 (follow-up): Reorder atomic updates (2.63 KB, patch)
2024-04-26 08:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 23781: Database updates (5.85 KB, patch)
2024-07-19 11:41 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: Database updates (5.85 KB, patch)
2024-07-19 11:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: Tests for Recalls messaging preferences (2.67 KB, patch)
2024-07-19 11:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: SMS notices and messaging preferences for recalls (7.07 KB, patch)
2024-07-19 11:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 23781: (follow-up) Reorder atomic updates (2.69 KB, patch)
2024-07-19 11:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2019-10-08 21:30:29 UTC
Add the option for users to receive notices by SMS for recalls. This requires adding recalls to messaging preferences.
Comment 1 Aleisha Amohia 2019-10-08 22:30:22 UTC
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
Comment 2 Katrin Fischer 2020-03-28 21:48:33 UTC
Hi Aleisha, should this be "NSO"?
Comment 3 Aleisha Amohia 2020-03-29 21:09:17 UTC
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.
Comment 4 Aleisha Amohia 2020-05-18 00:54:12 UTC
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
Comment 5 David Nind 2020-11-11 06:24:06 UTC
Patch no longer applies 8-(
Comment 6 Aleisha Amohia 2020-11-12 20:24:36 UTC
(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 :)
Comment 7 Aleisha Amohia 2022-03-15 02:49:55 UTC
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
Comment 8 Aleisha Amohia 2022-03-23 03:39:06 UTC
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
Comment 9 David Nind 2022-04-28 18:48:37 UTC
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
Comment 10 Aleisha Amohia 2022-09-07 04:41:23 UTC
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
Comment 11 Aleisha Amohia 2022-09-07 04:56:58 UTC
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
Comment 12 David Nind 2023-01-30 07:56:53 UTC
The patch no longer applies 8-(...

Apologies for not getting around to testing sooner, will be quicker this time!
Comment 13 Aleisha Amohia 2023-02-22 03:56:29 UTC
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
Comment 14 Caroline Cyr La Rose 2023-03-13 18:43:45 UTC
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.
Comment 15 Caroline Cyr La Rose 2023-03-13 18:51:21 UTC
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...
Comment 16 Aleisha Amohia 2023-03-15 22:02:02 UTC
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
Comment 17 Lucas Gass (lukeg) 2023-03-16 12:48:45 UTC
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>
Comment 18 Lucas Gass (lukeg) 2023-03-16 12:49:15 UTC
Works as described and all tests are passing.
Comment 19 Marcel de Rooy 2023-04-28 06:44:00 UTC
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
Comment 20 Aleisha Amohia 2023-04-30 21:19:04 UTC
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>
Comment 21 Aleisha Amohia 2023-04-30 21:19:47 UTC
(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.
Comment 22 David Nind 2023-05-01 00:21:55 UTC
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>
Comment 23 Marcel de Rooy 2023-07-14 06:50:10 UTC
QA tools fail on exec flag and other things.
Comment 24 Aleisha Amohia 2023-09-07 23:03:54 UTC
Created attachment 155346 [details] [review]
Bug 23781: Make atomic updates executable and perltidy fixes
Comment 25 Aleisha Amohia 2023-09-07 23:04:31 UTC
(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! :)
Comment 26 Kyle M Hall (khall) 2023-10-27 10:42:31 UTC
I think this needs to have the phone transport option as well.
Comment 27 Aleisha Amohia 2023-11-09 03:06:14 UTC
Created attachment 158696 [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>
Comment 28 Aleisha Amohia 2023-11-09 03:06:18 UTC
Created attachment 158697 [details] [review]
Bug 23781: Make atomic updates executable and perltidy fixes
Comment 29 Aleisha Amohia 2023-11-09 03:06:21 UTC
Created attachment 158698 [details] [review]
Bug 23781: Add phone transport option
Comment 30 David Nind 2023-11-15 21:16:58 UTC
Created attachment 159013 [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>
Comment 31 David Nind 2023-11-15 21:17:01 UTC
Created attachment 159014 [details] [review]
Bug 23781: Make atomic updates executable and perltidy fixes

Signed-off-by: David Nind <david@davidnind.com>
Comment 32 David Nind 2023-11-15 21:17:04 UTC
Created attachment 159015 [details] [review]
Bug 23781: Add phone transport option

Signed-off-by: David Nind <david@davidnind.com>
Comment 33 Kyle M Hall (khall) 2024-02-23 14:47:44 UTC
Created attachment 162377 [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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 34 Kyle M Hall (khall) 2024-02-23 14:47:52 UTC
Created attachment 162378 [details] [review]
Bug 23781: Make atomic updates executable and perltidy fixes

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 35 Kyle M Hall (khall) 2024-02-23 14:47:54 UTC
Created attachment 162379 [details] [review]
Bug 23781: Add phone transport option

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 36 Kyle M Hall (khall) 2024-02-23 14:47:57 UTC
Created attachment 162380 [details] [review]
Bug 23781: (QA follow-up) Implement phone notice in code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 37 Katrin Fischer 2024-04-18 15:49:17 UTC
1) When UseRecalls is deactivated, we have 2 lines showing on the moremember.pl, opac-messaging.pl and memberentry.pl and  page with "Unknown" in the description. Those lines should not appear when the feature is off.

2)  The notice template for SMS is way too long: 
RETURN_RECALLED_ITEM  289 / 160 characters 
PICKUP_RECALLED_ITEM  299 / 160 characters 

We can expect the generated notice to be even much longer as the placeholders will be replaced with the title etc. 

3) Please merge the 3 atomic updates into one with multiple "say" lines for each thing. I think that will work a little better.
Comment 38 Aleisha Amohia 2024-04-21 23:14:56 UTC
Created attachment 165240 [details] [review]
Bug 23781: Database updates

This patch adds RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM SMS notices and makes recalls notices available to be configured in patron messaging preferences.
Comment 39 Aleisha Amohia 2024-04-21 23:14:59 UTC
Created attachment 165241 [details] [review]
Bug 23781: Tests for Recalls messaging preferences

- t/db_dependent/Koha/Recall.t
- t/db_dependent/Koha/Recalls.t
Comment 40 Aleisha Amohia 2024-04-21 23:15:03 UTC
Created attachment 165242 [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, restart services
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
17) Confirm that 'Unknown' doesn't show in the the staff and OPAC messaging preferences tables when UseRecalls syspref is disabled

Sponsored-by: Toi Ohomai Institute of Technology
Comment 41 David Nind 2024-04-22 06:28:37 UTC
Everything worked OK to me, except that I had to run the updatedatabase twice for the "Recall awaiting pickup" and "Return recalled item" options to appear under the patron messaging preferences.

Other testing notes (using KTD):
1. Enable the SMSSendDriver system preference (using the Email option) for SMS options to appear under patron messaging preferences.
Comment 42 Aleisha Amohia 2024-04-24 05:16:17 UTC
(In reply to David Nind from comment #41)
> Everything worked OK to me, except that I had to run the updatedatabase
> twice for the "Recall awaiting pickup" and "Return recalled item" options to
> appear under the patron messaging preferences.
> 

Mmm I noticed that too, a bit weird and will definitely caused problems for users ... I'm not sure of a way around that except taking the 'IGNORE' out if 'INSERT IGNORE INTO' for the message_attributes update. What do you think?
Comment 43 David Nind 2024-04-24 19:24:22 UTC
(In reply to Aleisha Amohia from comment #42)
> Mmm I noticed that too, a bit weird and will definitely caused problems for
> users ... I'm not sure of a way around that except taking the 'IGNORE' out
> if 'INSERT IGNORE INTO' for the message_attributes update. What do you think?

Sorry, I don't know enough about database updates to comment with any real understanding. Normally, I've only had to run the updatedatabase once for a bug.
Comment 44 Aleisha Amohia 2024-04-26 02:20:15 UTC
Created attachment 165593 [details] [review]
Bug 23781 (follow-up): Reorder atomic updates

so they apply when run the first time.
Comment 45 David Nind 2024-04-26 08:40:43 UTC
Created attachment 165614 [details] [review]
Bug 23781: Database updates

This patch adds RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM SMS notices and makes recalls notices available to be configured in patron messaging preferences.

Signed-off-by: David Nind <david@davidnind.com>
Comment 46 David Nind 2024-04-26 08:40:46 UTC
Created attachment 165615 [details] [review]
Bug 23781: Tests for Recalls messaging preferences

- t/db_dependent/Koha/Recall.t
- t/db_dependent/Koha/Recalls.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 47 David Nind 2024-04-26 08:40:49 UTC
Created attachment 165616 [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, restart services
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
17) Confirm that 'Unknown' doesn't show in the the staff and OPAC messaging preferences tables when UseRecalls syspref is disabled

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Comment 48 David Nind 2024-04-26 08:40:53 UTC
Created attachment 165617 [details] [review]
Bug 23781 (follow-up): Reorder atomic updates

so they apply when run the first time.

Signed-off-by: David Nind <david@davidnind.com>
Comment 49 Kyle M Hall (khall) 2024-07-19 11:41:40 UTC
Created attachment 169201 [details] [review]
Bug 23781: Database updates

This patch adds RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM SMS notices and makes recalls notices available to be configured in patron messaging preferences.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 50 Kyle M Hall (khall) 2024-07-19 11:42:25 UTC
Created attachment 169202 [details] [review]
Bug 23781: Database updates

This patch adds RETURN_RECALLED_ITEM and PICKUP_RECALLED_ITEM SMS notices and makes recalls notices available to be configured in patron messaging preferences.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 51 Kyle M Hall (khall) 2024-07-19 11:42:32 UTC
Created attachment 169203 [details] [review]
Bug 23781: Tests for Recalls messaging preferences

- t/db_dependent/Koha/Recall.t
- t/db_dependent/Koha/Recalls.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 52 Kyle M Hall (khall) 2024-07-19 11:42:35 UTC
Created attachment 169204 [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, restart services
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
17) Confirm that 'Unknown' doesn't show in the the staff and OPAC messaging preferences tables when UseRecalls syspref is disabled

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 53 Kyle M Hall (khall) 2024-07-19 11:42:37 UTC
Created attachment 169205 [details] [review]
Bug 23781: (follow-up) Reorder atomic updates

so they apply when run the first time.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 54 Martin Renvoize (ashimema) 2024-07-23 16:02:49 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 55 Lucas Gass (lukeg) 2024-08-28 20:24:52 UTC
Enhancement will not be included in the 24.05.x series