Marcel de Rooy [Sat, 13 May 2023 12:06:55 +0000 (12:06 +0000)]
Bug 33727: Groundwork for Calendar.t
Update test while removing need for Test::DBIx::Class.
Test plan:
Run t/Calendar.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>
Kyle Hall [Wed, 22 Feb 2023 12:03:39 +0000 (07:03 -0500)]
Bug 33039: Add ability to specify a template for serial subscription "Published on (text)" field
Some libraries would like to have the text version of the serials
"published on" field auto-generated from a template. This template
should be definable at the subscription level.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Create or edit a new subscription
5) Edit the "Publication date template", create a template toolkit
template.
Keys available are the Koha::Subscription object as 'subscription'
and the following serial table columns as keys:
serialseq
serialseq_x
serialseq_y
serialseq_z
subscriptionid
biblionumber
status
planneddate
publisheddate
publisheddateext
notes
routingnotes
So your example template could be "[% subscription.subscriptionid %] [% biblionumber %]"
6) Generate the next serial
7) Note the next issue has a "Date published (text)" field based on the
template you set!
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 23 May 2023 10:16:55 +0000 (12:16 +0200)]
Bug 33804: Use as_due_date to display due dates
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 23 May 2023 10:16:41 +0000 (12:16 +0200)]
Bug 33804: Add as_due_date option to $date
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Phil Ringnalda [Tue, 27 Jun 2023 22:34:59 +0000 (15:34 -0700)]
Bug 34097: Prevent clicking ellipsis for dateaccessioned plugin from scrolling up
Test plan:
1. Find a record with several items (in ktd "MacLaren's Gaelic
self-taught" will do nicely
2. Click the Edit button next to one of the items
3. Click the "..." to the right of "d - Date acquired" and verify that the
page doesn't scroll up to the top, and that the current date is
inserted in the field
4. Click the "..." to the right of "w - Price effective from" and verify
that the page doesn't scroll up and the current date is inserted
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>
Jonathan Druart [Tue, 11 Jul 2023 08:21:09 +0000 (10:21 +0200)]
Bug 33863: Update values in data that will be saved
We are not saving the values of the input but a representation of the
form, contains in $("#order_edit").data('row');
To acchieve that it's preferable to reuse _update_unitprice and call it
when #change_currency is modified.
Some code cleaning slipped into the patch, for readability purpose.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 5 Jul 2023 09:55:33 +0000 (11:55 +0200)]
Bug 33863: Reset value if checkbox is unchecked
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 30 May 2023 12:37:33 +0000 (14:37 +0200)]
Bug 33863: (bug 25655 follow-up) Check "Change currency" only if checked before
We should not check "Change currency" if it has not modified in the
original order.
Test plan:
Create an order with 3+ items
Receive 1 item, don't check "change currency"
Receive an other item
=> "Change currency" is not checked
Check "Change currency", modify the currency and the price
Receive a third item
=> Change currency is checked, invoice currency and price are set
correctly to the previous values
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 07:48:42 +0000 (09:48 +0200)]
Bug 33946: Do not display link to non-existing bibliographic record
If you use biblio-title.inc on a biblio that does not longer exist, "No title" is shown with a link to catalogue/detail?.pl?biblionumber=
We should at least remove the link.
We could even do better and display "No bibliographic record" if the biblio does not longer exist.
Test plan:
Edit mainpage.pl, add
$template->param( your_bib => Koha::Biblios->find(42) );
Edit intranet-main.tt, add
[% INCLUDE 'biblio-title.inc' biblio=your_bib link = 1 %]
Not hit the main page and see what's hapenning.
If you have a bibliographic record with biblionumber=42, its info will
be displayed.
Remove this record and try again => it's replaced with "No bibliographic record"
without a link
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 5 Jul 2023 09:07:35 +0000 (11:07 +0200)]
Bug 33956: Use Koha::Biblio->opac_summary_html from opac-user.pl
This code is currently duplicated in controllers opac-readingrecord.pl
and opac-user.pl.
After bug 33949 it will be removed from opac-readingrecord.pl, and bug
33956 aims to remove it from opac-user.pl.
Final situation will be: we have the code in a module, covered by tests
\o/
Test plan:
Check an item out
Setup OPACMySummaryHTML ("biblionumber: {BIBLIONUMBER}" for instance)
Go to the "Your summary" at the OPAC and notice the "Links" column
Everything should work identically before and after this patch
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 09:38:01 +0000 (11:38 +0200)]
Bug 33954: Koha::Biblio->opac_summary_html
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 10:46:25 +0000 (12:46 +0200)]
Bug 33954: Add tests
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 09:58:51 +0000 (11:58 +0200)]
Bug 33953: Koha::Biblio->ratings
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 10:36:52 +0000 (12:36 +0200)]
Bug 33953: Adjust tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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:55:36 +0000 (10:55 +0200)]
Bug 33952: Koha::Biblio->normalized_isbn
This is needed for bug 33947 where we need to call ->normalized_isbn on a Koha::Biblio object.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 8 Jun 2023 10:29:38 +0000 (12:29 +0200)]
Bug 33952: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 6 Jul 2023 12:08:26 +0000 (14:08 +0200)]
Bug 34211: Add +strings for GET /api/v1/biblios/:biblio_id/items
Allow to embed stringified version of attributes for the "Get items for
a biblio" endpoint
Test plan:
curl -u koha:koha --request GET 'http://localhost:8081/api/v1/biblios/47/items' --header "Content-Type: application/json" --header "x-koha-embed: +strings" | jq
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 5 Jul 2023 13:44:50 +0000 (15:44 +0200)]
Bug 27824: Trim column headers
To support additional spaces.
Using the system for defining a column name placeholder (Bug 23390), if
there is a space inside the column name placeholder it won't work. The
SQL example in Bug 5697:
SELECT
i.itemnumber,
i.itemnumber as Exemplarnummber,
[[i.itemnumber| itemnumber for batch]],
CONCAT('<a
href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=',
i.biblionumber, '&itemnumber=', i.itemnumber, '#edititem', '\">',
i.itemnumber, '</a>' ) AS "itemnumber as edit link"
FROM items i
"[[i.itemnumber| itemnumber for batch]]" has a space before "itemnumber
for batch." With that space removed it works as expected.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 5 Jul 2023 13:44:32 +0000 (15:44 +0200)]
Bug 27824: Add a test
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31147: Recalls should not adjust due time for related checkouts
The current recalls behaviour adjusts the due date of the most appropriate checkout based on the 'recall due date interval' circulation rule. It also adjusts the due time, which is buggy behaviour. The due date should be adjusted based on the circulation rule, but the due time should remain the same.
To test:
1. Enable the UseRecalls system preference and configure recalls-related circulation and fines rules
2. Check out Item A to Patron A
3. Log into the database and check the due date for that checked out item, e.g.
SELECT date_due FROM issues WHERE itemnumber = XXXX;
--> It should be YYYY-MM-DD 23:59:00
4. Log into the OPAC as Patron B and place a recall on Item A. This will force a change to the recall's due date. Check the due date in the database
SELECT date_due FROM issues WHERE itemnumber = XXXX;
--> It should be today + the number of days in your recall due date interval circulation rule, at the exact time you placed the recall. This is buggy behaviour.
5. Apply the patch and restart services
6. Check in Item A, do NOT fulfill the recall
7. Cancel the recall
8. Check out Item A to Patron A
9. Log into the database and check the due date for that checked out item, e.g.
SELECT date_due FROM issues WHERE itemnumber = XXXX;
--> It should be YYYY-MM-DD 23:59:00
10. Log into the OPAC as Patron B and place a recall on Item A. This will force a change to the recall's due date. Check the due date in the database
SELECT date_due FROM issues WHERE itemnumber = XXXX;
--> It should be today + the number of days in your recall due date interval circulation rule, with time of 23:59:00.
11. Check in Item A, do NOT fulfill the recall
12. Cancel the recall
13. Check out Item A to Patron A. Specify a due date and change the due time so it isn't 23:59.
14. Log into the OPAC as Patron B and place a recall on Item A. This will force a change to the recall's due date. Check the due date in the database
SELECT date_due FROM issues WHERE itemnumber = XXXX;
--> It should be today + the number of days in your recall due date interval circulation rule, with time you set in Step 13.
Sponsored-by: Catalyst IT 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>
David Cook [Wed, 7 Jun 2023 05:30:40 +0000 (05:30 +0000)]
Bug 33933: Only show use restriction once on OPAC detail page
This patch removes a regression from bug 32611 that caused the
use restriction text to be shown twice for "Available" items.
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=29
2. Edit item and add "Restricted access" for "5 - Use restrictions"
3. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29
4. Note that "Status" says "Available (Restricted access)" and there is no
duplicate "Restricted access" at the top of that table cell
Signed-off-by: ebal <eric.balluto@univ-lyon2.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Phil Ringnalda [Tue, 20 Jun 2023 01:32:46 +0000 (18:32 -0700)]
Bug 28196: Insert searchid in URL correctly, so it doesn't follow the hash
Test plan:
1. Search the catalog in the staff client for anything which will return
at least two results
2. Click on any result to go to the bib detail page
3. Click the edit button for any item attached to the bib
4. Verify that the loaded URL contains &searchid=scs_(a number), and
that the URL ends with #edititem
5. Make any change to the item, save, verify that your change was made
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>
Lucas Gass [Fri, 7 Jul 2023 23:12:56 +0000 (23:12 +0000)]
Bug 34220: Only show biblio-view-menu.inc if their is an associated bib
To test:
- Go to Tools > Log viewer
- Uncheck All modules
- Check the 'Catalog' module
- Make sure "To screen in the browser" is the selected output
- Click Submit
After the page loads, instead of the tools side navbar appearing on the left, a 'catalog detail' type navbar (Normal, MARC, ISBD, etc.) is present with links that error out as there's no associated bibnumber.
-Apply patch
-Try again, you should not see the biblio-view-menu
-Try one more time but this time add a valid biblionumber to the Object: field. Now the biblio-view-menu should show with links to that particular bib.
Works as advertised. Signed-off-by: Alexander Blanchard <alexander.blanchard@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 7 Jul 2023 09:40:32 +0000 (11:40 +0200)]
Bug 31082: Make the string translatable
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>
Jonathan Druart [Thu, 25 May 2023 09:46:39 +0000 (11:46 +0200)]
Bug 31082: Add tooltip to buttons when item bundles cannot be changed while checked out
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Thu, 8 Jun 2023 10:20:02 +0000 (10:20 +0000)]
Bug 33581: Add sample patrons to patch and some hints
* Adds sample patrons to the new dependency checking JS
* Adds a hind "requires sample libraries" to sample patrons
and sample holidays.
To test:
* Build CSS (yarn build)
* Veriy the checkbox for sample patrons works like the
sample holidays one
* Verify the hint shows up as intended
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 7 Jun 2023 09:31:20 +0000 (11:31 +0200)]
Bug 33581: Disable sample holiday if libraries are not selected
If libraries are not selected we should not try to insert holidays, or
the installer will fail with a missing FK.
This patch simply disable and uncheck the checkbox when libraries are
not going to be inserted.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 5 Jul 2023 10:26:09 +0000 (12:26 +0200)]
Bug 32801: Prevent 500 on /checkouts
If checked_in flag is passed we return the "old checkouts". But if the
item has been deleted we explode with
"message":"Expected integer - got null.","path":"\/0\/item_id"
The specs should reflect that an item can have been deleted.
Test plan:
Hit the endpoint and confirm the above.
Can be done easily using curl:
curl -u koha:koha --request GET 'http://localhost:8081/api/v1/checkouts?patron_id=5&checked_in=1' --header "Content-Type: application/json" | jq
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 5 Jun 2023 13:07:35 +0000 (13:07 +0000)]
Bug 33893: Use template wrapper for tabs: OPAC checkout history
This patch updates the OPAC checkout history page so that it uses
the new WRAPPER syntax to generate tabs markup.
This patch also updates tab WRAPPER directives in html_helpers.inc to
allow us to pass a custom id for tab links in situations like this one
where we have multiple tabs requiring unique IDs but they all point to
the same panel.
To test, apply the patch and make sure the OnSiteCheckouts system
preference is set to "disabled."
- Log into the OPAC as a patron with checkouts.
- View the checkout history page. The checkout history information
should be displayed without any tabs.
- Enable the OnSiteCheckouts system preference and if necessary check
out some on-site checkouts to your patron.
- On the OPAC history page there should now be three tabs: All,
Checkouts, and On-site checokuts.
- Switching between the tabs should filter the table accordingly.
- Test that the changes to the tab wrapper have not broken tabs on other
pages, e.g. bibliographic details or user summary.
Signed-off-by: AlexanderBlanchardAC <alexander.blanchard@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 3 Jul 2023 16:19:28 +0000 (16:19 +0000)]
Bug 26862: Improve MARC21 530 display on detail pages
This makes some changes to the way we display field 530 in OPAC
and staff interface:
* Adds missing spaces before $u and between repeated $u subfields
* Adds a description/label before the output of the subfields
* Adds display to the staff interface (was OPAC only)
* Adds separators between repeated 530 fields:
* OPAC: updates mark-up to use the new CSS driven separators
* Staff interface: adds | with separator class
To test:
* Find or create a records with multiple 530 entries
* Repeat $u with multiple URLs
* Verify display in staff (missing) and OPAC
* Apply patch
* Verify display is improved :D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 10 Jul 2023 12:37:07 +0000 (12:37 +0000)]
Bug 34244: Improve contrast in staff interface main page layered icons
This patch adjusts CSS for the staff interface home page so that there
is better contrast with Font Awesome icons which are layered. The
main advanced search and item search links have two icons layered one on
top of the other, and the "lower" one needs to have better contrast
after the staff interface redesign.
To test, apply the patch and rebuild the staff interface CSS. Log into
the staff interface and confirm that the advanced search and item search
link icons are clear and distinguishable from each other.
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>
Lucas Gass [Fri, 7 Jul 2023 21:58:55 +0000 (21:58 +0000)]
Bug 34233: Move select2 include out of patron-search.inc
1. Apply patch
2. Place a hold and make sure the patron pickup locations are
populating correctly again/
3. Work through the test plan on Bug 28726 to make sure it still works.
4. Enable ArticleRequests, make sure you can still do a patron search
there.
5. Do a patron search from members.tt, make sure that still works.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Confirm that the pencil icon looks correct. Checking all modified
templates is probably too much, but inspecting the patch should show
that only fa-pencil-alt and fa-edit icons are affected.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Blou [Thu, 18 May 2023 20:39:05 +0000 (16:39 -0400)]
Bug 33776: Additional default plugin repo in koha-conf-site.xml.in
Solutions inLibro started formating its repository to be found by Bug
23975. This patch adds it to the default list in the config template.
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>
Bug 34218: Send a record copy to avoid loss of information and display problems
As I wrote in the bug description, I encountered this problem in a particular case,
so I'll explain it in the test plan, but it's certainly likely to be encountered in different ways.
Test plan:
1) Link authorised values with a field on a MARC framework, like a 942a related to branches
2) Set it on a record with no items
3) Activate syspref "AlternateHoldingsField" and set it to field 942a
4) Go to OPAC View and you will see "Holdings: " without any values
5) Apply this patch
6) Do step 4) again and now it's fixed
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 28 Jun 2023 14:48:55 +0000 (14:48 +0000)]
Bug 34137: Requested cancellation date column missing from holds awaiting pickup table config
This patch adds an entry for the requested cancellation date column to
columns_settings.yml so that the column can be configured correctly in
table settings and on the fly.
To test you will need at least one hold with a cancellation request:
- Go to Administration -> Circulation and fine rules -> Default waiting
hold cancellation policy
- Add at least one rule allowing cancellation on waiting items.
- Place a hold for a patron which would fall under the rule you defined.
- Satisfy the hold by checking the item in at the hold's destination
location.
- Cancel the hold, either by logging in to the OPAC as the patron with
the hold, or in the staff client via the holds tab on the patron's
record.
- Apply the patch and restart all services.
- Go to Circulation -> Holds awaiting pickup
- In the "Holds with cancellation requests" tab, confirm that there is a
"Date cancellation requested" column and that it is one of the choices
under the "Columns" button.
- Confirm that the correct columns are shown and hidden when making
selections in the columns menu.
- Go to Administration -> Table settings -> Circulation -> Holds
awaiting pickup.
- Test setting "Is hidden by default" and "Cannot be toggled" for
various columns in the table, including the "Date cancellation
requested" column.
Signed-off-by: Quinn <quinn.morris@citruslibraries.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 26 Jun 2023 17:51:29 +0000 (17:51 +0000)]
Bug 34116: Add page-sectioning to item search in label creator
This patch adds a "page-section" class to search results page seen when
adding items to a label batch. The patch also makes some minor changes
to markup around the search header to make it more consistent with other
search pages.
To test, apply the patch and go to Cataloging -> Label creator.
- Click New -> Label batch
- Without entering anything in the textarea, click the "Add item(s)"
button"
- In the pop-up window, perform a search which will return multiple
results.
- Confirm that everything looks correct and all controls work as they
should.
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>
Jonathan Druart [Thu, 11 May 2023 13:49:08 +0000 (15:49 +0200)]
Bug 33047: Return 404 instead of 500 when biblio does not exist
If the biblionumber or the itemnumber passed in parameter does not
exist we should return 404 instead of exploding with a 500.
Test plan:
Attach cover images to biblio and items
Notice that the UI is working correctly (staff and OPAC)
Hit catalogue/image.pl and opac/opac-image.pl with non-existent
biblionumber and imagenumber
Notice that you now get 404 instead of 500
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Tue, 20 Jun 2023 22:19:01 +0000 (22:19 +0000)]
Bug 34072: Remove float/clear from froms.scss
To test:
- go to /cgi-bin/koha/circ/view_holdsqueue.pl
- inspect something within the page to open the dev tools
- press ctrl-shift-m to show the device toolbar
- use the device toolbar to reduce the resolution of your window
- observe that the search controls are lost at smaller resolutions
- Apply patch, regerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ), clear browser cache
- Try again, you should now see the search controls
- Since this patch changes forms.scss try some other forms in Koha at different screen sizes to make sure they still look correct
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Wed, 21 Jun 2023 19:21:05 +0000 (19:21 +0000)]
Bug 34086: Show location on detail page when there is no permenant location
To test:
1. Have some items without a permanent location.
2. Go to the staff detail page.
3. In the 'Home library' column notice the span .shelvingloc is empty.
4. Add a permanent location, now the shelvingloc is populated
5. Apply patch
6. The location should now show even when there is no permenant location.
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>
Jonathan Druart [Thu, 25 May 2023 09:37:38 +0000 (11:37 +0200)]
Bug 33817: Enforce server-side
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>
Jonathan Druart [Wed, 24 May 2023 11:16:14 +0000 (13:16 +0200)]
Bug 33817: Prevent item bundle that is checked out to be modified
While an item bundle is checked out, we don't want any items to be
added or removed from the bundle.
To test:
* Create a record with LDR Pos. 7 = c
* Add an item for your bundle
* Add one or more existing items from other records to the bundle
* Check out the bundle item
* Verify it appears correctly on the patron account
* Verify you can still add/remove items from the bundle
* Apply patch set
* Verify that the add/remove links are now disabled (greyed out)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Andreas Roussos [Wed, 14 Jun 2023 14:00:15 +0000 (14:00 +0000)]
Bug 34005: Move button toggling code outside JS for loop
When OpacHighlightedWords is set to "Highlight", if you search
in the OPAC and the number of keywords is odd (1, 3, 5, etc.),
then the "Unhighlight" / "Highlight" button will stop working
after a couple of clicks. The relevant commit is 9cb89b46397
from v20.11.00, where the code responsible for toggling the
"Unhighlight" / "Highlight" button was moved inside the JS
for loop that cycles through each term in the array of search
terms. This explains why the toggling only works when an even
number of search terms is being used.
This patch fixes that, by placing the button toggling code in
its original position (outside the JavaScript for loop of the
highlightOn() function).
Test plan:
0) If required, set OpacHighlightedWords to "Highlight".
1) Search for "history" in the OPAC, and view the details page
of one of the results. Click on the "Unhighlight" button a
few times -- after a couple of clicks the button text will
stop toggling and you won't be able to remove the keyword
highlight any more.
2) Apply this patch.
3) Repeat step 1): this time you should be able to toggle the
search keyword highlighting no matter how many times you
click on the "Unhighlight" / "Highlight" button.
4) Repeat step 1), but this time search for "century history":
you should be able to toggle search keyword highlighting in
the details page on and off repeatedly without any problems.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 6 Jul 2023 07:19:11 +0000 (09:19 +0200)]
Bug 34214: Make 'icon' configurable for Toolbar options
Bug 33417 added a generic 'Toolbar' Vue component but always add a 'plus' icon. We should make it configurable.
Test plan:
Regenerate the Vue app: `yarn js:build`
Go to the ERM module and confirm that the toolbar has the '+' icon.
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Alexander Blanchard <alexander.blanchard@ptfs-europe.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 5 Jul 2023 11:47:23 +0000 (13:47 +0200)]
Bug 34201: Restore sorting indicator on ERM tables
DataTable Vue component keep the 'sorting' class on the th which display
the grey up/down icon over the blue icon which indicate the current sort
column
Test plan:
Create several agreements, notice that the list view is having the
sorting indicators (blue arrows) in the top right of the first column.
Sort the columns: asc, desc, combined sort (shift+click) and confirm
that the indicators are correct
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 7 Jul 2023 13:50:52 +0000 (15:50 +0200)]
Bug 33497: Don't get host items if the MARC record is invalid
When don't want to explode with "invalid data" later so we need to
condition the host_item search
call trace was
Koha::Biblio::Metadata::record('Koha::Biblio::Metadata=HASH(0x55ab92e60120)') called at /kohadevbox/koha/Koha/Biblio.pm line 538
Koha::Biblio::_host_itemnumbers('Koha::Biblio=HASH(0x55ab92e4d5c0)') called at /kohadevbox/koha/Koha/Biblio.pm line 498
Koha::Biblio::items('Koha::Biblio=HASH(0x55ab92e4d5c0)', 'HASH(0x55ab934615d8)') called at /kohadevbox/koha/catalogue/detail.pl line 200
This is fixing t/db_dependent/selenium/regressions.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 26 Jun 2023 20:30:56 +0000 (20:30 +0000)]
Bug 34124: Improve in-page navigation on table settings page
This patch adds links to the table settings page so that the user can
jump directly to a particular table within a page section.
The patch also changes the logic of when in-page links are displayed: I
think it makes sense not to show a "Jump to page" link when there is
only one page. The page will show a "Jump to table" link only if there
is only one table.
To test, apply the patch and go to Administration -> Table settings.
- Expand and check multiple sections.
- In the "Administration" section, there are multiple pages.
- Check that the "Jump to page" links work correctly.
- In the "Catalog" section, there is only one page: "detail."
- Check that the "Jump to table" links work correctly.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 6 Apr 2023 10:21:35 +0000 (10:21 +0000)]
Bug 34074: Improve translations of strings on the about page
This patch makes a few simple changes to the about page template to
improve how the translation tool picks up strings to translate.
The patch also corrects a couple of lines where template tags contained
line breaks.
To test, apply the patch and view the about page in the staff interface.
Everything should look correct.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 25 May 2023 13:24:28 +0000 (13:24 +0000)]
Bug 33781: Terminology: Item already issued to other borrower.
This patch updates a couple of error message strings so that they use
the correct terminology and read well.
"This item is on hold for another borrower." becomes "This item is on
hold for another patron."
"Item already issued to other borrower." becomes "This item is already
checked out to another patron."
To test, apply the patch and log into the OPAC as a patron who has items
checked out which are available for renewal.
In another tab, place a hold on one of those items on behalf of a
different patron.
Back in your OPAC tab, click the "Renew" link next to the title which is
now on hold. The page should reload and show the updated message, "This
item is on hold..."
I was not able to trigger the other message.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 7 Jun 2023 08:57:37 +0000 (10:57 +0200)]
Bug 33858: Format dates in offline circ
1 - check item 3999900000001 out to a patron
2 - upload the attached KOC file from bug 33838
3 - navigate to pending offline circ actions
4 - verify that the date is shown unformatted
5 - apply patch
6 - verify that the date is now shown formatted
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Univ Brest <cecile.lambour@univ-brest.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Tue, 27 Jun 2023 12:38:09 +0000 (12:38 +0000)]
Bug 34131: Add 'current' class on correct side menu link
This changes the way we're looking for the correct menu item to set as
active.
If we don't find an exact match for path+params, we attempt to set
'current' to just matching on path.
What this does is it sets the 'Plugins' menu item as active, even if
the url is 'plugins-home.pl?method=report
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Tue, 27 Jun 2023 12:33:16 +0000 (12:33 +0000)]
Bug 34131: Update breadcrumbs and side bar
Update plugins-home accordingly if tool plugins only filter is being
used or not.
Update breadcrumbs for plugins-disabled page
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 29 May 2023 19:39:03 +0000 (19:39 +0000)]
Bug 33790: Fix and add various links to the manual
* Makes the move from tools to cataloguing for the pages linked
from the cataloguing start page
* Adds missing help links to admin and tools pages
* Fix other existing links
To test:
* Best is to look at the patch, you'll see the pages you need
to test on the left.
* Open the page and access the help page through the help link
Note: for a few links you'll need to update the version in the
URL to 23.05 (identity providers is one) as the page doesn't
exist yet in the 22.11 manual
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Tue, 4 Jul 2023 15:26:27 +0000 (15:26 +0000)]
Bug 34107: Switch order for id and name feeding the first column in datatables
Test plan:
* Create 3 agreements, agreement #1 named 'a', agreement #2 named 'c' and agreement #3 named 'b'.
* Go to agreements list, click the Name column header, notice how the agreements get sorted by id #, not by first char in name. Expected order would be abc or cba, but it's acb or bca.
* Apply patch, on k-t-d, run the following if you're not using 'yarn js:watch':
yarn js:build
* Sort the list again on the 'name' column, notice how it now sorts alphabetically as expected, either abc or cba.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle Hall [Tue, 21 Feb 2023 17:45:48 +0000 (12:45 -0500)]
Bug 33029: Add wrapper method for dt_from_string to KohaDates template toolkit plugin
It would be very useful to have direct access to dt_from_string in our templates. This would allow for us to handle custom date and time formatting. It would, for example, allow us to output the month name for a given date via Template Toolkit easily.
Test Plan:
1) Apply this patch
2) In a notice add '[% Use KohaDates %][% KohaDates.datetime_from_string().ymd %]' to the top of a notice
3) Generate that notice for a patron
4) Note today's date in iso format is rendered at the top of the notice
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Tue, 13 Jun 2023 19:41:48 +0000 (19:41 +0000)]
Bug 34002: Check for stage_marc_import permssion
-1 Log in to the staff client as a user who has Acquisition management (acquisition) permissions but not the stage_marc_import (tools) permission.
-2 Go to Acquisitions and Add to a basket.
-3 Select 'From a new file'
-4 You will be logged out as the user does not have percussion to visit that page.
-5 Apply patch
-6 Try again, you will not see the link for 'From a new file' if you don't have the permssion.
-7 Give the user the stage_marc_import, you will now see the link
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>
Pedro Amorim [Wed, 17 May 2023 16:28:23 +0000 (16:28 +0000)]
Bug 33606: Fix settings
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 16 May 2023 12:33:29 +0000 (14:33 +0200)]
Bug 33606: Mark the endpoint as experimental
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 25 Apr 2023 13:56:51 +0000 (15:56 +0200)]
Bug 33606: Add a erm/config route to retrieve the ERM config needed for the Vue app
This could be extended later in bug 32968 to pass the permission of the
logged in user.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Emmi Takkinen [Tue, 23 May 2023 12:29:12 +0000 (15:29 +0300)]
Bug 33667: Allow copying holidays to all libraries when editing
When editing an existing holiday and checking the
"copy to all libraires" checkbox, the other calendars won't
get updates. Allow this by first checking if holiday exists
in target calendar and if not, add it.
To test:
1. Add unique holiday to branch A.
2. Don't check checkbox "Copy to all libraries".
3. Save.
4. Verify the holidays shows on all calendars as
a green box.
5. Edit the holiday, now check "Copy to all libraries"
and save.
=> Verify nothing has changed in other calendars:
only the green box, no holiday in list on the right
6. Edit again, make a change to description,
check checkbox, save.
=> Verify it's still not showing in the other
calendars.
9. Apply this patch.
10. Edit holiday again, check "Copy to all libraries"
and save.
=> Verify holiday is now added to other calendars.
11. Edit again, this time do not copy and save.
=> Verify holiday was edited just in branch A.
12. Again edit, check and save.
=> Verify holiday was edited in all libraries.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Michael Hafen [Thu, 19 Jan 2023 21:56:31 +0000 (14:56 -0700)]
Bug 18855: Don't create duplicate overdue fines if an issue is returned
This includes Jonathan's followup
If cronjobs/fines.pl is running during circulation hours, then an issue may
be considered for having it's overdue fine updated after the issue has been
returned and it's fine status flipped from 'UNRETURNED' to 'RETURNED'. In
this case UpdateFine will create a duplicate fine because it can't find the
specific accountline for the (formerly) overdue issue.
This changes cronjobs/fines.pl to double check the issue before updating
the fine. If the issue has changed between starting the script and updating
the fine, then the script will skip it.
There is a small amount of time between the check and calling UpdateFine
where the issue can be changed and this problem can reoccure. The chance
of that happening is so small that it's probably fine to leave as is.
It is also possible that the fine won't be updated because the issue was
returned. In this case the fine payed by the patron will be lower, but that
is better then the patron finding later that there is more to a fine they
thought they had paid all of.
Test plan (by Caroline):
0. Preliminary settings
0.1. finesMode system preference must be set to Calculate and charge
0.2. There must be a circulation rule that will charge fines (beware of bug 32271)
0.3. In Tools > Calendar, today must not be a holiday
1. Make a lot of overdue checkouts - I used the batch checkout feature, but if your system already has a lot of overdue checkouts, you can skip to step 2
1.1. Enable batch checkouts
1.1.1. Go to Administration > Global system preferences
1.1.2. Search for BatchCheckouts
1.1.3. Set BatchCheckouts to Allow
1.1.4. Select all categories in BatchCheckoutsValidCategories
1.1.5. Click "Save all Circulation preferences"
1.2. Get a list of barcodes
1.2.1. Go to Reports
1.2.2. Click "Create from SQL"
1.2.3. Give the report a name
1.2.4. For the SQL query, enter
SELECT barcode FROM items WHERE onloan IS NULL LIMIT 60;
1.3. Go to a patron's file
1.3.1. Go to Patrons
1.3.2. Click on "Search"
1.3.3. Click on a patron's name
1.4. Do a batch checkout with a due date in the past
1.4.1. Click on the "Batch check out" tab on the left
1.4.2. In "Use a file", click "Choose file"
1.4.3. Choose the file downloaded from the report
1.4.4. In "Hard due date", choose a date in the past
1.4.5. Click "Check out"
1.4.6. Click "Checkout or renew"
2. Find the last issue in the database
2.1. In the database (or in reports), type the following query
SELECT issues.*, items.itype as itemtype, items.homebranch, items.barcode, items.itemlost, items.replacementprice, items.biblionumber FROM issues LEFT JOIN items USING (itemnumber) WHERE date_due < NOW() \G;
2.2. Copy the barcode from the last entry
3. Set up so that you can run fines.pl and check in the item at the same time (or very close to the same time)
3.1. In Koha, click the "Check in" option in the search bar at the top of the page
3.2. Paste the barcode in the search bar BUT DO NOT PRESS ENTER OR THE ARROW RIGHT AWAY
3.3. In a terminal, enter the fines.pl command
./misc/cronjobs/fines.pl
3.4. Execute the command and immediately click on the arrow in the staff interface to check in the item
4. Check the patron's fines
4.1. Click on the patron's name in the check in screen
4.2. Go to the Accounting tab on the left
4.3. In the search box just above the table, paste in the returned item's barcode
--> Without the patch, there are two fines, one Fine (Accruing) and one Fine (Returned) for the same item at the same time
--> With the patch, there is only one fine, Fine (Returned)
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 10 Mar 2023 16:14:50 +0000 (16:14 +0000)]
Bug 33497: Add a filter relationship for branchtransfers
This uses the new relationship from bug 33493 to fetch the transfers for items
To test:
1 - Transfer some items on a bib
2 - View the biblio details page in the staff interface
3 - Apply patch
4 - Confirm the view is the same
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 10 Mar 2023 12:40:30 +0000 (12:40 +0000)]
Bug 33497: Use 'host_items' param to fetch all items at once
This patch adjusts the detail page to fetch items and host items
together, and prefetches transfers and checkouts
To test:
1 - Enable easy analytics
2 - Attach some items to a bib
3 - Checkout an item on the bib
4 - View the details page
5 - Apply patch
6 - View details page, confirm nothing has changed
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 10 Mar 2023 12:37:49 +0000 (12:37 +0000)]
Bug 33496: Add 'host_items' param to Koha::Biblio->items
This patch adds an option to the $biblio->items method to allow
retrieving the items and analytic items for a record. This is intended
to allow fetching a single Items object, and related object, rather than
having to fetch the items, and the host items, and push them together
This is step towards being able to fetch items using API/DataTables directly
To test:
1 - prove -v t/db_dependent/Koha/Biblio.t
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>
Marcel de Rooy [Thu, 1 Jun 2023 13:03:50 +0000 (13:03 +0000)]
Bug 33879: Do no longer overwrite interface in check_cookie_auth
This will only have effect on installations running OPAC and staff
on the same domain name. In that case an OPAC cookie still allows
you to access intranet, and v.v.
Test plan:
Repeat the following steps WITHOUT this patch and WITH it.
Login via OPAC.
Go to staff. Perform an action that logs the interface in e.g. the
statistics table, like a checkout.
Inspect interface in the corresponding table. Observe difference
that this patch makes.
With this patch:
Run t/db_dependent/Auth.t. Should pass again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se> 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>
Marcel de Rooy [Thu, 1 Jun 2023 13:42:03 +0000 (13:42 +0000)]
Bug 33879: Add unit test to show problem
Test plan:
Run t/db_dependent/Auth.t without second patch.
Should fail:
# got: 'opac'
# expected: 'intranet'
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se> 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>
Sam Lau [Tue, 27 Jun 2023 22:10:32 +0000 (22:10 +0000)]
Bug 34101: Limit items types that can be checked out via SIP2
This bug adds the ability to define a list of item types that are blocked from being issued at that SIP account
To test:
1) Apply this patch
2) Visit Administration->Item types and select edit on the music item type
3) Make the rental charge 0 and save changes (this allows for the item to be checked out via SIP)
4) In the terminal, vim /etc/koha/sites/kohadev/SIPconfig.xml
5) Edit the term1 account and add the following *inside* the login section:
blocked_item_types="BK|MU"
You should have something similar to this: <login id ="term1" ........... checked_in_ok="1" blocked_item_types="BK|MU" />
6) Restart SIP (sudo koha-sip --restart <instancename>)
7) Run a checkout query for an item with the item type book. Here is an example you could use:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000011418-m checkout
8) Notice the checkout failed and you are given the screen msg "Item type cannot be checked out at this checkout location"
9) Run a checkout query for an item with the item type music. Here is an example you could use:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000008715 -m checkout
10) Notice the checkout failed and you are given the screen msg "Item type cannot be checked out at this checkout location"
11) vim /etc/koha/sites/kohadev/SIPconfig.xml and delete the BK from the blocked_item
12) Delete the BK from blocked_item_types. It should now look like :
blocked_item_types="MU"
13) Restart SIP (sudo koha-sip --restart <instancename>)
14) Run a checkout query for the item with the item type book
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000011418 -m checkout
15) Checkout succesful
16) Run a checkout query for the item with the item type music
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 --item 39999000008715 -m checkout
17) Still fails (because it is blocked)
18) prove t/db_dependent/SIP/Message.t
19) Congratulate yourself for making it through the long test and sign-off :)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Sam Lau [Tue, 27 Jun 2023 22:54:54 +0000 (22:54 +0000)]
Bug 34101: Unit Tests
prove t/db_dependent/SIP/Message.t
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 25 May 2023 06:03:48 +0000 (06:03 +0000)]
Bug 33404: Fix serverhost and init $page
The array serverhost is not filled. Should be replaced with values
from servers array.
Test plan:
Nothing exciting here. Read the patch.
Note that we will test in the next patch if the hostname is saved
correctly in the import batch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Wed, 24 May 2023 14:57:46 +0000 (14:57 +0000)]
Bug 33404: Z3950SearchAuth: Save in UTF-8 encoding
Test plan:
[1] If you have access to a Z3950 MARC8 auth server, search
for an authority record and import it.
[2] If you have access to a Z3950 UTF8 auth server, search
for an authority record and import it.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
At some point in the patch series we lost the availability api schema.
This patch restores a basic version, but we should work towards a
clearer enum based schema for each of the available blockers, confirms
and warnings.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 4 Jul 2023 06:07:05 +0000 (07:07 +0100)]
Bug 23336: (follow-up) Fix failing test
Our consistency improvement to the AddIssue return in bug 23336
highlighted a bad test assumption. The 'Reinsert the original issue'
line was silently failing and as such the subsequent test lines were
actually resulting in a renewal (which previous to this patchset
returned an empty return that happened to match the empty return of an
issue failure)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 33974: (follow-up) biblionumber column needs special handling
This patch makes a particular use case be handled correctly: i.e. no
context is passed (e.g. 'biblio' explicitly) and the query is done
against the `biblio_id` attribute. This results in the following DBIC
error:
[ERROR] GET /api/v1/biblios: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 394>>
With this patch, this is no longuer the case :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 16 Nov 2022 12:10:16 +0000 (12:10 +0000)]
Bug 34180: Template variable in JavaScript prevents authority MARC preview from displaying
Since template variables cannot be processed by JS, we must use a
template to declare a JS variable which the JS file can used. This patch
corrects this problem in the JS file which handles display of the
authority MARC preview from the authority search results page.
To test, apply the patch and go to Authorities.
- Perform a search which will return multiple authority results.
- Click "Actions -> MARC preview." The preview should display correctly.
- Click "Actions -> MARC preview" on another search result. This preview
should also look correct.
- There should be no JavaScript errors in the browser console.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>