Jonathan Druart [Fri, 7 Apr 2023 12:50:11 +0000 (14:50 +0200)]
Bug 30708: Vue app
This commit contains the main commit message
The description of the original need is described in documents attached by the sponsor on the bug report specifically "[En] Preservation module - Main principles".
The idea is to develop a whole new module to track the status of the documents that are sent for processings/treatments in order to preserve them (eg. covering).
This is a first step, more are certainly coming later.
The author and sponsors have worked for several months before providing this MVP version. The different discussion and needs can be found at https://tree.taiga.io/project/joubu-koha-preservation-module/kanban
Some ideas of the next steps are also listed.
The first iterations have been done using the classic .pl/.tt Koha style but we finally switched to a new Vue module, for more fun.
These patches made the following main changes:
New files
* Koha objects under Koha/Preservation
* REST API controllers under Koha/REST/V1/Preservation
* preservation/home.pl and preservation/home.tt
* Vue components under js/vue/components/Preservation
* tests under t/db_dependent/Koha/Preservation and t/db_dependent/api/v1/preservation_*
* Cypress tests under t/cypress/integration/Preservation
DB:
* 3 new sysprefs PreservationModule, PreservationNotForLoanWaitingListIn, PreservationNotForLoanDefaultTrainIn
* 1 new permission "preservation" (will be split into subpermissions later)
* 5 new tables:
- preservation_processings
- preservation_trains
- preservation_processing_attributes
- preservation_trains_items
- preservation_processing_attributes_items
Terminology and workflow:
*Processings* are the different treatments an item can receive during its stay in the preservation module
A *processing* is defined by a list of *attributes*. To make the module as easy to use for the librarians in charge of the preservation area a list of processings will be defined when the module will be set up. An *attribute* is a name and a value. That's it. However it also has a type, to define what the value is coming from: *free text*, *authorised value* or *database column*.
For instance if you are defining a processing that will handling the book cover you could have 3 *attributes*:
- first named "Barcode" that will be automatically filled with "items.barcode" (type *database column*"
- second attribute named "color" linked with a new PRES_COLOR authorised value category you would have previously defined with "red", "blue", "green", etc. (type *authorised value*)
- third attribute named "notes", because librarians like notes (type *free text*)
Important: Even if the attribute is linked with a DB column or AV category, the value will be automatically pre filled but will stay editable (could be a config option to restrict the edition, later, if needed).
The *status* of an item will change during the preservation process. First it will arrive in the preservation area and be on a *waiting list*. It is not processed already but is not available anymore for the patrons of the library. That's why we are going to use the "not for loan" (items.notforloan) value for this. This *waiting list* is a fictional concept, it simply lists all the items in the library with a specific *status*.
A *train* is... how they call that at the BULAC, a train (same in French!). And we quite like the word so we kept it. It is what it is: a list of items/waggons, one after each other. We could have picked "cart", "list", but the concepts were already used in different places. We are not strongly attached to the term and it can be modified (but it's spread all over the code already and will be tedious to modify!) if you have a very good suggestion :)
So, a *train* is where items are going after they have been sent to the waiting list. It's a stack of items that will be sent to a provider. When you create a new train you will be asked for the "Status for item added to this train", that will be the "not for loan" value to set to the items added to this train, and a "Default processing" that will be the processing used. But keep in mind that a train can have items that have different processings (specific case, will see later).
When all items have been added to a *train*, you can *close* it. You cannot add items anymore to it! Then you can *send* it, and finally *receive* it. They are just statuses to keep track of the dates, and filter trains by status.
However when a train is received you can *copy* an item to another (opened) train. It means that you have the item on hand but something went wrong, you are not happy with the work done by the supplier and want to send it back, so you create a new train (that can have different items, and it is the case where you will have items in a train that don't all have the same processing!).
Test plan:
A. Prerequisites
0. Just `reset_all` and jump to B, or:
1. Apache configuration
You will need to edit /etc/koha/apache-shared-intranet-git.conf and add the following lines after the RewriteRule for erm (line.24?)
RewriteCond %{REQUEST_URI} !^/cgi-bin/koha/preservation/.*.pl$
RewriteRule ^/cgi-bin/koha/preservation/.*$ /cgi-bin/koha/preservation/home.pl [PT]
The RewriteCond is only useful if you are testing the "print slips" bugs as well, but it cannot hurt to have it!
2. `yarn js:build` to regenerate the Vue app for the preservation module
3. `updatedatabase`
4. `restart_all`
B. Settings
0.
Create 2 different values for NOTLOAN, eg. 'In preservation' and 'In preservation external'
Create different authorised values for a new category, eg. PRES_COLORS: RED, BLUE, GREEN. Feel free to create more categories.
1. You can turn on the "PreservationModule" syspref and go to the Koha homepage to see a new "Preservation" link
2. You landed on the empty home page of the preservation, no worry! We need to fill this page with useful information! (see #2 on the kanban)
3. Go to settings
4. Set "Status for item added to waiting list" to "In preservation"
and "Default status for item added to train": "In preservation external"
Create a new processing and define some attributes. Ideally at least one of each type.
5. Go to "Waiting list" and add some items
6. Go to "Trains" and create several trains (at least 2). Notice that the "Status for item added to this train" value is set to the value defined in the settings, but can be modified. Notice that this status can be set when a train is created but it won't be possible to edit later.
7. Add items to a train. You can only add items that are already in the waiting list. Add values for the attributes. Notice that the attributes linked with a database column are automatically pre filled. Notice that attributes linked with an authorised value are displayed with a dropdown list but that a different value can be set (remember, this is a feature!). Notice that attributes can be multivalued.
8. Add other items to the waiting list, notice the "Add last X items to a train" link at the top of the waiting list table, click it
9. You can now add several items to a train, directly (for instance if you don't really need to pass through the waiting list). Values can be set for the batch, but attributes linked with a database column are not editable (they will be prefilled automatically)
10. Once you have a train with several items, look at the "show train" view and notice the item list. If all of them are using the same processing then a table is displayed, one column per attribute. However if at least one item of the train has a different processing then the items are not listed in a table.
11. Edit items and confirm that the values are correctly saved.
12. Close, send and receive a train
13. Once a train is closed you can no longer add items to it
14. Once a train is received notice that you can "copy" an item to another (opened) train
QA notes:
The patch is huge! New enhancements and improvements have been moved to separate bug reports but this cannot be split. We need a ground base to build on top.
The size is mainly coming from Vue components, Koha::Objects, REST API controllers and specs, and tests. Nothing hard ;)
More to come:
- See the kanban!
- Print slips (bug 33547 and bug 34030)
- Put something on the landing page!
- Link with the acquisition module (suppliers, funds, etc.)
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: BULAC - http://www.bulac.fr/ Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Alex Buckley [Tue, 21 Feb 2023 04:48:02 +0000 (17:48 +1300)]
Bug 31631: Unit tests
Test plan:
Run amended Budgets.t test and all existing unchanged Acquisition tests in koha-shell
- sudo koha-shell <instance>
- prove t/db_dependent/Budgets.t
- prove t/db_dependent/Acquisition
- prove t/db_dependent/Acquisition.t
- prove t/db_dependent/Budgets
Sponsored-by: Waikato Institute of Technology, New Zealand Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31631: (follow-up) Fixes for failing unit test t/db_dependent/Budgets.t
Test plan:
1. Set CalculateFundValuesIncludingTax = 'Include'
2. Run Budgets.t unit test
sudo koha-shell kohadev
prove t/db_dependent/Budgets.t
3. Set CalculateFundValuesIncludingTax = 'Exclude'
4. Run Budgets.t unit test
sudo koha-shell kohadev
prove t/db_dependent/Budgets.t
Sponsored-By: Waikato Institute of Technology, New Zealand Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Tue, 25 Oct 2022 03:08:03 +0000 (03:08 +0000)]
Bug 31631: (follow-up) Use CalculateFundValuesIncludingTax when modifying existing order
This patch depends on Bug 31840.
To test:
1) Edit an order and increase the price so that you would expect it to
trigger a warning that you will exceed the amount allowed for this Fund
2) Confirm the warning is triggered
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>
Alex Buckley [Tue, 27 Sep 2022 03:59:00 +0000 (16:59 +1300)]
Bug 31631: Optionally use tax-exclusive values for calculating fund values
Test plan:
1. Apply patches
2. sudo koha-upgrade-schema <instance>
3. Restart services
4. Set TaxRates syspref = 0.15
5. Create a new fund with amount = 1000
6. Add an order to a basket with the following values:
- Fund = Choose the fund from step #5
- Quantity = 1
- Vendor price = 10
- Tax rate = 15%
- Discount = 20%
- Retail price = 10.00
- Replacement cost = 10.00
- Actual cost = 10.00
- Ensure the basket belongs to a vendor with ("List prices" = "Don't include tax" and "Invoice prices" = "Don't include tax")
7. Go to the Acquisitions home page
8. Confirm the 'Ordered' column for the step #5 fund contains 9.20
9. Click on the 9.20 link and confirm the ordered.pl page that loads
also contains 9.20 as the 'Subtotal'
10. Change 'CalculateFundValuesIncludingTax' = 'Exclude'
11. On the Acquisitions home page confirm the 'Ordered' column now
contains 8.00
12. Click on the 8.00 link and confirm the ordered.pl page also contains
8.00 as the 'Subtotal'
13. Close your basket and receive your order - change the 'Actual costs'
= 8.00 (the $10 retail price less the 20% discount, tax exclusive)
14. Go to the Acquisitions home page and confirm the 'Spent' column now
contains 8.00
15. Click on the 8.00 link and confirm the spent.pl page also contains
8.00 as the 'Subtotal'
16. Change 'CalculateFundValuesIncludingTax' = 'Include'
17. Confirm the 'Spent' column on the Acquisitions home page now shows
9.20
18. Click on the 9.20 link and confirm the spent.pl page also contains
9.20 as the 'Subtotal'
Sponsored-by: Waikato Institute of Technology, New Zealand 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>
Alex Buckley [Tue, 27 Sep 2022 03:54:06 +0000 (16:54 +1300)]
Bug 31631: Add new system preference
Sponsored-by: Waikato Institute of Technology, New Zealand 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>
Lucas Gass [Fri, 7 Jul 2023 16:07:47 +0000 (16:07 +0000)]
Bug 33620: Don't show guarantor info on details page if borrowerRelationship is empty
To test:
1. Apply patch
2. Have some values in borrowerRelationship.
3. Go to a patron details page and see both 'Show checkouts to guarantor:' and 'Show charges to guarantor:'
4. Now empty borrowerRelationship.
5. Visit the patron detail page again and you should no longer see either of those fields.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 16 Aug 2023 08:20:35 +0000 (08:20 +0000)]
Bug 6419: (follow-up) Use Select2 with optgroups
This patch divides the OPAC and staff options into separate optgroups
and adds Select2 for styling and filtering.
THe patch also corrects a few missed instances of "Intranet" in the list
of location options on the entry form.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 16 Aug 2023 06:49:53 +0000 (07:49 +0100)]
Bug 6419: Add StaffSerialsHome block to additional contents
This patch adds a new `StaffSerialsHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the point of sale page.
NOTE: This patch also removes the now defunct database update introduced
in the first patch of the series.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 16 Aug 2023 06:40:14 +0000 (07:40 +0100)]
Bug 6419: Add StaffPOSHome block to additional contents
This patch adds a new `StaffPOSHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the point of sale page.
NOTE: All the blocks have been placed at the bottom of the home pages
respectively for consistency. However, in this case it doesn't look as
clean as the content above is a form.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 16 Aug 2023 06:33:01 +0000 (07:33 +0100)]
Bug 6419: Add StaffPatronsHome block to additional contents
This patch adds a new `StaffPatronsHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the patrons home page.
NOTE: This one may highlight an issue with Panels directly followed
by page-sections.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 15 Aug 2023 15:36:27 +0000 (16:36 +0100)]
Bug 6419: Add StaffListsHome block to additional contents
This patch adds a new `StaffListsHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the lists home
page.
NOTE: This one may highlight an issue with Panels directly followed by
page-sections.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 15 Aug 2023 15:02:52 +0000 (16:02 +0100)]
Bug 6419: Add StaffCataloguingHome block to additional contents
This patch adds a new `StaffCataloguingHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the cataloguing home
page.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 15 Aug 2023 14:53:57 +0000 (15:53 +0100)]
Bug 6419: Add StaffAuthoritiesHome block to additional contents
This patch adds a new `StaffAuthoritiesHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the authorities home
page.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 15 Aug 2023 14:41:47 +0000 (15:41 +0100)]
Bug 6419: Add StaffAcquisitionsHome block to additional contents
This patch adds a new `StaffAcquisitionsHome` block to the HTML
Customisations options. This allows for the addition of a block of
content in a page-section at the bottom of the acquisitions home page.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Roberts [Fri, 22 May 2020 09:36:25 +0000 (09:36 +0000)]
Bug 6419: Add custom HTML areas to intranet home pages
This patch adds customisable HTML text areas to acqui/acqui-home.pl,
authorities/authorities-home.pl, cataloguing/addbooks.pl,
virtualshelves/shelves.pl, members/members-home.pl, pos/pay.pl and
serials/serials-home.pl pages
To test:
1) Apply patch
2) Run updatedatabase.pl
3) Add some html to the new prefs IntranetAcquisitionsHomeHTML,
IntranetAuthoritiesHomeHTML, IntranetCatalogingHomeHTML,
IntranetListsHomeHTML, IntranetPatronsHomeHTML, IntranetPOSHomeHTML
and IntranetSerialsHomeHTML
4) View the Acquisition, Authorities, Cataloging, Lists, Patrons,
Point of Sale, and Serials homepages and confirm that your changes
show. Note that this should display in exactly the same way as it
does in the already extant IntranetCirculationHomeHTML and
IntranetReportsHomeHTML system preferences.
Signed-off-by: Brandon J <brandon.jimenez@inLibro.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Mon, 18 Sep 2023 09:41:36 +0000 (11:41 +0200)]
Bug 33949: Fix display of old checkouts if no checkouts exist
If we pass an empty array from the perl controller, we retrieve an empty
string from the template, and the merge does not work.
This patch fixes the following bug:
Pick a patron without checkout history
Check them an item out and check it in
=> The table is empty, whereas it should display the item that has been
checked in.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 08:00:53 +0000 (10:00 +0200)]
Bug 33949: Replace GetAllIssues with Koha::Checkouts - opac
Same as bug 33948 for the OPAC side.
Additionally you will test
* OPACMySummaryHTML
* The different cover images services
* Display of ISBN
* Display of UPC
* Ratings
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Sat, 14 Oct 2023 14:20:00 +0000 (14:20 +0000)]
Bug 34980: Remove the use of event attributes from title-actions-menu.inc in OPAC
This patch updates the include file used to show actions with each
search result, removing two instances of "onclick" in favor of an event
handler class which was already in use elsewhere.
To test, apply the patch and log in to the OPAC.
- Perform a catalog search which will return results.
- Test the "Save to lists" link under any search result. The "Save to
lists" pop-up window should appear.
- View the contents of a list which contains some titles.
- Test the "Save to another list" control. The same pop-up window should
be triggered.
- Tag at least one title in the catalog and view the "Tag cloud" page.
- Perform the same test with the "Save to lists" button in the table of
our tags.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 16 Oct 2023 11:02:00 +0000 (11:02 +0000)]
Bug 35058: Automatically show authority tab 0 if DefaultAuthorityTab is empty
The change to the authority detail page made by Bug 34075 didn't take
into account the possibility that the DefaultAuthorityTab tab preference
might be empty. This leads to a JavaScript error and no tabs being
shown.
We can avoid this situation by initializing the tab_object variable as
an empty object.
To test, apply the patch and go to Authorities to repeat the test plan
for Bug 34075:
1. Locate and view the detail page for an authority record.
2. The page should default to the 0XX or first tab.
3. Go to Administration -> System preferences and set the
DefaultAuthorityTab preference to a number that won't be found
in your authority record (e.g. there are no 3XX tags defined).
4. Return to the detail page and verify that the first tab is displayed.
5. Set DefaultAuthorityTab to 1XX or greater, one that exists in your
record.
6. Reload the detail page and confirm the correct tab is selected.
7. Test the case where DefaultAuthorityTab is undefined by directly
updating the database. In koha-testing-docker you can run this
command:
echo "update systempreferences set value = 3 where variable = 'DefaultAuthorityTab';" | koha-mysql kohadev
Return to the authority detail tab to confirm that the first tab is
displayed.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch updates the markup of the patron search results table so that
the "actions" column (Edit, Check out) are excluded when using the
DataTables "Export" button. The configuration was already in place but
the column header lacked the required class.
To test, apply the patch and perform a patron search which will return
multiple results.
Click the "Export" control at the top of the patron search results
table and choose "Print." In the print preview there should be no final
column containing "Edit" and "Check out."
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Sat, 7 Oct 2023 19:36:56 +0000 (19:36 +0000)]
Bug 3007: Remove unimarc_field_700-4.pl value builder
I tried translating it, found it not working and replaced
by the qualif authorised value list with relator terms/codes.
To test:
* Make sure the unimarc_field_700-4.pl is no longer listed in
frameworks.
* Make sure it's not used in the standard frameworks.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
The problem is in the patron_messages.inc file on line 25. The variable "expiry" is used, but it should be "patron.dateexpiry" because the patron's card isn't expired yet.
TEST PLAN
1) Go to “Patrons > + New patron”
2) Create a patron with an expiry date that is less than 30 days in the future
3) Go to the "details" tab of this account
4) Notice that the date is missing after "expires on":
"Expiration: Patron's card will expire soon. Patron's card expires on Renew or Edit details"
5) Apply the patch
6) Reload the page; the expiry date should now be displayed
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>
"""
- change and document (adduser(8)) that --disabled-password will behave
like --disabled-login and additionally set the shell to
/usr/sbin/nologin.
"""
https://salsa.debian.org/debian/adduser/-/commit/427ade7d9116af5af7baa9d0c538e14fa86560cf
Test plan:
Confirm the above and that the change makes sense.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34271: Remove a few Logger statements from REST API
See also bug 22678.
We should call app->log->warn, ->debug, etc. instead of Logger.
Test plan:
The simplest way I tested V1, is add a app->log->warn in the try
blocks, restart all and check that your log4perl is set correctly
too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 26 Jun 2023 14:38:41 +0000 (14:38 +0000)]
Bug 29181: Create patron card creator batch from report result
This patch adds the option of taking the results of a report that
returns borrowernumbers and create a new patron card creator batch with
those results.
The logic of the dropdown menu has been modified in order to ensure that
duplicate patron modification options aren't shown in the menu when a
report return both borrowernumber and cardnumber.
To test, apply the patch and create a new report which will return
patron borrowernumbers, e.g.
SELECT borrowernumber, cardnumber, surname, firstname FROM borrowers
order by RAND() LIMIT 20
- Run your report
- Click the "Batch operations with..." button at the top of the result
- Click "Patron card creator"
- A new tab should open with a new patron card creator batch with the
patrons from your report.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 10 Oct 2023 15:12:12 +0000 (15:12 +0000)]
Bug 34119: Improve staff interface print stylesheet following redesign
This patch makes some updates to the staff interface print stylesheet in
order to make it work better following the staff interface redesign.
To test, apply the patch and clear your browser cache if necessary.
In the staff client, go to various pages and view the print preview. The
print view should exclude the header navigation, header search, page
toolbars and page sidebars.
- Pages with tabbed displays should show content from all tabs: e.g.
bibliographic details, MARC editor.
- In Reports, check that report results print well.
- Pages with DataTables should print with table information visible but
table controls hidden.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 10 Oct 2023 14:24:22 +0000 (14:24 +0000)]
Bug 34119: (Preliminary) Run stylelint fixes on print.css
This patch corrects errors raised by the new stylelint configuration in
print.css. Most of the fixes were made automatically by using the
"--fix" option:
- Expected indentation of 4 spaces
- Unexpected whitespace before ":"
- Unexpected unit
- Expected single space before "{"
- Expected newline after ";" in a multi-line declaration block
Errors from use of "!important" have been ignored.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34901: Display transit status on patron holds tab only if hold found value is "T"
Check the transit status of the *hold* in addition to the transit status
of the *item*, to avoid displaying a misleading transit status on
item-level holds when the item is actually in transit for a different
hold
To test:
1. Create a record-level hold for Patron A for pickup at a library other
than the logged-in library
2. Check in an item to fill that hold
3. Put an item-level hold on that same item for Patron B at a different
library other than the logged-in library
4. Open Patron A's and Patron B's account details pages in separate tabs
--> Note that the Holds tab on Patron A's account detail page correctly
shows that their hold is in-transit
--> Note that the Holds tab on Patron B's account detail page incorrectly
shows that their hold on the same item is also in-transit
4. Apply patch
5. Clear browser cache
6. Refresh both patrons' account details pages
--> Confirm that the holds tab on Patron A's account still correctly
says their hold is in-transit
--> Confirm that the holds tab on Patron B's account now correctly shows
a blank status for their hold
7. Cancel Patron A's hold
8. Check in the item again to put it in transit for Patron B's hold
9. Reload Patron B's account page
--> Confirm that the holds tab on Patron B's account now correctly says
their hold is in-transit
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi> Signed-off-by: Tuomas Kunttu <tuomas.kunttu@kouvola.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The anonymous patron details page should show an alert message.
1) Configure an existing borrowernumber in system preference 'AnonymousPatron'
2) Go to details page of this borrower :
/cgi-bin/koha/members/moremember.pl?borrowernumber=x
3) Check you see alert 'This is the anonymous patron.'
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34910: Do not allow checkout for anonymous patron
The anonymous patron circulation page should show an alert message and not allow check-out.
1) Configure an existing borrowernumber in system preference
AnonymousPatron
2) Go to circulation page of this borrower :
/cgi-bin/koha/circ/circulation.pl?borrowernumber=x
3) Check you see alert 'This is the anonymous patron, so circulation is disabled.'
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 20 Sep 2023 15:10:17 +0000 (15:10 +0000)]
Bug 34852: Use template wrapper for breadcrumbs: OPAC part 2
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.
Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:
- Navigate to /cgi-bin/koha/ilsdi.pl
- Check a variety of links in the list
- Advanced search
- Locate a bibliographic record and view the ISBD detail page
- View the MARC detail page
- Locate a serial record which has a patron notification notice defined
in its subscription details
- On the detail view under the "Subscriptions" tab, click the
"Subscribe to email notification on new issues" button.
- Confirm the subscription, then when you return to the detail page,
click "Cancel email notification" to check that view as well.
- Authority search
- Perform a search which will return results
- Click the "Details" link on one of the results
- Also view the "MARC view" tab (note that I didn't address the
breadcrumb inconsistency between the normal and MARC view in
this patch).
- Try to view a bibliographic record which is suppressed in the
OPAC. Requires OpacSuppression enabled and OpacSuppressionRedirect set
to "An explanatory page"
- Set the value of 942$n to 1 to suppress it in the OPAC.
- In a system with ElasticSearch enabled, go to "Browse search" (or
navigate directly to /cgi-bin/koha/opac-browse.pl
- With OpacBrowser enabled, go to "Browse by hierarchy."
Signed-off-by: Philip Orr <philip.orr@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 20 Sep 2023 14:46:01 +0000 (14:46 +0000)]
Bug 34849: Use template wrapper for breadcrumbs: OPAC part 1
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.
The patch contains a minor CSS update, so you will have to rebuild the
OPAC CSS for testings.
Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:
- User summary
- Charges
- Personal details
- Submit changes
- Consents (with PrivacyPolicyConsent enabled)
- Tags
- Change password
- Submit password change
- Search history
- Test when logged in and when not logged in
- Checkout history
- Privacy
- Holds history
- Recalls history
- Messaging (with EnhancedMessagingPreferences
and EnhancedMessagingPreferencesOPAC enabled).
- Lists
- View private list
- View public list
- Edit list
- Share list
- Submit invitation
- Create list
- View list contents
- Routing lists (with RoutingSerials enabled)
- Ask for a discharge (with useDischarge enabled)
- ILL requests
- Curbside pickups
- Error page: Navigate to a non-existent page
Signed-off-by: Philip Orr <philip.orr@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 12 Oct 2023 09:56:25 +0000 (09:56 +0000)]
Bug 35042: Remove set datelastseen to null on table in Members.t
Non-trivial was adding the category_type <> S.
Test plan:
Run t/db_dependent/Members.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 6 Oct 2023 14:48:57 +0000 (16:48 +0200)]
Bug 34959: Sort PO files correctly
The PO files are not sorted when we update them which leads to
unnecessary changes that are commited: hard to see differences and
make git index grow superfluously.
Test plan:
0. Do not apply this patch
1. gulp po:update --lang es-ES
2. git commit -a -m"First PO update"
3. Run again the gulp update command
4. git diff
=> You have a lot of changes generated here, the po:update is not
idempotent.
5. Apply this patch
6. Run the gulp update command
7 git commit -a -m"PO update after 34959"
8. Run the gulp update command
9. git diff
=> No changes are generated
Note that this patch will all the entries by files, and per line
numbers.
It fixes a bug in some condition, where we add information/context about
the string. For instance search for "For the first occurrence" in the
file. Prior to this patch this was not correct, we didn't add info about
the first occurrence (but whichever in the list).
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>
Jonathan Druart [Fri, 6 Oct 2023 15:17:51 +0000 (17:17 +0200)]
Bug 34959: Remove unused sub
Nothing special here, this sub is not used and we can remove it.
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>
Martin Renvoize [Mon, 11 Sep 2023 10:32:25 +0000 (11:32 +0100)]
Bug 34752: Add AV handling to sort1/sort2 on baskets
This patch adds Authorized Value handling for the display of sort1 and
sort2 fields in the acquisitions basket display page.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: emlam <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 21 Jul 2023 16:41:48 +0000 (16:41 +0000)]
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template
This patch eliminates two instances of "onclick" from the Koha to MARC
mapping template, moving these event handlers into JS in the footer.
To test, apply the patch and go to Administration -> Koha to MARC
mapping.
- Click "Add" next to a Koha field.
- You should get a JS popup asking for entry of a MARC tag. Confirm
that this process completes correctly.
- Test a "Remove" link too. It should work to remove mapping from a Koha
field.
- Test the "Cancel" choice in both the "Add" and "Remove" cases to
confirm that the operation is cancelled.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch updates the holdings table on the OPAC's bibliographic detail
page so that home and current library columns can be sorted correctly by
library name. There have been changes to the way the template shows
these values, but the DataTables "data-sort" attribute on the table cell
had not been updated accordingly.
To test, apply the patch set the OpacLocationBranchToDisplay system
preference to "home and holding libraries."
- Make sure home and holding library columns are not hidden in the
table settings under Administration -> Table settings -> OPAC ->
holdingst.
- Locate a bibliographic record in the OPAC which has multiple items
from different libraries.
- Test that the home and current library columns sort correctly by
library name.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Emily Lamancusa [Wed, 11 Oct 2023 13:40:05 +0000 (09:40 -0400)]
Bug 34881: Improve idempotency of DBRev
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Julian Maurice [Thu, 24 Aug 2023 07:27:28 +0000 (09:27 +0200)]
Bug 27249: Catch NoOpenDays exception while checking out an item
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>
Julian Maurice [Tue, 18 Jul 2023 08:26:03 +0000 (10:26 +0200)]
Bug 27249: Prevent infinite loop when searching for an open day
Calendars can be configured in a way that all days are closed.
The simplest way to do that is to configure a repeatable holiday for
every day of the week.
With such calendars, searching for an open day will literally take
forever.
This patch sets a hard limit on how many iterations are allowed before
giving up. This limit is set to the arbitrary value of 5000, which
should be large enough to be able to consider there is no open days if
we haven't found any with that many iterations, and small enough to
allow the loop to end quickly
Test plan:
1. Set system preference 'useDaysMode' to 'Use the calendar to push the
due date to the next open day' ('Datedue'). Make sure the existing
circulation rules do not conflict with that setting.
2. Browse to Tools » Calendar
3. Set every day of the week to "Holiday repeated every same day of the
week"
4. Issue an item to a patron
5. Check the box and select 'Renew selected items'
6. The renewal should fail pretty quickly
Signed-off-by: Sam Lau <samalau@gmail.com> 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, 12 Oct 2023 10:38:34 +0000 (10:38 +0000)]
Bug 35037: (follow-up) Minor adjustments to margins and padding
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 11 Oct 2023 17:41:45 +0000 (17:41 +0000)]
Bug 35037: Revise the appearance of the last patron button
Following Bug 21246 I find the button to be too obtrusive. This patch
makes CSS changes to the style of the "Last patron" button shown in the
staff interface when the "showLastPatron" system preference is enabled.
To test, apply the patch and rebuild the staff interface CSS.
- Enable the showLastPatron system preference if necessary.
- Go to Circulation in the staff interface and check out to a patron.
- A "Last patron" button should appear on the right-hand end of the
breadcrumbs bar.
- Check that the link, dropdown button, and dropdown menu look good.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 4 Oct 2023 10:51:14 +0000 (10:51 +0000)]
Bug 34401: Fix inconsistencies in Item search fields page titles, breadcrumbs, and headers
This patch fixes some inconsistencies in the item search fields
administration page, making sure the page title, breadcrumb navigation,
and page headers are consistent with each other.
The patch makes some changes to the way new item search fields are added
in order to keep the display consistent with other similar interfaces:
The "add" form is no longer shown dynamically from the page listing item
search fields. Clicking the "New search field" toolbar button will now
take you to the same template used for editing existing search fields.
This allows us to put the correct context into page title, breadcrumbs,
and headings.
To test, apply the patch and go to Administration -> Item search fields.
Test the process of adding a new search field and editing an existing
search field.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Nind [Sat, 30 Sep 2023 06:27:39 +0000 (06:27 +0000)]
Bug 34966: Terminology - fix add item form (& to and)
This patch updates the add item form in the staff interface to
change the 'Add & duplicate' button to 'Add and duplicate'.
In our terminology guide, & should only be used when
it is part of a proper noun or a common abbreviation:
https://wiki.koha-community.org/wiki/Terminology
Test plan:
1. In the staff interface, search for and select a record.
2. Select New > New item.
3. Note that "Add & duplicate" is one of the action buttons at the
bottom of the add item form.
4. Apply the patch.
5. Refresh the page.
6. Note that the action button is now labelled 'Add and duplicate'.
7. Sign off! 8-)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi> Signed-off-by: Reetta Pihlaja <reetta.pihlaja@siilinjarvi.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34800: Adding openhub links for Koha contributors
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>
Owen Leonard [Fri, 25 Aug 2023 15:00:20 +0000 (15:00 +0000)]
Bug 34395: Fix inconsistencies in Authority types page titles, breadcrumbs, and header
This patch fixes some inconsistencies in the authority
types administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.
Test each page to confirm that page title, heading, and breadcrumbs are
consistent:
- Administration -> Authority types
- New authority type
- Edit authority type
- Delete an authority type which is not used
- Delete an authority type which is in use
- Authority type MARC structure
- New tag
- Edit tag
- Delete tag
- View subfields
- Edit subfields
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 3 Oct 2023 17:53:25 +0000 (17:53 +0000)]
Bug 34399: Fix inconsistencies in Record overlay rules page titles, breadcrumbs, and headers
This patch fixes some inconsistencies in the record overlay rules
page, making sure the page title, breadcrumb navigation, and page
headers are consistent with each other.
Test the record matching rules page to confirm that page title, heading,
and breadcrumbs are consistent.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 6 Oct 2023 11:24:49 +0000 (11:24 +0000)]
Bug 34405: Fix inconsistencies in EDI accounts/Library EAN page titles, breadcrumbs, and headers
This patch fixes some inconsistencies in templates for EDI accounts
and Library EANs, making sure the page title, breadcrumb navigation, and
page headers are consistent with each other.
To test, apply the patch and check these views:
- Administration -> EDI accounts
- New EDI account
- Edit EDI account
- Confirm deletion of EDI account
- Administration -> Library EANs
- New library EAN
- Edit library EAN
- Confirm deletion of EDI account
- With an account for a specific library
- With an account for any library
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch removes this stray method from the original implementation.
To test:
1. Apply this patch
2. Run:
$ git grep requests_count
=> SUCCESS: Notice the only ILL-related mantions are API related, which
is returned by using the 'requests+count' embed, which is unrelated to
this particular method
3. Run:
$ prove t/db_dependent/api/v1/ill_batches.t \
t/db_dependent/Illbatches.t
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 30719: (QA follow-up) Pick better column names and cleanup
This patch takes on normalizing the attribute names, embeds, and also
makes the whole API more kosher, in terms of using accessors for related
objects, using the standard structure for strings_map, etc.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Mon, 9 Oct 2023 15:29:58 +0000 (15:29 +0000)]
Bug 30719: (QA follow-up) Rewrite Illbatches list endpoint
Update accessors
Add +strings embed
Add x-koha-embed to batches list andpoint
Add embed to API call from the front-end
Update table to get data from _strings
Add x-koha-embed to tests
Add strings_map to Illbatch
Add to_api_mapping to Illbatch
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Fri, 12 May 2023 17:10:00 +0000 (17:10 +0000)]
Bug 30719: Tests
Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Fri, 12 May 2023 17:09:39 +0000 (17:09 +0000)]
Bug 30719: ILL Batch Statuses
- UI adding support for batch statuses in batch UI
- Admin UI for managing batch statuses
- API specs
Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Fri, 12 May 2023 17:06:01 +0000 (17:06 +0000)]
Bug 30719: ILL Batches
- Add batch column to requests table
- Establish if there are any availability or metadata enrichment plugins and pass that to the template
- Verify if we have any backend that can support batches, if not, don't show the option
- Updates to the ILL toolbar
- New ILL batch modal
- New Koha classes
- API specs
Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Fri, 12 May 2023 16:59:21 +0000 (16:59 +0000)]
Bug 30719: DB and API
- Adds 'batch' accessor to Illrequest object
- New illbatches and illbatch_statuses tables
- New foreign key 'batch_id' in illrequests table
- Atomic update file
- Default illbatch_statuses
- Add 'add' ill_requests api method
- Add POST method in ill_requests path
- Add 'batch_id property to ill_request api definition
- Updated swagger.yml with new batches and batchstatuses endpoints
Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 15 Sep 2023 13:55:07 +0000 (13:55 +0000)]
Bug 26314: (QA follow-up) Improve POD and fix links for UseControlNumber off
When UseControlNumber is off, we previously did a search on the title index,
but this was not actually correct. It might work when we have a dependent
title and the title also appears on 245$p, but there is a better way:
The title of the set record will be found in:
* 773$3 for a dependent title
* 800/810/811/830 for an independent title
The search indices to use are host-item and title-series.
As we are not only looking for 773, POD was adjusted to reflect that.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 8 Sep 2023 14:36:20 +0000 (15:36 +0100)]
Bug 26314: (QA follow-up) Resolve new QA script failures
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 27 Oct 2021 07:50:47 +0000 (08:50 +0100)]
Bug 26314: Update for changes to bug 11175 methodology
This moves the show_volumes calculation back out of C4::XSLT into the
controller scripts and refined the search query builder slightly based
on the XSLT equivilent.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 18 Oct 2021 17:06:32 +0000 (18:06 +0100)]
Bug 26314: (follow-up) Make title search explicit
This patch updates the get_volumes_query search returned when
UseControlNumber is disabled such that it matches the query produced by
XSLT sheets by replacing the ->title accessor with the more specific
->subfield('245', "a") accessor to just take subfield `a` into account.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 1 Sep 2021 15:12:18 +0000 (16:12 +0100)]
Bug 26314: (follow-up) Use clean_search_term
This patch uses the now public clean_search_term from bug 28316 to
sanitize the title string and prevent crashes in elastic search when
title contain reserved characters.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 9 Aug 2021 10:39:56 +0000 (11:39 +0100)]
Bug 26314: Only display volumes link when required
This patch makes C4::XSLT query for volumes the same way it would do
with the generated link (i.e. based on UseControlNumber) and passes
a flag to the XSLT so it displays (or not) the 'Show volumes' link.
To test:
1. Apply the first patch
2. Have a known record without volumes
3. Open the record in the OPAC
=> FAIL: It shows the 'Show volumes' link
4. Have a record known to have volumes
5. Open the record in the OPAC
=> SUCCESS: It shows the 'Show volumes' link
6. Apply this patch and restart_all
7. Reload the above records
=> SUCCESS: It shows the link where it has to, and hides it where it
shouldn't be displayed.
8. Repeat for Intranet
9. Sign off :-D
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Emmi Takkinen [Fri, 17 Mar 2023 07:55:39 +0000 (09:55 +0200)]
Bug 16223: Require fee limit only if "Lift after payment" is set as "Yes"
Fee limit should only be required if restriction is
meant to be lifted after payment. This patch makes
"Fee limit" input field required based on value of
"Lift after payment" select field.
To test:
1. Create a new restriction.
2. "Lift after payment" should be set as "No".
3. Change value as "Yes".
=> "Fee limit" should now have "Required" text
after input field.
4. Try to save restriction.
=> Text "This field is required" should be
displayed after "Fee limit".
5. Change "Lift after payment" back to "No".
=> Both texts should now be lifted.
Also test with existing restriction and make sure
restrictions are still saved without problems.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 11 Nov 2022 09:54:05 +0000 (09:54 +0000)]
Bug 16223: (QA follow-up) Move trigger to apply
This patch moves the del_restrictions_after_payment from before the
actual credit application call inside Koha::Account::pay to after the
application of credits to debits in Koha::Account::Line::apply.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 11 Nov 2022 09:49:50 +0000 (09:49 +0000)]
Bug 16223: (QA follow-up) Remove GetDebarments
We remove the GetDebarments routine in 31095.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 16223: Add ability to define liftable restrictions
Some libraries debar Patrons at the end of the year for having unpaid fines,
like in Bug 15157. Currently librarians have to manually remove this type of
debarments after Patron has paid his/her fines.
This patch adds ability to create restrictions which are lifted after
patron pays ceratain amount of fines.
To test:
1. Apply this patch.
2. Restart your services if needed.
3. Navigate to page restrictions.pl.
=> Note that table has two new colums in it, "Lift after payment?" and "Fee limit".
4. Add new restriction which has "Lift after payment?" set
as Yes and fee limit as 5.
5. Create fees for a patron so they exceed fee limit e.g. 10
6. Add restriction made in step 2. for the patron
7. Pay patrons fees partially so that they go under fee limit
=> Note that patrons restriction should now be lifted.
Also prove t/db_dependent/Patron/Borrower_Debarments.t.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 16223: Add new columns to table restriction_types
This patch adds two new columns, lift_after_payment and fee_limit,
to table restriction_types. These colums are used to control
lifting patrons restrictions after paying their fees.
To test:
1. Apply this patch.
2. Update your database via updatedatabase.pl.
=> Confirm your table restriction_types has two new columns.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>