Jonathan Druart [Thu, 5 May 2022 08:13:56 +0000 (10:13 +0200)]
Bug 32030: Use Pinia for vendors đ
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 4 May 2022 14:56:59 +0000 (16:56 +0200)]
Bug 32030: more fixes
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 4 May 2022 14:22:03 +0000 (16:22 +0200)]
Bug 32030: 30063 follow-up
In case one option is "0"
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 4 May 2022 14:13:14 +0000 (16:13 +0200)]
Bug 32030: ERM - link licenses to an agreement
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 16:30:38 +0000 (18:30 +0200)]
Bug 32030: ERM - Licenses
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 16:29:49 +0000 (18:29 +0200)]
Bug 32030: add breadcrumb
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 13:03:18 +0000 (15:03 +0200)]
Bug 32030: ERM - License - DB
fix atomic
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 13:55:22 +0000 (15:55 +0200)]
Bug 32030: ERM - Refactoring
We want the whole erm.pl to be a Vue app \o/
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 12:17:23 +0000 (14:17 +0200)]
Bug 32030: Remove anchor from cancel links
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 11:56:55 +0000 (13:56 +0200)]
Bug 32030: ERM - Add a "show agreement" view
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 08:10:06 +0000 (10:10 +0200)]
Bug 32030: Make 'Is perpetual' filter a dropdown list
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 06:39:09 +0000 (08:39 +0200)]
Bug 32030: Add table settings
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 06:23:03 +0000 (08:23 +0200)]
Bug 32030: Disable and blank "Closure reason" if status is not "closed"
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 06:15:47 +0000 (08:15 +0200)]
Bug 32030: Add ERM to the 'More' menu in the header
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 06:07:45 +0000 (08:07 +0200)]
Bug 32030: Extend Description's textarea to rows=10, cols=50
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 May 2022 05:57:46 +0000 (07:57 +0200)]
Bug 32030: Merge the agreement and ID columns
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 30 Mar 2022 09:20:49 +0000 (11:20 +0200)]
Bug 32030: ERM - FIX swagger specs for bug 30194
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Mar 2022 14:53:40 +0000 (15:53 +0100)]
Bug 32030: ERM - Add select to column filters
See also "Bug 30063: Be more flexible for filters"
This is ugly, we must improve that.
I would want to prevent 1 fetch per column however.
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 23 Mar 2022 12:09:10 +0000 (13:09 +0100)]
Bug 32030: ERM - Vue - Datatables fix (follow-up)
Do not sort when the filter th is cliqued
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 23 Mar 2022 11:30:32 +0000 (12:30 +0100)]
Bug 32030: ERM - Correctly style "Edit" and "Delete"
And add a whitespace between them.
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 15 Mar 2022 11:16:45 +0000 (12:16 +0100)]
Bug 32030: ERM - Add "integration" tests using Cypress
We are mocking the REST API routes responses here, we could do better,
but it's a nice first step.
To run the tests:
From the host (ie. *not* inside ktd): `yarn run cypress open`
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 23 Mar 2022 10:26:01 +0000 (11:26 +0100)]
Bug 32030: ERM - Switch 'description' and 'license info' to textarea
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 15 Mar 2022 06:46:39 +0000 (07:46 +0100)]
Bug 32030: ERM - Remove BootstrapVue3
We are lacking behind, Koha is using Bootstrap 3.5 and BootstrapVue3 is
using Bootstrap 5. It's a shame, it would be much easier to use
BootstrapVue!
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 16 Mar 2022 15:49:00 +0000 (16:49 +0100)]
Bug 32030: ERM - Vue version
First, `yarn install`.
Then use `yarn build_js` or `yarn watch_js` to regenerate the dist/main.js file
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 8 Mar 2022 15:20:06 +0000 (16:20 +0100)]
Bug 32030: ERM - Vue - Datatables fix
Same as from bug 30225 and bug 30160
This really needs to be on its own bug...
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 16 Mar 2022 15:49:40 +0000 (16:49 +0100)]
Bug 32030: ERM - REST API - GET POST PUT DELETE specs
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 16 Mar 2022 15:01:58 +0000 (16:01 +0100)]
Bug 32030: ERM - Add tests for periods and users
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 8 Mar 2022 11:03:14 +0000 (12:03 +0100)]
Bug 32030: ERM - Users
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Mon, 7 Mar 2022 16:48:04 +0000 (17:48 +0100)]
Bug 32030: ERM - Users - DB table erm_agreement_users
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 8 Mar 2022 11:10:30 +0000 (12:10 +0100)]
Bug 32030: rename filter_by_have_subpermission with filter_by_have_permission
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Mon, 7 Mar 2022 15:50:16 +0000 (16:50 +0100)]
Bug 32030: ERM - Periods
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Mon, 7 Mar 2022 13:31:54 +0000 (14:31 +0100)]
Bug 32030: ERM - Periods - DB table erm_agreement_periods
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Feb 2022 15:51:08 +0000 (16:51 +0100)]
Bug 32030: ERM - CRUD operations for agreements [old style]
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Feb 2022 15:52:30 +0000 (16:52 +0100)]
Bug 32030: ERM - Koha::REST::V1::ERM::Agreements
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Feb 2022 15:52:22 +0000 (16:52 +0100)]
Bug 32030: ERM - Koha::ERM::Agreement[s] objects
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Feb 2022 15:51:28 +0000 (16:51 +0100)]
Bug 32030: ERM - GET /erm/agreements spec files
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Feb 2022 13:21:33 +0000 (14:21 +0100)]
Bug 32030: fix test builder for boolean
assume that tinyint are boolean (not really true but shouldn't hurt)
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 24 Feb 2022 12:39:03 +0000 (13:39 +0100)]
Bug 32030: ERM - New permission UI
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 23 Feb 2022 11:32:09 +0000 (12:32 +0100)]
Bug 32030: ERM - Home view
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 23 Feb 2022 11:27:27 +0000 (12:27 +0100)]
Bug 32030: ERM - DB
Syspref 'ERMModule'
Permission 'erm'
Table 'erm_agreements'
3 new av categories:
* ERM_AGREEMENT_STATUS
* ERM_AGREEMENT_CLOSURE_REASON
* ERM_AGREEMENT_RENEWAL_PRIORITY
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Mon, 7 Nov 2022 13:54:58 +0000 (13:54 +0000)]
Bug 32122: Correct permissions check on item circulation alerts
This patch changes the check from 'item_circ_alerts' to 'manage_item_circ_alerts'
To test:
1 - Give an account catalogue and manage_item_circ_alerts permissions
2 - Log in to staff client iwht this account
3 - Browse to Admin->Item circulation alerts
4 - Error, you do not have permission to view this page
5 - Apply patch
6 - Restart all
7 - Browse to page agian, success!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Rollback should really be the last statement.
I am leaving get_from_storage here, but add a comment that it seems
unneeded at this moment. The Koha::Account::Offset->new and
C4::Stats::UpdateStats wont change the line.. But since the distance
in code is becoming a bit larger, I wont complain.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Hooks added:
after_account_action with new action add_credit
How to test:
Run tests in t/db_dependent/Koha/Plugins/Account_hooks.t
Sponsored by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
To test:
1 - go to a patron detail view, click "add guarantee"
2 - Confirm form loads
3 - Confirm categories lsited are eligible to have a guarantor
4 - Fill out required fields and confirm patron saved correctly
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Tue, 25 Oct 2022 06:47:41 +0000 (20:47 -1000)]
Bug 31967: Search terms retained in header search when only one result
Bug 26247 added a system preference to manage the Retaining of search terms in header search.
But this does not work if there is only one match and you go directly to details page.
Test plan :
1) Set system preference RetainCatalogSearchTerms to "Don't retain"
2) Perform a search leading to a single result.
For example in KTD the ISBN 1932100083
=> Without patch search bar is populated with search terms
=> With patch search bar is not populated with search terms
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Blou [Tue, 25 Oct 2022 18:55:52 +0000 (14:55 -0400)]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha
Without this patch, the update process duplicates all the news and
content entries when they were non-english to start with.
This patch keeps the same process, but new "default" "parent" entries are empty so there'
no duplication in the OPAC display, while still being editable/deletable
in the intranet.
We came through that through many iterations. This was the least
invasive while still providing satisfying results.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31889: (follow-up) Add test for explicit warning
On bug 29697, an explicit call to 'warn' was added, but no tests were
added for that behavior.
This patch adds that.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio/Metadata.t
=> FAIL: There's a warn, no tests for it :-(
2. Apply this patch
3. Repeat 1
=> SUCCESS: A new test was added, no more warns printed
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31907: Show items as On hold when in processing
Test plan:
1. Make sure syspref "opacbookbag" is set to "Allow".
2. Make sure syspref "HoldsNeedProcessingSIP" is set to "Don't fulfill".
3. Place a hold on an item.
4. Return item via SIP at the pickup library.
5. View biblio in Opac.
6. Note that it says "Available" as status.
7. Add biblio to Cart.
8. Open Cart.
9. Note that it says "Available" as status.
10. Apply patch.
11. Reload Opac page.
12. It should now say "On hold".
13. Reload Card page.
14. It should also say "On hold".
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Mon, 17 Oct 2022 02:16:58 +0000 (02:16 +0000)]
Bug 31840: Consider current cost if modifying order
This patch deducts the current cost of an order if modifying it, so that
the current cost isn't counted when checking whether the updated cost
will take the order total amount above the allowed budget.
To test:
1. Add an active budget of $1,000
2. Attach a fund of $1,000. Set the fund to warn at 98% and $900.
3. Add an order to a basket, give it a vendor price of $500 with no
discount or tax and Save
4. Modify the order and change the vendor price to $450 and Save
5. Notice you get a warning that this order total amount will exceed the
allowed budget - this is incorrect.
6. Apply the patch and cancel the change so you're redirected back to
the basket
7. Modify the order and change the vendor price to $450 and Save
8. You should be able to Save without requiring confirmation
9. Add another order to the basket, give it a vendor price of $100 with
no discount or tax and Save. This should save normally, confirming we
can add new orders that do not exceed the allowed budget
10. Add another order to the basket, give it a vendor price of $500 with
no discount or tax and Save. This should trigger the warning that you
will exceed the allowed budget, as expected.
Sponsored-by: Waikato Institute of Technology Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 13 Oct 2022 06:19:27 +0000 (06:19 +0000)]
Bug 31743: Change condition for messaging tab
Note for QA:
The code for SMSnumber is still made dependent on
EnhancedMessagingPreferencesOPAC in order to not
disturb current behavior.
This fixes Enhanced on, EnhancedOPAC off; the case of
Enhanced off is not considered here.
Test plan:
Enable EnhancedMessaging, disable EnhancedMessagingOPAC.
Enable TranslateNotices.
Check if you can only change notice language on OPAC.
Enable EnhancedMessagingOPAC.
Check if you change messaging prefs too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: marie-luce <marie-luce.laflamme@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Thu, 20 Oct 2022 08:13:07 +0000 (22:13 -1000)]
Bug 31887: Fix search on MARC field in Elasticsearch mappings table
In Elasticsearch mappings table, in tabs with MARC fields, searching using DataTable search field does not work for MARC fields / subfields.
This is because cell contains an input HTML tag with MARC data in attribute value.
Test plan :
1) Go to Administration > Search engine configuration (Elasticsearch)
2) Go to tab 'Bibliographic records'
3) Enter in search field a used MARC field (like 245)
=> Table gets filtered by rows with mapping on searched field
4) Enter in search field the field+subfield used for issues (952l in KTD)
=> Table gets filtered by rows with mapping on field+subfield
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Sun, 2 Oct 2022 21:15:42 +0000 (21:15 +0000)]
Bug 24860: (QA follow-up) Terminology and translation fixes
* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Thu, 26 Mar 2020 13:24:49 +0000 (09:24 -0400)]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Wed, 11 Mar 2020 10:00:27 +0000 (06:00 -0400)]
Bug 24860: Skip non-matching item group holds in HoldsQueue
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Tue, 10 Mar 2020 13:02:22 +0000 (09:02 -0400)]
Bug 24860: Skip non-matching item group holds in CheckReserves
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle Hall [Thu, 9 Jun 2022 18:06:45 +0000 (14:06 -0400)]
Bug 24860: Add ability to select an item group when placing a hold - OPAC
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle Hall [Fri, 3 Jun 2022 10:33:25 +0000 (06:33 -0400)]
Bug 24860: Add ability to select an item group when placing a hold
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Fri, 28 Feb 2020 19:45:44 +0000 (14:45 -0500)]
Bug 24860: Implement reserves.item_group_id
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Fri, 28 Feb 2020 15:51:47 +0000 (10:51 -0500)]
Bug 24860: Add new syspref EnableItemGroupHolds
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Fri, 28 Feb 2020 15:37:05 +0000 (10:37 -0500)]
Bug 24860: Add reserves.item_group_it
This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).
Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
as all items that could fill that hold are now unavailable
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31517: Replace raw SQL queries in C4::Tags with Koha object accesses
To test:
1) Create a few new tags to any biblio by visiting the biblio's detail
page on OPAC
2) The visit http://localhost:8080/cgi-bin/koha/opac-tags.pl and try
deleting those tags.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Thomas Klausner [Wed, 5 Oct 2022 10:14:31 +0000 (12:14 +0200)]
Bug 31654: Hide non-public libraries from MastheadLibraryPulldown (bug_31654_hide_nonpublic_libs)
Do not list library in masthead and advanced search if branches.public is false
Test Plan:
* Set OpacAddMastheadLibraryPulldown to "Add"
* Go to Administration -> Libraries, edit "Fairfield", set "public" = "no" (at the end of the form)
* Or connect to DB and run
update branches set public = 0 where branchcode like 'F%';
This will set all three libraries starting with F to non-public
* open OPAC
* The "All libraries" Pulldown in the Header (between search slot and search button) still shows the non-public libraries
* Go to OPAC -> Advanced Search, scroll to "Location and availability": The selectbox still shows the non-public libraries
Now apply the patch
* Open OPAC
* The "All libraries" Pulldown in the Header now should not contain the libraries set to "public = no"
* And in the Advanced Search "Location and availability" pulldown those libraries should also not be shown.
Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Claude Demeure <claude.demeure@mailo.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 20 Oct 2022 14:27:25 +0000 (14:27 +0000)]
Bug 31889: Replace append_fields in _embed_items
Test plan:
Run t/db_dependent/Koha/Biblio/Metadata.t again. Should pass.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 20 Oct 2022 14:27:25 +0000 (14:27 +0000)]
Bug 31889: Add unit test to show problem
Test plan:
Run t/db_dependent/Koha/Biblio/Metadata.t
Fails with:
not ok 10 - 951-952s-953 in 245,100,942,951,953,999,952,952,952,952,952,952,952,952
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 20 Oct 2022 13:05:00 +0000 (13:05 +0000)]
Bug 31889: Remove exported ghost routine from Biblio module
It has been moved to a Koha object.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 23 Dec 2021 17:16:12 +0000 (17:16 +0000)]
Bug 29102: Remove ignore_found_holds
If not counting patrons holds, found or unfound, we no longer need this option
introduced by bug 28078
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 23 Dec 2021 16:49:34 +0000 (16:49 +0000)]
Bug 29102: Do not count patron's own hold against limits
This patch makes three changes:
1 - The borrower's own holds are not counted towards HighHolds limit
2 - We exclude all hold counts from CanItemBeReserved
3 - Static mode should only decrease hold when over the decreaseLoanHighHoldsValue, not when equal
Previously a patron's hold could put the count over the threshhold, and
if the patron is only allowed 1 hold per record, and the hold wasn't found before
the checkout, it would make all items unholdable, thus lowering the theshhold for
dynamic HighHolds
To test:
1 - Set sysaprefs:
decreaseLoanHighHolds - enable
decreaseLoanHighHoldsDuration - 1
decreaseLoanHighHoldsValue - 1
decreaseLoanHighHoldsControl - "over the number of holdable items on the record" / dynamic
decreaseLoanHighHoldsIgnoreStatuses - blank
2 - Set circ rules to allow 1 hold per record and loan period of 5
3 - Find/create a record with 3 items
4 - Place a title level hold for two different patrons
5 - Attempt to checkout item - note warning about high holds
6 - Cancel checkout
7 - Set decreaseLoanHighHoldsControl - "on the record" / static
8 - Attempt checkout - note warning about high holds
9 - Apply patch
10 - Checkout item - no warning
11 - checkin item, replace hold
12 - Set decreaseLoanHighHoldsControl - "over the number of holdable items on the record" / dynamic
13 - Checkout item - no warning
14 - prove t/db_dependent/DecreaseLoanHighHolds.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 28 Oct 2022 14:43:10 +0000 (14:43 +0000)]
Bug 32037: Check for existence of object before building link
This patch adds a check on the existence of the object and passes this to the template
I also drop a level of IF by moving to ELSIF
To test:
1 - Enable ReturnLog amd IssueLog
2 - Checkout an item to a patron
3 - Return it
4 - View 'Modification log' tab of the borrwer
5 - Note item links, test them, they work
6 - Delete the item
7 - Reload and try links again, they do not work
8 - Apply patch
9 - Reload, no more links
10 - Checkout and return another item
11 - This one has links, and they work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 27 Oct 2022 11:27:55 +0000 (13:27 +0200)]
Bug 31919: Add backgground color to hovered items in header dropdowns
This alternate patch is different in a few ways:
- Add a hover background color only to items in dropdown menus.
- Use an SCSS variable for the background color
- Update the specificity of the hover CSS to more fully override
Bootstrap's default.
To test, apply the patch and rebuild the staff interface CSS.
- On any page in the staff interface, test the behavior of links in the
nav header.
- The always-visible links (Circulation, Patrons, etc) should keep the
same style as before: Underline on hover.
- In dropdown menus like "More" and the user menu in the upper right
corner, hovered links should have a green background.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 2 Nov 2022 12:43:17 +0000 (12:43 +0000)]
Bug 32085: Consistent classes for primary buttons: Labels
This patch makes changes the button markup in label-creation templates
-- including the barcode image generator -- so that all submit buttons
and any buttons that should should be styled as primary buttons have the
Bootstrap class "btn btn-primary."
To test, apply the patch and view label-related pages to confirm
that everything looks correct. In most cases there are no visible
changes.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Joonas Kylmälä [Thu, 17 Dec 2020 15:35:07 +0000 (17:35 +0200)]
Bug 27259: Add HomeOrHoldingBranch checks where it was missing from
The TooMany() function and fine calculation functions were incorrectly
hard coded to use homebranch for fetching the circulation rules. Those
ignored completely the syspref HomeOrHoldingBranch where the user
might have set it to holdingbranch and therefore the fines and whether
patron has too many checkouts (TooMany()) were counted using the
unintended branch's rules. This problem only arises in the cases where
there are branch specific circulation rules defined.
Test plan:
1. Make sure following tests pass:
$ prove t/db_dependent/Circulation/_CalculateAndUpdateFine.t
$ prove t/db_dependent/Circulation/TooMany.t
Test plan for fines.pl:
1. Add branch specific fine rules for branches A and B. A having a
fine of 1 per day and B having a fine of 0 per day.
2. Set sysprefs:
CircControl = the library the items is from
finesMode = Calculate and charge
HomeOrHoldingBranch = holdingbranch
3. Create an item with home and holding branch of A
4. Checkout the item with a due date in the past (the past due date can be
specified by clicking "Checkout settings" in the checkout page) and
make sure the branch you are checking from is B.
5. Run perl /usr/share/koha/bin/cronjobs/fines.pl
6. Notice that fines have popped up now to the patron incorrectly
7. Apply patch
8. Pay fines, Check-in the item and check it out again
9. Run perl /usr/share/koha/bin/cronjobs/fines.pl
10. Notice that fine is now 0. This means that the branch
B (holdingbranch of the checked-out item) specific rule is used.
Test plan for staticfines.pl:
1. Add branch specific fine rules for branches A and B. A having a
fine of 1 per day and B having a fine of 0 per day.
2. Set sysprefs:
CircControl = the library the items is from
finesMode = Calculate and charge
HomeOrHoldingBranch = holdingbranch
3. Create an item with homebranch A and holding branch of A
4. Checkout the item with a due date in the past (the past due date can be
specified by clicking "Checkout settings" in the checkout page) and
make sure the branch you are checking from is B.
5. Run perl staticfines.pl --library A --library B --category <PATRONS_CATEGORYCODE>
and notice that now there is inccorectly fines
6. Apply patch
7. Pay fines, Check-in the item and check it out again
8. Run perl staticfines.pl --library A --library B --category <PATRONS_CATEGORYCODE>
and notice the fines are now not generated
Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Joonas Kylmälä [Fri, 18 Dec 2020 15:47:40 +0000 (17:47 +0200)]
Bug 27259: Test HomeOrHoldingBranch usage in _CalculateAndUpdateFine()
This shows that HomeOrHoldingBranch syspref is incorrectly not used by
_CalculateAndUpdateFine() when it decides which circ rule to use.
Run "prove t/db_dependent/Circulation/_CalculateAndUpdateFine.t" to
notice the tests now fail.
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Joonas Kylmälä [Fri, 18 Dec 2020 10:22:46 +0000 (12:22 +0200)]
Bug 27259: Test HomeOrHoldingBranch usage in TooMany()
This shows that HomeOrHoldingBranch syspref is incorrectly not used by
TooMany() when it decides which circ rule to use.
Run "prove t/db_dependent/Circulation/TooMany.t" to notice the tests
now fail.
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Thu, 20 Oct 2022 00:18:20 +0000 (14:18 -1000)]
Bug 31881: Fix search link in MARC view
In framework a subfield can be defined with a link (with a search field).
This create an hyperlink in MARC view.
Currently with Elasticsearch the link does not work because search query contains 'field,phr:',
which is useless since the link contains 'idx=field,phr'.
With Zebra looks like the idx param is ignored.
Test plan :
1) Use Elasticsearch search engine
2) Edit subfield 245$a in default framework
3) Enter 'title' in 'Link'
4) Save
5) Create a record with default framework with 245$a = 'The Fifth Elephant'
6) Go to MARC view
7) Click on link in 245$a
8) You find the record
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 3 Nov 2022 07:47:24 +0000 (07:47 +0000)]
Bug 32066: Check 2FA pref in check_cookie_auth
Test plan:
Without this patch:
1. Set the syspref TwoFactorAuthentication (enforce or enabled)
2. Configure 2FA for a patron
3. Logout
4. Authenticate but don't enter the 2FA code
5. Switch off the syspref (disabled) [via another browser or so]
6. Patron is stuck on the [original] login screen. [Only removing
the session cookie would resolve it.]
With this patch:
1. Follow the steps above again. But note that you can refresh
your browser window to get in now.
2. Verify that Auth.t passes now too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 3 Nov 2022 08:49:26 +0000 (08:49 +0000)]
Bug 32066: Add unit test to Auth.t
Test plan:
Run without next patch. Should fail.
Run with next patch. Should pass.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881