Bug 24447 - POD of C4::Members::Messaging::GetMessagingPreferences() is misleading
Summary: POD of C4::Members::Messaging::GetMessagingPreferences() is misleading
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Eden
QA Contact: Kyle M Hall
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2020-01-17 12:22 UTC by Magnus Enger
Modified: 2021-02-11 22:04 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03,20.05.09,19.11.15


Attachments
Bug 24447: Changing 'DUE' to example in database that exists. (1.61 KB, patch)
2021-01-21 01:31 UTC, Eden
Details | Diff | Splinter Review
Bug 24447: Changing 'DUE' to example in database that exists. (1.67 KB, patch)
2021-01-21 19:28 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24447: Changing 'DUE' to example in database that exists. (1.74 KB, patch)
2021-01-21 19:37 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2020-01-17 12:22:52 UTC
Part of the POD for this subroutine looks like this:

  42   my $preferences = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrower->{'borrowernumber'},
  43                                                                        message_name   => 'DUE' } );
  44 
  45   my $preferences = C4::Members::Messaging::GetMessagingPreferences( { categorycode => 'LIBRARY',
  46                                                                        message_name   => 'DUE' } );

It looks like the value for message_name should be a value from letter.code, but it should be a name from message_attributes.message_name:

  75 AND    message_transports.is_digest = borrower_message_preferences.wants_digest
  76 WHERE  message_attributes.message_name = ?
  77 END_SQL
  78 
  79     my @bind_params = ( $params->{'message_name'} );

Note: This subroutine is set to be renamed and moved by Bug 18595, but the POD seems to be untouched there.
Comment 1 Eden 2021-01-21 01:31:42 UTC
Created attachment 115484 [details] [review]
Bug 24447: Changing 'DUE' to example in database that exists.

Test Plan:
1.Using  perldoc C4/Members/Messaging.pm check that message_name
attribute name example  is Item_Due and not DUE.
Comment 2 Katrin Fischer 2021-01-21 19:28:46 UTC
Created attachment 115603 [details] [review]
Bug 24447: Changing 'DUE' to example in database that exists.

Test Plan:
1.Using  perldoc C4/Members/Messaging.pm check that message_name
attribute name example  is Item_Due and not DUE.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Katrin Fischer 2021-01-21 19:29:39 UTC
Nice one, thx Eden!
Comment 4 Kyle M Hall 2021-01-21 19:37:09 UTC
Created attachment 115606 [details] [review]
Bug 24447: Changing 'DUE' to example in database that exists.

Test Plan:
1.Using  perldoc C4/Members/Messaging.pm check that message_name
attribute name example  is Item_Due and not DUE.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-01-22 13:53:49 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-01-29 13:19:38 UTC
Pushed to 20.11.x for 20.11.03
Comment 7 Andrew Fuerste-Henry 2021-02-03 22:09:45 UTC
Pushed to 20.05.x for 20.05.09
Comment 8 Victor Grousset/tuxayo 2021-02-04 17:07:48 UTC
Backported: Pushed to 19.11.x branch for 19.11.15