Bug 13697 - Syspref to not add a fee when a patron changes to a category with enrolment fee
Summary: Syspref to not add a fee when a patron changes to a category with enrolment fee
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Christophe Croullebois
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 15073
  Show dependency treegraph
 
Reported: 2015-02-11 13:27 UTC by Christophe Croullebois
Modified: 2016-06-21 21:39 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Option to don't add a fee, if the patron changes to a category with enrolment fee (1.82 KB, patch)
2015-02-11 14:10 UTC, Christophe Croullebois
Details | Diff | Splinter Review
Syspref to not add a fee when a patron changes to a category with enrolment fee (4.44 KB, patch)
2015-02-27 11:56 UTC, Christophe Croullebois
Details | Diff | Splinter Review
[PASSED QA] Bug 13697 : Syspref to not add a fee when a patron changes to a category with enrolment fee (4.50 KB, patch)
2015-03-20 14:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13697 [QA Followup] - Add Unit Test (1.52 KB, patch)
2015-03-20 14:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13697: (QA followup) idiomatic fix add > charge (3.32 KB, patch)
2015-08-28 13:04 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 13697: (QA followup) fix typo in sysprefs.sql (1.54 KB, patch)
2015-08-31 14:02 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Croullebois 2015-02-11 13:27:47 UTC
If a borrower's category is changed during his subscription (i.e : a child who moves to adult) if category adult in this case have an enrolment fee, fees are added.
Many libraries do not want these fees in these cases.
So I have made a patch to offer this choice via a system preference.
Comment 1 Christophe Croullebois 2015-02-11 14:10:01 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-02-26 12:56:20 UTC
This needs a test plan and tests.
Comment 3 Christophe Croullebois 2015-02-27 09:17:27 UTC
Test plan :

1/ create 2 categories (A & B). B with enrolment fee
2/ create a patron in category A
3/ change the patron category from A to B
4/ check that the patron has an enrolment fee to pay

Apply the patch

1/ create a new patron in category A
2/ change the patron category from A to B.
3/ check that the patron has an enrolment fee to pay
4/ change the system preference => UPDATE `systempreferences`  SET `value` = '1' WHERE `systempreferences`.`variable` ='FeeOnChangePatronCategory';
5/ create a new patron in category A
6/ change the patron category from A to B
7/ check that the patron has no enrolment fee to pay

thx
Comment 4 Christophe Croullebois 2015-02-27 11:56:08 UTC Comment hidden (obsolete)
Comment 5 Juliane 2015-03-04 10:36:38 UTC
Ok, tested and it works. 

Case 1 tested: the patron has already a category with enrolment fee, I change it to another category with enrolment fee, the patron has no enrolment fee to pay 

Case 2 tested : the patron has a free category , I change it to a category with enrolment fee, the patron has no enrolment fee to pay



Howether, I created the 13792 bugzilla : testing make me realise a bug about payment on fees on the master version of koha (not linked to this patch)
Comment 6 Kyle M Hall 2015-03-20 14:48:53 UTC
Created attachment 37048 [details] [review]
[PASSED QA] Bug 13697 : Syspref to not add a fee when a patron changes to a category with enrolment fee

By default this syspref is "Do" to keep the previous behaviour.

Test plan :

1/ create 2 categories (A & B). B with enrolment fee
2/ create a patron in category A
3/ change the patron category from A to B
4/ check that the patron has an enrolment fee to pay

Apply the patch

1/ create a new patron in category A
2/ change the patron category from A to B.
3/ check that the patron has an enrolment fee to pay
4/ change the system preference 'FeeOnChangePatronCategory' to 'Don't';
5/ create a new patron in category A
6/ change the patron category from A to B
7/ check that the patron has no enrolment fee to pay

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall 2015-03-20 14:49:00 UTC
Created attachment 37049 [details] [review]
Bug 13697 [QA Followup] - Add Unit Test
Comment 8 Tomás Cohen Arazi 2015-08-28 13:04:33 UTC
Created attachment 42076 [details] [review]
Bug 13697: (QA followup) idiomatic fix add > charge

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi 2015-08-28 13:26:19 UTC
Patches pushed to master.

Thanks Christophe and Kyle!
Comment 10 Tomás Cohen Arazi 2015-08-31 14:02:02 UTC
Created attachment 42122 [details] [review]
Bug 13697: (QA followup) fix typo in sysprefs.sql

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Nicole C. Engard 2015-09-17 19:48:08 UTC
I'm writing this up for the manual.  It's under Norwegian Patron Database - does that mean this does not apply to patrons edited via Koha in other countries?

Nicole
Comment 12 Tomás Cohen Arazi 2015-09-19 20:28:51 UTC
(In reply to Nicole C. Engard from comment #11)
> I'm writing this up for the manual.  It's under Norwegian Patron Database -
> does that mean this does not apply to patrons edited via Koha in other
> countries?
> 
> Nicole

No! That's a bug me thinks!
Comment 13 Nicole C. Engard 2015-10-28 15:08:32 UTC
All better: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15073