Bug 28924: (follow-up) Add new fields to categories api

The patron categories API is failing due to the new fields added in this
bug not being properly handled yet.. This fixes that.
This commit is contained in:
Martin Renvoize 2024-07-19 14:02:28 +01:00
parent 25c232e3b6
commit 72d2b7e42b
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 43 additions and 25 deletions

View file

@ -280,31 +280,34 @@ object on the API.
sub to_api_mapping {
return {
categorycode => 'patron_category_id',
description => 'name',
enrolmentperiod => 'enrolment_period',
enrolmentperioddate => 'enrolment_period_date',
password_expiry_days => 'password_expiry_days',
upperagelimit => 'upper_age_limit',
dateofbirthrequired => 'lower_age_limit',
finetype => undef, # Unused
bulk => undef, # Unused
enrolmentfee => 'enrolment_fee',
overduenoticerequired => 'overdue_notice_required',
issuelimit => undef, # Unused
reservefee => 'reserve_fee',
hidelostitems => 'hide_lost_items',
category_type => 'category_type',
BlockExpiredPatronOpacActions => 'block_expired_patron_opac_actions',
default_privacy => 'default_privacy',
checkprevcheckout => 'check_prev_checkout',
can_place_ill_in_opac => 'can_place_ill_in_opac',
can_be_guarantee => 'can_be_guarantee',
reset_password => 'reset_password',
change_password => 'change_password',
min_password_length => 'min_password_length',
require_strong_password => 'require_strong_password',
exclude_from_local_holds_priority => 'exclude_from_local_holds_priority'
categorycode => 'patron_category_id',
description => 'name',
enrolmentperiod => 'enrolment_period',
enrolmentperioddate => 'enrolment_period_date',
password_expiry_days => 'password_expiry_days',
upperagelimit => 'upper_age_limit',
dateofbirthrequired => 'lower_age_limit',
finetype => undef, # Unused
bulk => undef, # Unused
enrolmentfee => 'enrolment_fee',
overduenoticerequired => 'overdue_notice_required',
issuelimit => undef, # Unused
reservefee => 'reserve_fee',
hidelostitems => 'hide_lost_items',
category_type => 'category_type',
BlockExpiredPatronOpacActions => 'block_expired_patron_opac_actions',
default_privacy => 'default_privacy',
checkprevcheckout => 'check_prev_checkout',
can_place_ill_in_opac => 'can_place_ill_in_opac',
can_be_guarantee => 'can_be_guarantee',
reset_password => 'reset_password',
change_password => 'change_password',
min_password_length => 'min_password_length',
require_strong_password => 'require_strong_password',
exclude_from_local_holds_priority => 'exclude_from_local_holds_priority',
noissuescharge => 'no_issues_charge',
noissueschargeguarantees => 'no_issues_charge_guarantees',
noissueschargeguarantorswithguarantees => 'no_issues_charge_guarantors_with_guarantees'
};
}

View file

@ -100,6 +100,21 @@ properties:
- boolean
- "null"
description: Exclude patrons of this category from local holds priority
no_issues_charge:
type:
- number
- "null"
description: Set threshold of debt allowed before issues are blocked
no_issues_charge_guarantees:
type:
- number
- "null"
description: Set threshold of debt allowed, inclusive of guarantees debts, before issues are blocked
no_issues_charge_guarantors_with_guarantees:
type:
- number
- "null"
description: Set threshold of debt allowed, inclused of relations debts, before issues are blocked
additionalProperties: false
required:
- patron_category_id