View | Details | Raw Unified | Return to bug 12446
Collapse All | Expand All

(-)a/installer/data/mysql/en/optional/patron_categories.yml (-5 / +5 lines)
Lines 102-108 tables: Link Here
102
          issuelimit: ~
102
          issuelimit: ~
103
          reservefee: '0.000000'
103
          reservefee: '0.000000'
104
          category_type: 'C'
104
          category_type: 'C'
105
          can_be_guarantee: 1
105
          canbeguarantee: 1
106
106
107
        - categorycode: 'J'
107
        - categorycode: 'J'
108
          description: 'Juvenile'
108
          description: 'Juvenile'
Lines 116-122 tables: Link Here
116
          issuelimit: ~
116
          issuelimit: ~
117
          reservefee: '0.000000'
117
          reservefee: '0.000000'
118
          category_type: 'C'
118
          category_type: 'C'
119
          can_be_guarantee: 1
119
          canbeguarantee: 1
120
120
121
        - categorycode: 'YA'
121
        - categorycode: 'YA'
122
          description: 'Young Adult'
122
          description: 'Young Adult'
Lines 130-136 tables: Link Here
130
          issuelimit: ~
130
          issuelimit: ~
131
          reservefee: '0.000000'
131
          reservefee: '0.000000'
132
          category_type: 'C'
132
          category_type: 'C'
133
          can_be_guarantee: 1
133
          canbeguarantee: 1
134
134
135
        #  Professionals
135
        #  Professionals
136
        - categorycode: 'T'
136
        - categorycode: 'T'
Lines 145-151 tables: Link Here
145
          issuelimit: ~
145
          issuelimit: ~
146
          reservefee: '0.000000'
146
          reservefee: '0.000000'
147
          category_type: 'P'
147
          category_type: 'P'
148
          can_be_guarantee: 1
148
          canbeguarantee: 1
149
149
150
        - categorycode: 'B'
150
        - categorycode: 'B'
151
          description: 'Board'
151
          description: 'Board'
Lines 159-165 tables: Link Here
159
          issuelimit: ~
159
          issuelimit: ~
160
          reservefee: '0.000000'
160
          reservefee: '0.000000'
161
          category_type: 'P'
161
          category_type: 'P'
162
          can_be_guarantee: 1
162
          canbeguarantee: 1
163
163
164
        #  Institutional
164
        #  Institutional
165
        - categorycode: 'IL'
165
        - categorycode: 'IL'
(-)a/t/db_dependent/Patrons.t (-3 lines)
Lines 201-208 subtest "Update patron categories" => sub { Link Here
201
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_young=>1})->next->borrowernumber, $child1->borrowernumber );
201
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_young=>1})->next->borrowernumber, $child1->borrowernumber );
202
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_young=>1})->update_category_to({category=>$a_categorycode}),1,'One child patron updated to adult category because too young');
202
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_young=>1})->update_category_to({category=>$a_categorycode}),1,'One child patron updated to adult category because too young');
203
    is( Koha::Patrons->find($adult1->borrowernumber)->guarantee_relationships->guarantees->count,2,'Guarantee was removed when made adult');
203
    is( Koha::Patrons->find($adult1->borrowernumber)->guarantee_relationships->guarantees->count,2,'Guarantee was removed when made adult');
204
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2})->update_category_to({category=>$a_categorycode_2}),2,'Two child patrons updated to adult category');
205
    is( Koha::Patrons->find($adult1->borrowernumber)->guarantee_relationships->guarantees->count,2,'Guarantees were not removed when made adult which can be guarantee');
206
204
207
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_old=>1})->next->borrowernumber, $child3->borrowernumber );
205
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_old=>1})->next->borrowernumber, $child3->borrowernumber );
208
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_old=>1})->update_category_to({category=>$a_categorycode}),1,'One child patron updated to adult category because too old');
206
    is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_old=>1})->update_category_to({category=>$a_categorycode}),1,'One child patron updated to adult category because too old');
209
- 

Return to bug 12446