[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2024-03-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com
 Status|Needs Signoff   |Patch doesn't apply

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595
Bug 18595 depends on bug 17499, which changed state.

Bug 17499 Summary: Koha objects for messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17499

   What|Removed |Added

 Status|Pushed to master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #113769|0   |1
is obsolete||

--- Comment #133 from Lari Taskula  ---
Created attachment 146552
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146552=edit
Bug 18595: (follow-up) Remove duplicated logic

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #113222|0   |1
is obsolete||

--- Comment #132 from Lari Taskula  ---
Created attachment 146551
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146551=edit
Bug 18595: (follow-up) Catch message preference exceptions in OPAC

This patch handles message preference exceptions in OPAC messaging template
instead of the usual white "Internal Server Error" screen.

To test:
0. This test plan assumes you have a default Koha installation that adds
   message attributes and transports from
   installer/data/mysql/mandatory/sample_notices_message_attributes.sql and
   installer/data/mysql/mandatory/sample_notices_message_transports.sql

1. Open developer tools, select console and run the following command:

$('#email1').val('non-existing message transport type').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
Message transport type non-existing message transport type does not exist.

2. Open developer tools, select console and run the following command:

$($('select[name="2-DAYS"] option')[0]).attr('value', 31);
$('form[name=opacmessaging]').submit();

Observe error:
Days in advance selection is out of range. The value must be between 0 and 30.

3. Run SQL command:

delete from message_transports where message_attribute_id=1 and is_digest=0 \
and message_transport_type='email';

Open developer tools, select console and run the following command:

$('#digest1').prop('checked', false);
$('#forcedigest1').remove();
$('form[name=opacmessaging]').submit();

Observe error:
Digest must be selected for Item_Due.

Recover your test database by running the following SQL command:

insert into message_transports (message_attribute_id, message_transport_type, \
is_digest, letter_module, letter_code) values (1, 'email', 0, 'circulation', \
'DUE');

4. Remove your email address, open developer tools, select console and run the
following command:

$('#email1').removeAttr('disabled');
$('#email1').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
You cannot select email notifications because you haven't set an email address.

5. Remove your SMS number, open developer tools, select console and run the
following command:

$('#sms1').removeAttr('disabled');
$('#sms1').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
You cannot select SMS notifications because you haven't set an SMS number
address.

6. The rest of the template error messages are currently inaccessible and
therefore untestable via GUI, but check the changes this patch introduces
manually. These exceptions are:

Koha::Exceptions::Patron::MessagePreference::AttributeNotFound
Koha::Exceptions::Patron::MessagePreference::DaysInAdvanceNotAvailable
Koha::Exceptions::Patron::MessagePreference::DigestNotAvailable

You can test them programmatically by searching opac-messaging.pl for the
following:

C4::Form::MessagingPreferences::handle_form_action( ...

and throwing each exception before it by following code:

Koha::Exceptions::Patron::MessagePreference::AttributeNotFound->throw();

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #113221|0   |1
is obsolete||

--- Comment #131 from Lari Taskula  ---
Created attachment 146550
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146550=edit
Bug 18595: (follow-up) Disable transports if missing contact information

To test:
Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC
- SMSSendDriver

 GENERAL 
1. Apply patch

 PREREQUISITES 
1. Select a patron to test this patch with
2. Remove patron's primary email
3. Remove patron's SMS number

 OPAC 
1. Login to OPAC with your test patron.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe two warnings "Cannot select email notifications" and
   "Cannot select SMS notifications"
4. See that the SMS and Email checkboxes are disabled in the messaging
   preferences table.
5. At the bottom of the page, set SMS number
6. Observe "Cannot select SMS notifications" gone and SMS checkboxes clickable
7. Give your test patron a primary email address
8. Refresh OPAC "your messaging" page
9. Observe all warnings are now gone and both SMS number and Email checkboxes
   in the messaging preferences table are clickable.
10. Set patron some messaging preferences and make sure your change applies.

 INTRANET 
1. Repeat "OPAC" steps but instead of "your messaging" page, use the
   "Modify patron" view.

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112155|0   |1
is obsolete||

--- Comment #130 from Lari Taskula  ---
Created attachment 146549
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146549=edit
Bug 18595: Validate days_in_advance

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112154|0   |1
is obsolete||

--- Comment #129 from Lari Taskula  ---
Created attachment 146548
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146548=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
SQL: delete from message_transports where message_attribute_id=1 and
is_digest=0;
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112153|0   |1
is obsolete||

--- Comment #128 from Lari Taskula  ---
Created attachment 146547
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146547=edit
Bug 18595: Remove references to C4::Members::Messaging

To test:
1. grep -r 'C4::Members::Messaging'
   This command should not produce any results in Koha source code after this
   patch.
2. Check the pages touched by this commit
3. Try setting and viewing patron and patron category messaging preferences

As this completes the move from C4::Members::Messaging to new Koha-objects for
messaging preferences, everything should be ready for proper testing.

Make sure you have EnhancedMessagingPreferences system preference enabled.
Then, try creating new categories and setting default messaging preferences,
as well as editing the messaging preferences of the already existing
categories.
Try adding new patrons and make sure the default patron messaging preferences
are by default the same that you set for that category. Edit already exisiting
patrons' messaging preferences and make sure changes are applied. Observe
no crash at any point, otherwise fail this patch. Don't forget to test both
intranet and OPAC.

Finally, run unit tests:
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112152|0   |1
is obsolete||

--- Comment #127 from Lari Taskula  ---
Created attachment 146546
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146546=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreference

This patch moves C4::Members::Messaging::SetMessagingPreference to
Koha::Patron::MessagePreference
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "SetMessagingPreference"
   (grep -r 'SetMessagingPreference').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t
4. prove t/db_dependent/api/v1/patrons.t

Works as expected. QA tools fails with:
FAILC4/Members/Messaging.pm pod empty section in previous paragraph
Can be fixed in a followup.
Signed-off-by: Marc Véron 

QA tools pass now OK
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112151|0   |1
is obsolete||

--- Comment #126 from Lari Taskula  ---
Created attachment 146545
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146545=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingPreferences

This patch moves C4::Members::Messaging::GetMessagingPreferences to
Koha::Patron::MessagePreference(s)
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingPreferences"
   (grep -r 'GetMessagingPreferences').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t
4. prove t/db_dependent/api/v1/patrons.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112150|0   |1
is obsolete||

--- Comment #125 from Lari Taskula  ---
Created attachment 146544
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146544=edit
Bug 18595: Unit tests preparing for GetMessagingPreferences move

This patch prepares removing GetMessagingPreferences by adding some useful unit
tests for subroutines that the move targets.

Reserves.t already covers print notice, but this patch adds tests for a set
transport type.

To test:
1. Run t/db_dependent/Circulation.t
2. Run t/db_dependent/Reserves.t
3. Observe test pass

Works together with followup patch
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112149|0   |1
is obsolete||

--- Comment #124 from Lari Taskula  ---
Created attachment 146543
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146543=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreferencesFromDefaults

This patch moves C4::Members::SetMessagingPreferencesFromDefaults to
Koha::Patron->set_default_messaging_preferences

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of
"SetMessagingPreferencesFromDefaults"
   (grep -r 'SetMessagingPreferencesFromDefaults').
3. Observe no results in source code.

 INTRANET 
1. Login to intranet.
2. Go to Administration -> Patron categories -> Edit (for any category)
3. Scroll down to observe default messaging preferences for this patron
category
4. Observe the preferences, remember them for the next step.
5. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
6. Look at messaging preferences. They should be same as in step 4.
7. Fill in required data, do not modify messaging preferences, click Save.
8. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112148|0   |1
is obsolete||

--- Comment #123 from Lari Taskula  ---
Created attachment 146542
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146542=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingOptions

This patch moves C4::Members::GetMessagingOptions to
Koha::Patron::MessagePreferences->get_options.

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

This patch also removes previously unused GetMessagingOptions in
opac-messaging.pl

To test:

Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingOptions"
   (grep -r 'GetMessagingOptions').
3. Observe no results in source code.

 OPAC 
1. Login to OPAC.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.

 INTRANET 
1. Login to intranet.
2. Go to edit patron's details and scroll down to their messaging preferences.
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.
6. Go to Administration -> Patron categories -> Edit (for any category)
7. Scroll down to observe default messaging preferences for this patron
category
8. Observe the preferences looking normal and as they should be.
9. Set any combination of messaging preferences.
10. Observe them apply as expected, repeat step 9-10 as much as you like.
11. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
12. Fill in required data, do not modify messaging preferences, click Save.
13. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112147|0   |1
is obsolete||

--- Comment #122 from Lari Taskula  ---
Created attachment 146541
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146541=edit
Bug 18595: Unit tests for Koha::Patron::Categories->default_messaging

This patch adds unit tests for Koha::Patron::Categories->default_messaging.
Tests
will help preparing for moving C4::Members::Messaging to Koha-objects.

To test:
1. Run t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2023-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2022-11-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Depends on||32357


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32357
[Bug 32357] Set borrower_message_preferences.days_in_advance default to NULL
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2022-09-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #121 from Lari Taskula  ---
(In reply to Joonas Kylmälä from comment #120)
> Lari, will you continue working on this? Currently the patches don't apply.

Yes! Thanks for bringing it up. I will do a rebase in the following days.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||joonas.kylm...@iki.fi

--- Comment #120 from Joonas Kylmälä  ---
Lari, will you continue working on this? Currently the patches don't apply.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #119 from Lari Taskula  ---
Created attachment 113769
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113769=edit
Bug 18595: (follow-up) Remove duplicated logic

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #113126|0   |1
is obsolete||

--- Comment #118 from Lari Taskula  ---
Created attachment 113222
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113222=edit
Bug 18595: (follow-up) Catch message preference exceptions in OPAC

This patch handles message preference exceptions in OPAC messaging template
instead of the usual white "Internal Server Error" screen.

To test:
0. This test plan assumes you have a default Koha installation that adds
   message attributes and transports from
   installer/data/mysql/mandatory/sample_notices_message_attributes.sql and
   installer/data/mysql/mandatory/sample_notices_message_transports.sql

1. Open developer tools, select console and run the following command:

$('#email1').val('non-existing message transport type').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
Message transport type non-existing message transport type does not exist.

2. Open developer tools, select console and run the following command:

$($('select[name="2-DAYS"] option')[0]).attr('value', 31);
$('form[name=opacmessaging]').submit();

Observe error:
Days in advance selection is out of range. The value must be between 0 and 30.

3. Run SQL command:

delete from message_transports where message_attribute_id=1 and is_digest=0 \
and message_transport_type='email';

Open developer tools, select console and run the following command:

$('#digest1').prop('checked', false);
$('#forcedigest1').remove();
$('form[name=opacmessaging]').submit();

Observe error:
Digest must be selected for Item_Due.

Recover your test database by running the following SQL command:

insert into message_transports (message_attribute_id, message_transport_type, \
is_digest, letter_module, letter_code) values (1, 'email', 0, 'circulation', \
'DUE');

4. Remove your email address, open developer tools, select console and run the
following command:

$('#email1').removeAttr('disabled');
$('#email1').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
You cannot select email notifications because you haven't set an email address.

5. Remove your SMS number, open developer tools, select console and run the
following command:

$('#sms1').removeAttr('disabled');
$('#sms1').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
You cannot select SMS notifications because you haven't set an SMS number
address.

6. The rest of the template error messages are currently inaccessible and
therefore untestable via GUI, but check the changes this patch introduces
manually. These exceptions are:

Koha::Exceptions::Patron::Message::Preference::AttributeNotFound
Koha::Exceptions::Patron::Message::Preference::DaysInAdvanceNotAvailable
Koha::Exceptions::Patron::Message::Preference::DigestNotAvailable

You can test them programmatically by searching opac-messaging.pl for the
following:

C4::Form::MessagingPreferences::handle_form_action( ...

and throwing each exception before it by following code:

Koha::Exceptions::Patron::Message::Preference::AttributeNotFound->throw();

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #113192|0   |1
is obsolete||

--- Comment #117 from Lari Taskula  ---
Created attachment 113221
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113221=edit
Bug 18595: (follow-up) Disable transports if missing contact information

To test:
Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC
- SMSSendDriver

 GENERAL 
1. Apply patch

 PREREQUISITES 
1. Select a patron to test this patch with
2. Remove patron's primary email
3. Remove patron's SMS number

 OPAC 
1. Login to OPAC with your test patron.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe two warnings "Cannot select email notifications" and
   "Cannot select SMS notifications"
4. See that the SMS and Email checkboxes are disabled in the messaging
   preferences table.
5. At the bottom of the page, set SMS number
6. Refresh page, observe only one warning "Cannot select email notifications"
   and observe the SMS checkboxes are now clickable.
7. Give your test patron a primary email address
8. Refresh OPAC "your messaging" page
9. Observe all warnings are now gone and both SMS number and Email checkboxes
   in the messaging preferences table are clickable.
10. Set patron some messaging preferences and make sure your change applies.

 INTRANET 
1. Repeat "OPAC" steps but instead of "your messaging" page, use the
   "Modify patron" view.

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-11-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112690|0   |1
is obsolete||

--- Comment #116 from Lari Taskula  ---
Created attachment 113192
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113192=edit
Bug 18595: (follow-up) Disable transports if missing contact information

To test:
Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC
- SMSSendDriver

 GENERAL 
1. Apply patch

 PREREQUISITES 
1. Select a patron to test this patch with
2. Remove patron's primary email
3. Remove patron's SMS number

 OPAC 
1. Login to OPAC with your test patron.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe two warnings "Your user account is missing email address" and
   "Your user account is missing SMS number"
4. See that the SMS and Email checkboxes are disabled in the messaging
   preferences table.
5. At the bottom of the page, set SMS number
6. Refresh page, observe only one warning "Your user account is missing
   email address" and observe the SMS checkboxes are now clickable.
7. Give your test patron a primary email address
8. Refresh OPAC "your messaging" page
9. Observe all warnings are now gone and both SMS number and Email checkboxes
   in the messaging preferences table are clickable.
10. Set patron some messaging preferences and make sure your change applies.

 INTRANET 
1. Repeat "OPAC" steps but instead of "your messaging" page, use the
   "Modify patron" view.

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-11-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #115 from Lari Taskula  ---
Created attachment 113126
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113126=edit
Bug 18595: (follow-up) Catch message preference exceptions in OPAC

This patch handles message preference exceptions in OPAC messaging template
instead of the usual white "Internal Server Error" screen.

To test:
0. This test plan assumes you have a default Koha installation that adds
   message attributes and transports from
   installer/data/mysql/mandatory/sample_notices_message_attributes.sql and
   installer/data/mysql/mandatory/sample_notices_message_transports.sql

1. Open developer tools, select console and run the following command:

$('#email1').val('non-existing message transport type').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
Message transport type non-existing message transport type does not exist.

2. Open developer tools, select console and run the following command:

$($('select[name="2-DAYS"] option')[0]).attr('value', 31);
$('form[name=opacmessaging]').submit();

Observe error:
Days in advance selection is out of range. The value must be between 0 and 30.

3. Run SQL command:

delete from message_transports where message_attribute_id=1 and is_digest=0 \
and message_transport_type='email';

Open developer tools, select console and run the following command:

$('#digest1').prop('checked', false);
$('#forcedigest1').remove();
$('form[name=opacmessaging]').submit();

Observe error:
Digest must be selected for Item_Due.

Recover your test database by running the following SQL command:

insert into message_transports (message_attribute_id, message_transport_type, \
is_digest, letter_module, letter_code) values (1, 'email', 0, 'circulation', \
'DUE');

4. Remove your email address, open developer tools, select console and run the
following command:

$('#email1').removeAttr('disabled');
$('#email1').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
You cannot select email notifications because you haven't set an email address.

5. Remove your SMS number, open developer tools, select console and run the
following command:

$('#sms1').removeAttr('disabled');
$('#sms1').prop('checked', true);
$('form[name=opacmessaging]').submit();

Observe error:
You cannot select SMS notifications because you haven't set an SMS number
address.

6. The rest of the template error messages are currently inaccessible and
therefore untestable via GUI, but check the changes this patch introduces
manually. These exceptions are:

Koha::Exceptions::Patron::Message::Preference::AttributeNotFound
Koha::Exceptions::Patron::Message::Preference::DaysInAdvanceNotAvailable
Koha::Exceptions::Patron::Message::Preference::DigestNotAvailable

You can test them programmatically by searching opac-messaging.pl for the
following:

C4::Form::MessagingPreferences::handle_form_action( ...

and throwing each exception before it by following code:

Koha::Exceptions::Patron::Message::Preference::AttributeNotFound->throw();

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-11-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #114 from Lari Taskula  ---
(In reply to Joonas Kylmälä from comment #109)
> More robust input handling in OPAC needed
> =
> 
> In the opac messaging preferences change with the HTML dev console the value
> of "Days in advance" to be 50 and submit the request, you will then get
> following error:
> 
> > days_in_advance has to be a value between 0-30 for Advance_Notice. at 
> > /usr/share/perl5/Exception/Class/Base.pm line 88
> 
> Expected outcome: a nicer result is shown to the user about invalid
> parameters, we should handle all errors in the code.

This requires us to revisit Bug 17499. We need more detailed Koha::Exceptions
to have translatable error messages in the GUI. Because now we throw multiple
Koha::Exceptions::BadParameter and specifying the problem in its 'error' field.
While we could parse the error message itself, I don't think that's a good
idea.

Instead we would throw something like
Koha::Exceptions::Patron::Message::Preference::DaysInAdvanceOutOfRange with
'min' and 'max' parameters.

The more formal the exceptions the better.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #113 from Lari Taskula  ---
Created attachment 112690
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112690=edit
Bug 18595: (follow-up) Disable transports if missing contact information

To test:
Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC
- SMSSendDriver

 GENERAL 
1. Apply patch

 PREREQUISITES 
1. Select a patron to test this patch with
2. Remove patron's primary email
3. Remove patron's SMS number

 OPAC 
1. Login to OPAC with your test patron.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe two warnings "Your user account is missing email address" and
   "Your user account is missing SMS number"
4. See that the SMS and Email checkboxes are disabled in the messaging
   preferences table.
5. At the bottom of the page, set SMS number
6. Refresh page, observe only one warning "Your user account is missing
   email address" and observe the SMS checkboxes are now clickable.
7. Give your test patron a primary email address
8. Refresh OPAC "your messaging" page
9. Observe all warnings are now gone and both SMS number and Email checkboxes
   in the messaging preferences table are clickable.
10. Set patron some messaging preferences and make sure your change applies.

 INTRANET 
1. Repeat "OPAC" steps but instead of "your messaging" page, use the
   "Modify patron" view.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

   Assignee|emmi.takki...@outlook.com   |lari.task...@hypernova.fi

--- Comment #112 from Lari Taskula  ---
After discussing with Emmi, I will be taking over this Bug once again and fix
the issues mentioned above.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #111 from Emmi Takkinen  ---
(In reply to Joonas Kylmälä from comment #109)
> Some things need a bit more work:
> 
> If no patron email we get error
> ===
> 
> 1. Add patron without email
> 2. Go to cgi-bin/koha/opac-messaging.pl and select email checkbox for every
> messaging setting
> 3. Observe following error:
> 
> > Patron has not set email address, cannot use email as message transport at 
> > /usr/share/perl5/Exception/Class/Base.pm line 88
> > 1. in Exception::Class::Base::throw at 
> > /usr/share/perl5/Exception/Class/Base.pm line 88
> > 2. in Koha::Patron::Message::Preference::_set_message_transport_types at 
> > /kohadevbox/koha/Koha/Patron/Message/Preference.pm line 409
> > 3. in Koha::Patron::Message::Preference::message_transport_types at 
> > /kohadevbox/koha/Koha/Patron/Message/Preference.pm line 224
> > 4. in Koha::Patron::Message::Preference::set at 
> > /kohadevbox/koha/Koha/Patron/Message/Preference.pm line 247
> > 5. in C4::Form::MessagingPreferences::handle_form_action at 
> > /kohadevbox/koha/C4/Form/MessagingPreferences.pm line 110
> > 6. in (eval) at /kohadevbox/koha/opac/opac-messaging.pl line 67
> 
> After fixing this it should be made sure also that removing email address in
> a patron which had the messaging preferences removes the messaging
> preferences (or handles it some proper way).
> 
Same error occurs in the staff client if we have email as message transport
type for patron (I'm guessing that error will also be raised if sms number
isn't set but is chosen as message preference). However patron is still saved. 

I'm not sure if automatically removing message preference is a good approach.
Maybe preventing form from sending and error message like 'Patron has email as
message transport type but not email. Either provide valid email or change
patrons messaging preferences.' is enough. Hmm, or error message next to input
field.

> More robust input handling in OPAC needed
> =
> 
> In the opac messaging preferences change with the HTML dev console the value
> of "Days in advance" to be 50 and submit the request, you will then get
> following error:
> 
> > days_in_advance has to be a value between 0-30 for Advance_Notice. at 
> > /usr/share/perl5/Exception/Class/Base.pm line 88
> 
> Expected outcome: a nicer result is shown to the user about invalid
> parameters, we should handle all errors in the code.
> 
Again same occurs in the staff client. All in all we need better error handling
with these changes.

> What do the last two commits do
> ===
> 
> Bug 18595: Disable digest checkbox when forced on:
>  - This one maybe I don't understand because of the first error caused by
> missing email. Specifically I don't understand in which situation the digest
> checkbox should be disabled.
> 
> 
> Bug 18595: Validate days_in_advance
>  - What does this do exactly? I see it change days_in_advance=NULL but what
> is the reason behind that?
> 
Lari already commented these. With last one I agree some cleanup might be
needed. First one I understand but I think it's worth checking other options...
Could we e.g. disable checkbox with jQuery?

> QA tool errors
> ==
> 
> $ koha-qa.pl -v 2 -c 9
> 
>  FAIL C4/Reserves.pm
>FAIL critic
>   # Variables::ProhibitConditionalDeclarations: Got 1 
> violation(s).  
>OK   forbidden patterns
>OK   git manipulation
>OK   pod
>OK   pod coverage
>OK   spelling
>OK   valid
> 
>  FAIL circ/returns.pl
>FAIL critic
>   # Variables::ProhibitConditionalDeclarations: Got 1 
> violation(s).  
>OK   forbidden patterns
>OK   git manipulation
>OK   pod
>OK   spelling
>OK   valid
> 
>  FAIL koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
>OK   filters
>OK   forbidden patterns
>OK   git manipulation
>OK   js_in_body
>OK   spelling
>FAIL tt_valid
>   lines 163, 169
>OK   valid_template
> 
>  FAIL koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
>OK   filters
>OK   forbidden patterns
>OK   git manipulation
>OK   js_in_body
>OK   spelling
>FAIL tt_valid
>   lines 131, 133
>OK   valid_template
> 
> For the critic qa errors see the details with for example using 
> 
> $ perlcritic circ/returns.pl
> $ perlcritic C4/Reserves.pm
> 
> Not quite sure how to fix the template issues.
> 
My guess is that if statement isn't allowed to be used inside input tag.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs 

[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #110 from Lari Taskula  ---
(In reply to Joonas Kylmälä from comment #109)
> What do the last two commits do
> ===
> 
> Bug 18595: Disable digest checkbox when forced on:
>  - This one maybe I don't understand because of the first error caused by
> missing email. Specifically I don't understand in which situation the digest
> checkbox should be disabled.
There are libraries that wish to only send notifications as digests. IIRC, the
only way to achieve this was to configure it directly in the database via
"message_transports" table by removing rows where "is_digest" is 0. This patch
disables digest checkbox elements in such cases.

> Bug 18595: Validate days_in_advance
>  - What does this do exactly? I see it change days_in_advance=NULL but what
> is the reason behind that?
It's been 3 years since I provided these patches so I can't exactly remember
why and where but some patron messaging preferences had invalid values for
borrower_message_preferences.days_in_advance column and it caused plenty of
"Internal Server Error" messages in production. No idea whether it came from
Koha bugs at some point in the history, or from sysadmins themselves, but I
suppose it's safer to do a little database cleanup and run such query because
it simply nulls days_in_advance for every option that does not allow it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #109 from Joonas Kylmälä  ---
Some things need a bit more work:

If no patron email we get error
===

1. Add patron without email
2. Go to cgi-bin/koha/opac-messaging.pl and select email checkbox for every
messaging setting
3. Observe following error:

> Patron has not set email address, cannot use email as message transport at 
> /usr/share/perl5/Exception/Class/Base.pm line 88
> 1. in Exception::Class::Base::throw at 
> /usr/share/perl5/Exception/Class/Base.pm line 88
> 2. in Koha::Patron::Message::Preference::_set_message_transport_types at 
> /kohadevbox/koha/Koha/Patron/Message/Preference.pm line 409
> 3. in Koha::Patron::Message::Preference::message_transport_types at 
> /kohadevbox/koha/Koha/Patron/Message/Preference.pm line 224
> 4. in Koha::Patron::Message::Preference::set at 
> /kohadevbox/koha/Koha/Patron/Message/Preference.pm line 247
> 5. in C4::Form::MessagingPreferences::handle_form_action at 
> /kohadevbox/koha/C4/Form/MessagingPreferences.pm line 110
> 6. in (eval) at /kohadevbox/koha/opac/opac-messaging.pl line 67

After fixing this it should be made sure also that removing email address in a
patron which had the messaging preferences removes the messaging preferences
(or handles it some proper way).

More robust input handling in OPAC needed
=

In the opac messaging preferences change with the HTML dev console the value of
"Days in advance" to be 50 and submit the request, you will then get following
error:

> days_in_advance has to be a value between 0-30 for Advance_Notice. at 
> /usr/share/perl5/Exception/Class/Base.pm line 88

Expected outcome: a nicer result is shown to the user about invalid parameters,
we should handle all errors in the code.

What do the last two commits do
===

Bug 18595: Disable digest checkbox when forced on:
 - This one maybe I don't understand because of the first error caused by
missing email. Specifically I don't understand in which situation the digest
checkbox should be disabled.


Bug 18595: Validate days_in_advance
 - What does this do exactly? I see it change days_in_advance=NULL but what is
the reason behind that?

QA tool errors
==

$ koha-qa.pl -v 2 -c 9

 FAIL   C4/Reserves.pm
   FAIL   critic
# Variables::ProhibitConditionalDeclarations: Got 1
violation(s).  
   OK forbidden patterns
   OK git manipulation
   OK pod
   OK pod coverage
   OK spelling
   OK valid

 FAIL   circ/returns.pl
   FAIL   critic
# Variables::ProhibitConditionalDeclarations: Got 1
violation(s).  
   OK forbidden patterns
   OK git manipulation
   OK pod
   OK spelling
   OK valid

 FAIL   koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
   OK filters
   OK forbidden patterns
   OK git manipulation
   OK js_in_body
   OK spelling
   FAIL   tt_valid
lines 163, 169
   OK valid_template

 FAIL   koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
   OK filters
   OK forbidden patterns
   OK git manipulation
   OK js_in_body
   OK spelling
   FAIL   tt_valid
lines 131, 133
   OK valid_template

For the critic qa errors see the details with for example using 

$ perlcritic circ/returns.pl
$ perlcritic C4/Reserves.pm

Not quite sure how to fix the template issues.

That's all the issues I spotted. The code review I did didn't find any issues
and all the test mentioned in the test plan work.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #108 from Emmi Takkinen  ---
(In reply to Joonas Kylmälä from comment #98)
> Hi Emmi,
> 
> thanks for the rebases. I did code review and everything is looking really
> good! I have some trouble setting up my koha-testing-docker right now so I
> still need to go over the test plan for these patches. Could you meanwhile
> 
> a) Add your Rebased-by: Emmi Takkinen  git
> trailer so that there will be a "paper trail" of you doing changes, now it
> basically reads that Lari did everything and also that the people
> signing-off here would have signed-off these changes but in actuality they
> have not. Please Add the Rebased-by trailer after the signed-off-by lines so
> that we know they were tested in a earlier revision and give credit for the
> people doing that.
> 
> b) Rebase one more time. There was minor merge conflict with one of the
> patches.

Rebased and fixed minor merge conflict with tests. Added git trailer after
sign-offs (followed instruction here:
https://wiki.koha-community.org/wiki/Commit_messages)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110159|0   |1
is obsolete||

--- Comment #107 from Emmi Takkinen  ---
Created attachment 112155
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112155=edit
Bug 18595: Validate days_in_advance

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110157|0   |1
is obsolete||

--- Comment #105 from Emmi Takkinen  ---
Created attachment 112153
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112153=edit
Bug 18595: Remove references to C4::Members::Messaging

To test:
1. grep -r 'C4::Members::Messaging'
   This command should not produce any results in Koha source code after this
   patch.
2. Check the pages touched by this commit
3. Try setting and viewing patron and patron category messaging preferences

As this completes the move from C4::Members::Messaging to new Koha-objects for
messaging preferences, everything should be ready for proper testing.

Make sure you have EnhancedMessagingPreferences system preference enabled.
Then, try creating new categories and setting default messaging preferences,
as well as editing the messaging preferences of the already existing
categories.
Try adding new patrons and make sure the default patron messaging preferences
are by default the same that you set for that category. Edit already exisiting
patrons' messaging preferences and make sure changes are applied. Observe
no crash at any point, otherwise fail this patch. Don't forget to test both
intranet and OPAC.

Finally, run unit tests:
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110158|0   |1
is obsolete||

--- Comment #106 from Emmi Takkinen  ---
Created attachment 112154
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112154=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
SQL: delete from message_transports where message_attribute_id=1 and
is_digest=0;
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110156|0   |1
is obsolete||

--- Comment #104 from Emmi Takkinen  ---
Created attachment 112152
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112152=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreference

This patch moves C4::Members::Messaging::SetMessagingPreference to
Koha::Patron::Message::Preference
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "SetMessagingPreference"
   (grep -r 'SetMessagingPreference').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Works as expected. QA tools fails with:
FAILC4/Members/Messaging.pm pod empty section in previous paragraph
Can be fixed in a followup.
Signed-off-by: Marc Véron 

QA tools pass now OK
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110155|0   |1
is obsolete||

--- Comment #103 from Emmi Takkinen  ---
Created attachment 112151
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112151=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingPreferences

This patch moves C4::Members::Messaging::GetMessagingPreferences to
Koha::Patron::Message::Preference(s)
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingPreferences"
   (grep -r 'GetMessagingPreferences').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110154|0   |1
is obsolete||

--- Comment #102 from Emmi Takkinen  ---
Created attachment 112150
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112150=edit
Bug 18595: Unit tests preparing for GetMessagingPreferences move

This patch prepares removing GetMessagingPreferences by adding some useful unit
tests for subroutines that the move targets.

Reserves.t already covers print notice, but this patch adds tests for a set
transport type.

To test:
1. Run t/db_dependent/Circulation.t
2. Run t/db_dependent/Reserves.t
3. Observe test pass

Works together with followup patch
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110153|0   |1
is obsolete||

--- Comment #101 from Emmi Takkinen  ---
Created attachment 112149
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112149=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreferencesFromDefaults

This patch moves C4::Members::SetMessagingPreferencesFromDefaults to
Koha::Patron->set_default_messaging_preferences

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of
"SetMessagingPreferencesFromDefaults"
   (grep -r 'SetMessagingPreferencesFromDefaults').
3. Observe no results in source code.

 INTRANET 
1. Login to intranet.
2. Go to Administration -> Patron categories -> Edit (for any category)
3. Scroll down to observe default messaging preferences for this patron
category
4. Observe the preferences, remember them for the next step.
5. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
6. Look at messaging preferences. They should be same as in step 4.
7. Fill in required data, do not modify messaging preferences, click Save.
8. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110152|0   |1
is obsolete||

--- Comment #100 from Emmi Takkinen  ---
Created attachment 112148
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112148=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingOptions

This patch moves C4::Members::GetMessagingOptions to
Koha::Patron::Message::Preferences->get_options.

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

This patch also removes previously unused GetMessagingOptions in
opac-messaging.pl

To test:

Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingOptions"
   (grep -r 'GetMessagingOptions').
3. Observe no results in source code.

 OPAC 
1. Login to OPAC.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.

 INTRANET 
1. Login to intranet.
2. Go to edit patron's details and scroll down to their messaging preferences.
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.
6. Go to Administration -> Patron categories -> Edit (for any category)
7. Scroll down to observe default messaging preferences for this patron
category
8. Observe the preferences looking normal and as they should be.
9. Set any combination of messaging preferences.
10. Observe them apply as expected, repeat step 9-10 as much as you like.
11. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
12. Fill in required data, do not modify messaging preferences, click Save.
13. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #110151|0   |1
is obsolete||

--- Comment #99 from Emmi Takkinen  ---
Created attachment 112147
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112147=edit
Bug 18595: Unit tests for Koha::Patron::Categories->default_messaging

This patch adds unit tests for Koha::Patron::Categories->default_messaging.
Tests
will help preparing for moving C4::Members::Messaging to Koha-objects.

To test:
1. Run t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 
Rebased-by: Emmi Takkinen 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-10-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Joonas Kylmälä  changed:

   What|Removed |Added

 CC||joonas.kylm...@helsinki.fi

--- Comment #98 from Joonas Kylmälä  ---
Hi Emmi,

thanks for the rebases. I did code review and everything is looking really
good! I have some trouble setting up my koha-testing-docker right now so I
still need to go over the test plan for these patches. Could you meanwhile

a) Add your Rebased-by: Emmi Takkinen  git trailer
so that there will be a "paper trail" of you doing changes, now it basically
reads that Lari did everything and also that the people signing-off here would
have signed-off these changes but in actuality they have not. Please Add the
Rebased-by trailer after the signed-off-by lines so that we know they were
tested in a earlier revision and give credit for the people doing that.

b) Rebase one more time. There was minor merge conflict with one of the
patches.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #97 from Katrin Fischer  ---
Hi Emmi, thx for adopting this one!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |emmi.takki...@outlook.com
   |ity.org |
 Status|Patch doesn't apply |Needs Signoff

--- Comment #96 from Emmi Takkinen  ---
Rebased and tested against current master and bug 17499.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103452|0   |1
is obsolete||

--- Comment #95 from Emmi Takkinen  ---
Created attachment 110159
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110159=edit
Bug 18595: Validate days_in_advance

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103451|0   |1
is obsolete||

--- Comment #94 from Emmi Takkinen  ---
Created attachment 110158
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110158=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
SQL: delete from message_transports where message_attribute_id=1 and
is_digest=0;
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103450|0   |1
is obsolete||

--- Comment #93 from Emmi Takkinen  ---
Created attachment 110157
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110157=edit
Bug 18595: Remove references to C4::Members::Messaging

To test:
1. grep -r 'C4::Members::Messaging'
   This command should not produce any results in Koha source code after this
   patch.
2. Check the pages touched by this commit
3. Try setting and viewing patron and patron category messaging preferences

As this completes the move from C4::Members::Messaging to new Koha-objects for
messaging preferences, everything should be ready for proper testing.

Make sure you have EnhancedMessagingPreferences system preference enabled.
Then, try creating new categories and setting default messaging preferences,
as well as editing the messaging preferences of the already existing
categories.
Try adding new patrons and make sure the default patron messaging preferences
are by default the same that you set for that category. Edit already exisiting
patrons' messaging preferences and make sure changes are applied. Observe
no crash at any point, otherwise fail this patch. Don't forget to test both
intranet and OPAC.

Finally, run unit tests:
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103449|0   |1
is obsolete||

--- Comment #92 from Emmi Takkinen  ---
Created attachment 110156
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110156=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreference

This patch moves C4::Members::Messaging::SetMessagingPreference to
Koha::Patron::Message::Preference
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "SetMessagingPreference"
   (grep -r 'SetMessagingPreference').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Works as expected. QA tools fails with:
FAILC4/Members/Messaging.pm pod empty section in previous paragraph
Can be fixed in a followup.
Signed-off-by: Marc Véron 

QA tools pass now OK
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103448|0   |1
is obsolete||

--- Comment #91 from Emmi Takkinen  ---
Created attachment 110155
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110155=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingPreferences

This patch moves C4::Members::Messaging::GetMessagingPreferences to
Koha::Patron::Message::Preference(s)
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingPreferences"
   (grep -r 'GetMessagingPreferences').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103447|0   |1
is obsolete||

--- Comment #90 from Emmi Takkinen  ---
Created attachment 110154
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110154=edit
Bug 18595: Unit tests preparing for GetMessagingPreferences move

This patch prepares removing GetMessagingPreferences by adding some useful unit
tests for subroutines that the move targets.

Reserves.t already covers print notice, but this patch adds tests for a set
transport type.

To test:
1. Run t/db_dependent/Circulation.t
2. Run t/db_dependent/Reserves.t
3. Observe test pass

Works together with followup patch
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103446|0   |1
is obsolete||

--- Comment #89 from Emmi Takkinen  ---
Created attachment 110153
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110153=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreferencesFromDefaults

This patch moves C4::Members::SetMessagingPreferencesFromDefaults to
Koha::Patron->set_default_messaging_preferences

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of
"SetMessagingPreferencesFromDefaults"
   (grep -r 'SetMessagingPreferencesFromDefaults').
3. Observe no results in source code.

 INTRANET 
1. Login to intranet.
2. Go to Administration -> Patron categories -> Edit (for any category)
3. Scroll down to observe default messaging preferences for this patron
category
4. Observe the preferences, remember them for the next step.
5. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
6. Look at messaging preferences. They should be same as in step 4.
7. Fill in required data, do not modify messaging preferences, click Save.
8. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103445|0   |1
is obsolete||

--- Comment #88 from Emmi Takkinen  ---
Created attachment 110152
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110152=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingOptions

This patch moves C4::Members::GetMessagingOptions to
Koha::Patron::Message::Preferences->get_options.

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

This patch also removes previously unused GetMessagingOptions in
opac-messaging.pl

To test:

Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingOptions"
   (grep -r 'GetMessagingOptions').
3. Observe no results in source code.

 OPAC 
1. Login to OPAC.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.

 INTRANET 
1. Login to intranet.
2. Go to edit patron's details and scroll down to their messaging preferences.
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.
6. Go to Administration -> Patron categories -> Edit (for any category)
7. Scroll down to observe default messaging preferences for this patron
category
8. Observe the preferences looking normal and as they should be.
9. Set any combination of messaging preferences.
10. Observe them apply as expected, repeat step 9-10 as much as you like.
11. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
12. Fill in required data, do not modify messaging preferences, click Save.
13. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Emmi Takkinen  changed:

   What|Removed |Added

 Attachment #103444|0   |1
is obsolete||
 CC||emmi.takki...@outlook.com

--- Comment #87 from Emmi Takkinen  ---
Created attachment 110151
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110151=edit
Bug 18595: Unit tests for Koha::Patron::Categories->default_messaging

This patch adds unit tests for Koha::Patron::Categories->default_messaging.
Tests
will help preparing for moving C4::Members::Messaging to Koha-objects.

To test:
1. Run t/db_dependent/Koha/Patron/Categories.t

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-09-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

   Assignee|lari.task...@hypernova.fi   |koha-b...@lists.koha-commun
   ||ity.org

--- Comment #86 from Lari Taskula  ---
Nice to see these moving on. Unfortunately I am currently unavailable to
contribute further and have removed myself as assignee. If someone wants to
finish the work here, it would be greatly appreciated.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #85 from Katrin Fischer  ---
(In reply to Katrin Fischer from comment #84)
> These have a ton of conflicts with the rebased patches for bug 17499 I was
> just looking it. I assume it would make sense to test them together - could
> these be rebased?

The dependent bug is PQA now and Joubu has looked over it... would be a great
moment to get the ball rolling here again as well :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-07-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Katrin Fischer  changed:

   What|Removed |Added

 Status|BLOCKED |Patch doesn't apply

--- Comment #84 from Katrin Fischer  ---
These have a ton of conflicts with the rebased patches for bug 17499 I was just
looking it. I assume it would make sense to test them together - could these be
rebased?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |BLOCKED

--- Comment #83 from Katrin Fischer  ---
The dependent patch needs a little bit of touching up - moving this to BLOCKED
until we have taken care of it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #80 from Jonathan Druart  
---
Created attachment 103450
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103450=edit
Bug 18595: Remove references to C4::Members::Messaging

To test:
1. grep -r 'C4::Members::Messaging'
   This command should not produce any results in Koha source code after this
   patch.
2. Check the pages touched by this commit
3. Try setting and viewing patron and patron category messaging preferences

As this completes the move from C4::Members::Messaging to new Koha-objects for
messaging preferences, everything should be ready for proper testing.

Make sure you have EnhancedMessagingPreferences system preference enabled.
Then, try creating new categories and setting default messaging preferences,
as well as editing the messaging preferences of the already existing
categories.
Try adding new patrons and make sure the default patron messaging preferences
are by default the same that you set for that category. Edit already exisiting
patrons' messaging preferences and make sure changes are applied. Observe
no crash at any point, otherwise fail this patch. Don't forget to test both
intranet and OPAC.

Finally, run unit tests:
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #81 from Jonathan Druart  
---
Created attachment 103451
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103451=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
SQL: delete from message_transports where message_attribute_id=1 and
is_digest=0;
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #82 from Jonathan Druart  
---
Created attachment 103452
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103452=edit
Bug 18595: Validate days_in_advance

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #79 from Jonathan Druart  
---
Created attachment 103449
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103449=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreference

This patch moves C4::Members::Messaging::SetMessagingPreference to
Koha::Patron::Message::Preference
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "SetMessagingPreference"
   (grep -r 'SetMessagingPreference').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Works as expected. QA tools fails with:
FAILC4/Members/Messaging.pm pod empty section in previous paragraph
Can be fixed in a followup.
Signed-off-by: Marc Véron 

QA tools pass now OK
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #78 from Jonathan Druart  
---
Created attachment 103448
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103448=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingPreferences

This patch moves C4::Members::Messaging::GetMessagingPreferences to
Koha::Patron::Message::Preference(s)
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingPreferences"
   (grep -r 'GetMessagingPreferences').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #93873|0   |1
is obsolete||
  Attachment #93874|0   |1
is obsolete||
  Attachment #93875|0   |1
is obsolete||
  Attachment #93876|0   |1
is obsolete||
  Attachment #93877|0   |1
is obsolete||
  Attachment #93878|0   |1
is obsolete||
  Attachment #93879|0   |1
is obsolete||
  Attachment #94753|0   |1
is obsolete||
  Attachment #94754|0   |1
is obsolete||

--- Comment #74 from Jonathan Druart  
---
Created attachment 103444
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103444=edit
Bug 18595: Unit tests for Koha::Patron::Categories->default_messaging

This patch adds unit tests for Koha::Patron::Categories->default_messaging.
Tests
will help preparing for moving C4::Members::Messaging to Koha-objects.

To test:
1. Run t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #76 from Jonathan Druart  
---
Created attachment 103446
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103446=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreferencesFromDefaults

This patch moves C4::Members::SetMessagingPreferencesFromDefaults to
Koha::Patron->set_default_messaging_preferences

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of
"SetMessagingPreferencesFromDefaults"
   (grep -r 'SetMessagingPreferencesFromDefaults').
3. Observe no results in source code.

 INTRANET 
1. Login to intranet.
2. Go to Administration -> Patron categories -> Edit (for any category)
3. Scroll down to observe default messaging preferences for this patron
category
4. Observe the preferences, remember them for the next step.
5. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
6. Look at messaging preferences. They should be same as in step 4.
7. Fill in required data, do not modify messaging preferences, click Save.
8. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #75 from Jonathan Druart  
---
Created attachment 103445
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103445=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingOptions

This patch moves C4::Members::GetMessagingOptions to
Koha::Patron::Message::Preferences->get_options.

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

This patch also removes previously unused GetMessagingOptions in
opac-messaging.pl

To test:

Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingOptions"
   (grep -r 'GetMessagingOptions').
3. Observe no results in source code.

 OPAC 
1. Login to OPAC.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.

 INTRANET 
1. Login to intranet.
2. Go to edit patron's details and scroll down to their messaging preferences.
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.
6. Go to Administration -> Patron categories -> Edit (for any category)
7. Scroll down to observe default messaging preferences for this patron
category
8. Observe the preferences looking normal and as they should be.
9. Set any combination of messaging preferences.
10. Observe them apply as expected, repeat step 9-10 as much as you like.
11. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
12. Fill in required data, do not modify messaging preferences, click Save.
13. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #77 from Jonathan Druart  
---
Created attachment 103447
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103447=edit
Bug 18595: Unit tests preparing for GetMessagingPreferences move

This patch prepares removing GetMessagingPreferences by adding some useful unit
tests for subroutines that the move targets.

Reserves.t already covers print notice, but this patch adds tests for a set
transport type.

To test:
1. Run t/db_dependent/Circulation.t
2. Run t/db_dependent/Reserves.t
3. Observe test pass

Works together with followup patch
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Jonathan Druart  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||25228


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25228
[Bug 25228] Patron messaging preferences clearing if duplicate warning
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-04-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Jonathan Druart  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #73 from Jonathan Druart  
---
I've tried to rebase the patch but ended up with 

error: sha1 information is lacking or useless (C4/Auth_with_ldap.pm).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2020-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Magnus Enger  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=24447

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-11-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Tomás Cohen Arazi  changed:

   What|Removed |Added

 QA Contact|alex.arn...@biblibre.com|testo...@bugs.koha-communit
   ||y.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-11-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org,
   ||tomasco...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #93908|0   |1
is obsolete||

--- Comment #72 from Lari Taskula  ---
Created attachment 94754
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94754=edit
Bug 18595: Validate days_in_advance

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #93880|0   |1
is obsolete||

--- Comment #71 from Lari Taskula  ---
Created attachment 94753
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94753=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
SQL: delete from message_transports where message_attribute_id=1 and
is_digest=0;
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #70 from Lari Taskula  ---
Created attachment 93908
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93908=edit
Bug 18595: Validate days_in_advance

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #69 from Lari Taskula  ---
Resolved a bunch of conflicts, need sign-offs.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69674|0   |1
is obsolete||

--- Comment #68 from Lari Taskula  ---
Created attachment 93880
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93880=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
SQL: delete from message_transports where message_attribute_id=1 and
is_digest=0;
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69673|0   |1
is obsolete||

--- Comment #67 from Lari Taskula  ---
Created attachment 93879
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93879=edit
Bug 18595: Remove references to C4::Members::Messaging

To test:
1. grep -r 'C4::Members::Messaging'
   This command should not produce any results in Koha source code after this
   patch.
2. Check the pages touched by this commit
3. Try setting and viewing patron and patron category messaging preferences

As this completes the move from C4::Members::Messaging to new Koha-objects for
messaging preferences, everything should be ready for proper testing.

Make sure you have EnhancedMessagingPreferences system preference enabled.
Then, try creating new categories and setting default messaging preferences,
as well as editing the messaging preferences of the already existing
categories.
Try adding new patrons and make sure the default patron messaging preferences
are by default the same that you set for that category. Edit already exisiting
patrons' messaging preferences and make sure changes are applied. Observe
no crash at any point, otherwise fail this patch. Don't forget to test both
intranet and OPAC.

Finally, run unit tests:
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69671|0   |1
is obsolete||

--- Comment #65 from Lari Taskula  ---
Created attachment 93877
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93877=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingPreferences

This patch moves C4::Members::Messaging::GetMessagingPreferences to
Koha::Patron::Message::Preference(s)
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingPreferences"
   (grep -r 'GetMessagingPreferences').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69672|0   |1
is obsolete||

--- Comment #66 from Lari Taskula  ---
Created attachment 93878
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93878=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreference

This patch moves C4::Members::Messaging::SetMessagingPreference to
Koha::Patron::Message::Preference
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "SetMessagingPreference"
   (grep -r 'SetMessagingPreference').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Works as expected. QA tools fails with:
FAILC4/Members/Messaging.pm pod empty section in previous paragraph
Can be fixed in a followup.
Signed-off-by: Marc Véron 

QA tools pass now OK
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69670|0   |1
is obsolete||

--- Comment #64 from Lari Taskula  ---
Created attachment 93876
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93876=edit
Bug 18595: Unit tests preparing for GetMessagingPreferences move

This patch prepares removing GetMessagingPreferences by adding some useful unit
tests for subroutines that the move targets.

Reserves.t already covers print notice, but this patch adds tests for a set
transport type.

To test:
1. Run t/db_dependent/Circulation.t
2. Run t/db_dependent/Reserves.t
3. Observe test pass

Works together with followup patch
Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69668|0   |1
is obsolete||

--- Comment #62 from Lari Taskula  ---
Created attachment 93874
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93874=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingOptions

This patch moves C4::Members::GetMessagingOptions to
Koha::Patron::Message::Preferences->get_options.

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

This patch also removes previously unused GetMessagingOptions in
opac-messaging.pl

To test:

Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingOptions"
   (grep -r 'GetMessagingOptions').
3. Observe no results in source code.

 OPAC 
1. Login to OPAC.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.

 INTRANET 
1. Login to intranet.
2. Go to edit patron's details and scroll down to their messaging preferences.
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.
6. Go to Administration -> Patron categories -> Edit (for any category)
7. Scroll down to observe default messaging preferences for this patron
category
8. Observe the preferences looking normal and as they should be.
9. Set any combination of messaging preferences.
10. Observe them apply as expected, repeat step 9-10 as much as you like.
11. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
12. Fill in required data, do not modify messaging preferences, click Save.
13. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69669|0   |1
is obsolete||

--- Comment #63 from Lari Taskula  ---
Created attachment 93875
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93875=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreferencesFromDefaults

This patch moves C4::Members::SetMessagingPreferencesFromDefaults to
Koha::Patron->set_default_messaging_preferences

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of
"SetMessagingPreferencesFromDefaults"
   (grep -r 'SetMessagingPreferencesFromDefaults').
3. Observe no results in source code.

 INTRANET 
1. Login to intranet.
2. Go to Administration -> Patron categories -> Edit (for any category)
3. Scroll down to observe default messaging preferences for this patron
category
4. Observe the preferences, remember them for the next step.
5. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
6. Look at messaging preferences. They should be same as in step 4.
7. Fill in required data, do not modify messaging preferences, click Save.
8. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

  Attachment #69667|0   |1
is obsolete||

--- Comment #61 from Lari Taskula  ---
Created attachment 93873
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93873=edit
Bug 18595: Unit tests for Koha::Patron::Categories->default_messaging

This patch adds unit tests for Koha::Patron::Categories->default_messaging.
Tests
will help preparing for moving C4::Members::Messaging to Koha-objects.

To test:
1. Run t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2019-10-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Katrin Fischer  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=23718

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Lari Taskula  changed:

   What|Removed |Added

 Blocks||14806


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14806
[Bug 14806] Action Log for Modifying message_transport_types
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

--- Comment #60 from Alex Arnaud  ---
Conflicts in tools/import_borrowers.pl

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Alex Arnaud  changed:

   What|Removed |Added

 Status|Failed QA   |Patch doesn't apply

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Alex Arnaud  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #59 from Alex Arnaud  ---
Hello Lari,

Koha::Patron::Message::Preferences package is missing

Koha::Patron::set_default_messaging_preferences method is missing

You use Koha::Patron::Message::Attributes but only in unit tests. And package
is missing.

Also, don't forget to provide unit tests for all new subroutine created.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Alex Arnaud  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |alex.arn...@biblibre.com
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2018-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

Alex Arnaud  changed:

   What|Removed |Added

 CC||alex.arn...@biblibre.com

--- Comment #58 from Alex Arnaud  ---
Starting QA now...

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

David Bourgault  changed:

   What|Removed |Added

 CC||david.bourga...@inlibro.com
 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

David Bourgault  changed:

   What|Removed |Added

  Attachment #69453|0   |1
is obsolete||

--- Comment #57 from David Bourgault  ---
Created attachment 69674
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69674=edit
Bug 18595: Disable digest checkbox when forced on

To test:
1. Force a digest on via message_transports table
   (delete rows where message_attribute is 1 and is_digest is 0)
2. Go to either OPAC or staff client messaging preferences
3. Observe digest checkbox is disabled for message attribute 1
   (normally Item due row)

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

David Bourgault  changed:

   What|Removed |Added

  Attachment #69450|0   |1
is obsolete||

--- Comment #54 from David Bourgault  ---
Created attachment 69671
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69671=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingPreferences

This patch moves C4::Members::Messaging::GetMessagingPreferences to
Koha::Patron::Message::Preference(s)
The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingPreferences"
   (grep -r 'GetMessagingPreferences').
3. Observe no results in source code.

 UNIT TESTS 
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

David Bourgault  changed:

   What|Removed |Added

  Attachment #69452|0   |1
is obsolete||

--- Comment #56 from David Bourgault  ---
Created attachment 69673
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69673=edit
Bug 18595: Remove references to C4::Members::Messaging

To test:
1. grep -r 'C4::Members::Messaging'
   This command should not produce any results in Koha source code after this
   patch.
2. Check the pages touched by this commit
3. Try setting and viewing patron and patron category messaging preferences

As this completes the move from C4::Members::Messaging to new Koha-objects for
messaging preferences, everything should be ready for proper testing.

Make sure you have EnhancedMessagingPreferences system preference enabled.
Then, try creating new categories and setting default messaging preferences,
as well as editing the messaging preferences of the already existing
categories.
Try adding new patrons and make sure the default patron messaging preferences
are by default the same that you set for that category. Edit already exisiting
patrons' messaging preferences and make sure changes are applied. Observe
no crash at any point, otherwise fail this patch. Don't forget to test both
intranet and OPAC.

Finally, run unit tests:
1. prove t/db_dependent/Circulation.t
2. prove t/db_dependent/Reserves.t
3. prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

David Bourgault  changed:

   What|Removed |Added

  Attachment #69448|0   |1
is obsolete||

--- Comment #52 from David Bourgault  ---
Created attachment 69669
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69669=edit
Bug 18595: Move C4::Members::Messaging::SetMessagingPreferencesFromDefaults

This patch moves C4::Members::SetMessagingPreferencesFromDefaults to
Koha::Patron->set_default_messaging_preferences

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

To test:

Make sure you have enabled the following system preferences:
- EnhancedMessagingPreferences

 GENERAL 
1. Apply patch
2. Search Koha source code for references of
"SetMessagingPreferencesFromDefaults"
   (grep -r 'SetMessagingPreferencesFromDefaults').
3. Observe no results in source code.

 INTRANET 
1. Login to intranet.
2. Go to Administration -> Patron categories -> Edit (for any category)
3. Scroll down to observe default messaging preferences for this patron
category
4. Observe the preferences, remember them for the next step.
5. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
6. Look at messaging preferences. They should be same as in step 4.
7. Fill in required data, do not modify messaging preferences, click Save.
8. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18595

David Bourgault  changed:

   What|Removed |Added

  Attachment #69447|0   |1
is obsolete||

--- Comment #51 from David Bourgault  ---
Created attachment 69668
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69668=edit
Bug 18595: Move C4::Members::Messaging::GetMessagingOptions

This patch moves C4::Members::GetMessagingOptions to
Koha::Patron::Message::Preferences->get_options.

The patch makes a heavy touch on core messaging preference features,
but should not introduce any visible changes for end user. Keep this in mind
if testing. If you notice any changes in Koha, something is probably wrong!

This patch also removes previously unused GetMessagingOptions in
opac-messaging.pl

To test:

Make sure you have enabled the following system preferences:
- opacuserlogin
- EnhancedMessagingPreferences
- EnhancedMessagingPreferencesOPAC

 GENERAL 
1. Apply patch
2. Search Koha source code for references of "GetMessagingOptions"
   (grep -r 'GetMessagingOptions').
3. Observe no results in source code.

 OPAC 
1. Login to OPAC.
2. Go to "your messaging" (cgi-bin/koha/opac-messaging.pl).
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.

 INTRANET 
1. Login to intranet.
2. Go to edit patron's details and scroll down to their messaging preferences.
3. Observe the preferences looking normal and as they should be.
4. Set any combination of messaging preferences.
5. Observe them apply as expected, repeat step 4-5 as much as you like.
6. Go to Administration -> Patron categories -> Edit (for any category)
7. Scroll down to observe default messaging preferences for this patron
category
8. Observe the preferences looking normal and as they should be.
9. Set any combination of messaging preferences.
10. Observe them apply as expected, repeat step 9-10 as much as you like.
11. Go to cgi-bin/koha/members/memberentry.pl?op=add=XXX, replace
XXX
with the categorycode you were just editing.
12. Fill in required data, do not modify messaging preferences, click Save.
13. Observe a new patron with default messaging preferences.

Signed-off-by: Marc Véron 

Signed-off-by: David Bourgault 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

  1   2   >