Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix query to select circulation rules for Koha #2008 #2009

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

kylemhall
Copy link
Member

Within Koha circulation rules are selected by branchcode, categorycode, and itemtype in that order where precedence takes the more specific rule over the less specific rule. This can be seen in the Koha code here: https://git.koha-community.org/Koha-community/Koha/src/branch/main/Koha/CirculationRules.pm#L275

Aspen attempts to replicate this but has a flaw.
The problem only comes into play if the query ends up selecting multiple rules. Koha will always select first rule of the results, but Aspen will always select the last rule of the results.

Closes #2008

Within Koha circulation rules are selected by branchcode, categorycode, and itemtype in that order where precedence takes the more specific rule over the less specific rule. This can be seen in the Koha code here: https://git.koha-community.org/Koha-community/Koha/src/branch/main/Koha/CirculationRules.pm#L275

Aspen attempts to replicate this but has a flaw.
The problem only comes into play if the query ends up selecting multiple rules.
Koha will always select first rule of the results, but Aspen will always select the last rule of the results.

Closes Aspen-Discovery#2008
@mdnoble73 mdnoble73 merged commit 1175f38 into Aspen-Discovery:24.09.00 Aug 22, 2024
1 check passed
@kylemhall kylemhall deleted the issue_2008 branch August 30, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circulation rules for Koha not selected properly
2 participants