Commit graph

794 commits

Author SHA1 Message Date
Janusz Kaczmarek
e4e54af0e7
Bug 36834: (Bug 29697 follow-up) Koha explodes when trying to open in Labeled MARC view a bibliographic record with an invalid biblionumber
After changes made in catalogue/labeledMARCdetail.pl with the bug 29697
when trying to open the Labeled MARC view with
biblionumber=<invalid_number> (e.g. a deleted biblionumber) Koha explodes
with a message << Can't call method "metadata" on an undefined value at
/kohadevbox/koha/catalogue/labeledMARCdetail.pl line 59 >>

Test plan:
==========
1. Activate the viewLabeledMARC syspref.
2. Try to open a biblio record in Labeled MARC view, giving as a biblionumber
   (in URL) a non-existing biblionumber, e.g. in ktd, with standard ktd
   test data:
   http://your_ktd:8081/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=1234567
   Koha should explode with the message:
   Can't call method "metadata" on an undefined value at
   /kohadevbox/koha/catalogue/labeledMARCdetail.pl line 59
3. Apply the patch; restart_all.
4. Repeat p. 2.  You should get a regular page with the info "The record you
   requested does not exist (1234567)".

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-21 13:39:49 +02:00
cc567cb755
Bug 35994: Show acq_status on catalogue/detail
Test plan:
Based on the described criteria, check a few biblio records.
Look at Acquisitions tab on the intranet detail page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:54 +02:00
8cde45e072
Bug 35558: Do not retrieve the local image if none exists
On the search results we are fetching the thumbnails of the local cover
images using catalogue/image.pl
Which means 1 GET per results on the page.

This patch suggests to have this information beforehand in order to
reduce the number of hits and network traffic?

However the page load will be slightly slower ofc.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 18:06:07 +02:00
Aleisha Amohia
fc8bf12e97
Bug 35728: Add ability to NOT redirect to result when search returns only one record
This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result.

To test:

1) Apply the patch, install database updates, restart services.
2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default.
3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page.
4) Do the same search on the OPAC. Confirm you are redirected to the detail page.
5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect"
6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 18:06:06 +02:00
ac157b7a75
Bug 35581: Koha::Illrequest -> Koha::ILL::Request
Koha/Illrequests.pm -> Koha/ILL/Requests.pm

Merged:
t/db_dependent/Koha/Illrequests.t
t/db_dependent/Illrequests.t

Into:
t/db_dependent/Koha/ILL/Requests.t

ILL classes file structure is, for the most part, around 7 years old and doesn't follow a strict logic. It's so confusing that some test files exist redundantly.

This housekeeping should help future work in regards to ISO18626 to add Koha as a supplying agency instead of just requesting agency, as is now.
It should also help future housekeeping of moving backend related logic out of the Illrequest.pm into Illbackend.pm (now ILL/Request.pm and ILL/Backend.pm as of this patchset).
It should also help in structuring the addition of a master generic form (see bug 35570)

This patchset will require existing backends to be updated to match the new class names and structure, if they invoke them.

Test plan, k-t-d, run tests:
prove t/db_dependent/api/v1/ill_*
prove t/db_dependent/Koha/ILL/*

Test plan, k-t-d, manual:
1) Install FreeForm, enable ILL module, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) You'll have to switch the FreeForm repo to the one compatible with this work, like:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout reorganize_ILL
3) Do some generic ILL testing:
3.1) Create a request
3.2) Add a comment to a request
3.3) Edit a request
3.4) Edit a request's item metadata
3.5) Confirm a request
3.6) List requests
3.7) Filter requests list using left side filters
4) Install a metadata enrichment plugin:
https://github.com/PTFS-Europe/koha-plugin-api-pubmed
4.1) Create an ILL batch and insert a pubmedid like 123
4.2) Add the request and finish batch
5) Verify all of the above works as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:45 +02:00
eae74ed6d9
Bug 36563: Turn into array only if required
Test plan, apply first patch:
1- Visit item search:
   http://localhost:8081/cgi-bin/koha/catalogue/itemsearch.pl
2- Set "Home library" -> "is not" -> "Centerville". Notice you get items
   from Centerville.
3- Apply second patch, repeat step 2, notice you now don't get items
   from Centervile.
4- Test other use cases, like 'is' and 'is not' for multiple choices

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 15:55:54 +02:00
492d7be2cc
Bug 36563: Dirty fix
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 15:55:54 +02:00
a37ebc77b7
Bug 36438: Check object for calling metadata
Resolve: Can't call method "metadata" on an undefined value at catalogue/MARCdetail.pl line 93

The proceeding lines check for $record and respond appropriately.

Test plan:
Call catalogue/MARCdetail.pl with an unexisting biblionumber.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:25:59 +02:00
747f513231
Bug 36511: Some scripts missing a dependency following Bug 24879
These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-10 09:09:50 +02:00
09934c0160
Bug 33568: Restore host records
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:34:58 +02:00
a3fa8f04ac
Bug 33568: Separate holdings
This needs to be well tested!
Sysprefs SeparateHoldings and SeparateHoldingsBranch
As well as the "Lost items in staff interface" that can be defined at
patron's category level.

This patch is simply restoring the previous behaviour but I think we
could do better.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:34:52 +02:00
c5584db6ca
Bug 33568: Display item type image
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:34:41 +02:00
a831f95929
Bug 33568: can_be_edited
Not sure if this is ideal but at least the algorithm complexity is way
better than before!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:34:41 +02:00
f7efa5ae92
Bug 24879: Add check_cookie_auth when missing
This can certainly be improved to adjust the permissions, but at least
they are no longer opened to the world..

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-03 17:05:50 +02:00
0c5b22d3d4
Bug 36336: (bug 34478 follow-up) Fix export from catalogue detail
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 10:35:20 +01:00
98aeda6c54
Bug 36193: cud- treatment for catalogue/stockrotation.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:32 +01:00
3cf72dee6b
Bug 36000: Fix CGI::param warning in catalogue search
Speaks for itself.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:43 +01:00
e2c3348ec8
Bug 34478: Rename action with op - catalogue/search-history
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:38 +01:00
18e808240f
Bug 34478: op =~ ^cud- in pl/pm
This is the result of
  bash op_must_start_with_cud-perl.sh

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:11 +01:00
63183059dd
Bug 34913: Adjust item search
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-26 15:13:44 +01:00
Michał Kula
000d1d414a
Bug 35618: Remove deprecated parameter "type" from showelastic.pl page
This is a follow-up to Bug 33353. Types are gone in ES8 and deprecated
in ES7. Support for ES6 is already dropped in Koha master.

The parameter has to be removed, otherwise an exception is thrown with
ES8 (which is listed as officially supported by Koha now).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2023-12-28 12:16:12 +01:00
5ef8eac364
Bug 26468: Add damaged as a searchable status in item search
This patch removes the Damaged radio box options ( Ignore, yes, no ) in favor a full damage status search option

To test:
1. APPLY PATCH, restart services.
2. Make sure you mark some items as damaged.
3. Go to the item and search and limit by 'Damaged'
4. You should only see your 'Damaged' items.
5. Export the results as a CSV, make sure the CSV is well-formed and accurate.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Perltidied.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:52:46 -03:00
6b7e493448
Bug 29002: Tidy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:30 -03:00
2472214301
Bug 29002: Add bookable state to items
This patch adds a bookable boolean to enable/disable the ability to book
an item ahead of time

Test plan
1) Navigate to the 'Items' tab of a biblio
2) Note the new 'Bookable' option and select at least one item to allow
   bookings to take place
3) Note that without any items selected as 'bookable' one does not have
   the 'Place booking' option or the 'Bookings' tab on the biblio
   details page.
4) Note that when at least one item is bookable, the place booking modal
   now only displays items that are marked as bookable in the item
   selection
5) Sign off

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-03 12:04:11 -03:00
f50d2c7d0e
Bug 35099: (bug 26314 follow-up) Fix detail view for records with invalid MARCXML
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>
2023-10-20 11:02:52 -03:00
a210aa9f63
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>
2023-10-17 14:45:13 -03:00
f14f56a8f4
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>
2023-10-17 14:45:13 -03:00
Pascal Uphaus
af60975fbc
Bug 34441: Fixed Typo "Paramater"
To test:
1. git grep paramater
2. notice 3 files have spelling mistakes
3. apply the patch
4. git grep paramater
5. notice there are no spelling mistakes for that word

Signed-off-by: Thomas Klausner <domm@plix.at>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-01 11:23:21 -03:00
5f43478512
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>
2023-07-10 15:43:14 -03:00
8bd5420312
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>
2023-07-07 12:12:43 -03:00
82d0021cd8
Bug 33497: (follow-up) Adjust relationship name from bug 33493
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-06 10:08:43 -03:00
c662bfe18e
Bug 33497: (follow-up) Remove unecessary scalar
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-06 10:08:42 -03:00
2fe2a0aa03
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>
2023-07-06 10:08:41 -03:00
2cf00f1a49
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>
2023-07-06 10:08:40 -03:00
d735a5804b
Bug 31253: Item search in staff interface should call barcodedecode if the search index is a barcode
We should run any inputted barcode through barcodedecode before passing it to any subroutines.
This was missed during the initial development of bug 26351.

Test Plan:
1) Set itemBarcodeInputFilter to "Remove spaces from"
2) Create an item with the barcode "MYTEST"
3) Browse to the staff side advanced search
4) Run a barcode search for "MY TEST"
5) Note no results are round
6) Apply this patch
7) Restart all the things!
8) Repeat your search
9) Note the item was found!

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: fixed typo in comment
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-03 10:35:03 -03:00
e0c09d230c
Bug 33896: Check whether index is defined before string match
This patch checks that $indexes[$i] is defined before testing whether the string matches to remove the logged warning when searching

Test plan:
1) In the intranet, search the catalog from the top search bar
2) Check plack-intranet-error.log
3) There should be a warning "[WARN] Use of uninitialized value within @indexes in string eq"
4) Apply patch
5) restart_all and then re-try the search
6) The warning should no longer appear

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:03 -03:00
7ec849f393
Bug 33788: Limit the number of old issues rows returned
This patch updates the parameter from 'limit' to 'rows'

To test:
1 - Checkout an item to 5 different people
2 - View item details on items tab of record
3 - Note you see last borrower, and three previous borrowers
4 - Apply patch, restart all
5 - Refresh page
6 - You shoulw now only see last borrower and 2 previous borrowers

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-30 08:27:55 -03:00
d650f8c2a6
Bug 33167: Cleanup staff detail page
This patch begins reduing some of the extra things we are doing in
detail.pl that could easily be handled in the templates - fetching
authorised values and branches etc

It also removes a loop to find items that should be hidden, and instead
uses a searh parameter

The template changes either use item object rather than passed
variables, or utilize plugins to fetch authorised valued

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>
2023-05-12 11:22:45 -03:00
Janusz Kaczmarek
c8012d4104
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)
Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:57 -03:00
3bb7ea2dab
Bug 33569: Fix sort by relevance in catalog search
When ordering catalog search by relevance from advanced search, this is not visible in sort order combobox in staff interface.

This is because sort by relevance is a special case not using sort
order.
This patch add a new method C4::Context->default_catalog_sort_by to use
in both staff interface and OPAC.

Test plan :
1.0) On staff interface
1.1) Define system preferences defaultSortField = 'relevance' and defaultSortOrder = 'descending'
1.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected (with a check icon)
1.3) Perform an advanced search on any term, ie 'perl', with sort by relevance
=> Without patch : you see in sort combobox 'relevance' not selected (no check icon)
=> With patch : you see in sort combobox 'relevance' selected (with a check icon)
2.0) On OPAC
2.1) Define system preferences OPACdefaultSortField = 'relevance' and OPACdefaultSortOrder = 'descending'
2.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected
3.0) Run prove t/Context.t

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>
2023-05-09 11:46:47 -03:00
1344050ab4
Bug 18829: (QA follow-up) Replace forbidden indirect syntax
This pattern is forbidden and was overlooked by QA.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: Tests fail with 'Subroutine "new" called using indirect
syntax...'
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-17 09:39:42 -03:00
a730a76069
Bug 18829: (follow-up) Return 404 when record cannot be loaded
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-14 15:39:44 -03:00
Axel Amghar
372aa0fb8a
Bug 18829: Elasticsearch - Put a better display for the view of ES indexed record
To test:
- apply the patch
- go to global sysPref
- make sure that SearchEngine have "ElasticSearch" as value
- Search whatever you want in Search the catalog and select a record
- Search the link (Ctrl f) : "Elasticsearch Record :" , click on the link
- make sure that the pop-up open and you should see the elasticsearch result in JSON (the pop-up look the same as MARC preview)
- note fields are alphabetized
- from the command line delete the es record:
    curl -XDELETE es:9200/koha_kohadev_biblios/data/5
- click the preview link, it syas record not found
- check the logs - you see the error on missing record

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-14 15:39:43 -03:00
6a2564a369
Bug 33070: Remove use of can_edit_items
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Acquisition/Order.t
3) git grep "can_edit_item("
   should return no results

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-17 09:59:02 -03:00
Michael Hafen
10a8203811
Bug 32585: (bug 32583 follow-up) Fix some variable references
Bug 32583 change the $item variable from a hash to an object.  Trivial patch
to change some hash references to object method calls.

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>
2023-02-27 13:08:08 -03:00
e84d5ccb6c Bug 20256: Use new methods
Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-02 11:59:26 -03:00
Michael Hafen
d88e966ada
Bug 32583: Restore display of only one item in catalogue/moredetails
Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.

Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-01-27 16:21:37 -03:00
e680471414
Bug 32272: Restore last and previous borrowers on moredetail
GetItemsInfo added a card0, card1 and card2 info with the cardnumbers of
the last 3 borrowers.
But 31315 forgot to adjust the code when it has been moved to using
Koha::Items

Test plan:
Check an item in and out to several patrons
Go to the moredetail page (items) and confirm that the "last borrowers"
info is displayed

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-01-18 15:49:10 +00:00
1736fe2335
Bug 31543: Use query string, rather than query, to build link
This patch returns the query string from build_query_compat
Under Zebra, either works for the link, for ES we need the simple string

I expand the test for get_components_query to test both engines

To test:
1.0) Set search engine to Elasticsearch
1.1) Go to Tools > Stage MARC records for import
1.2) Upload the example file
1.3) In the form, choose the format 'MARCXML'
1.4) Click 'Stage for import'
1.5) Click 'Manage staged records'
1.6) Click 'Import this batch into the catalog'

2) Change MaxComponentRecords to 10
3) In the staff interface, search the catalog for 'easy piano'
4) Click on the record 'Easy piano pieces for children'
5) Click on the 'show all component parts' link at the bottom of the Components tab
--> it searches for HASH(...) - returns no results
6) Try the same in OPAC
--> it searches for HASH(...) - returns no results
7) Apply patch and restart all
8) repeat 3-6
9) Results returned!

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>
2022-11-16 15:57:28 -03:00
a1edf06869
Bug 31664: Display pending transfer information on details page
If a transfer is requested, but not sent, we should display this information on biblio details for staff

This patch also removes nocancel parameter that was not used, passes transfer object directly to template

To test
1 - Manually transfer an item
2 - Note the item shows in transit on details page
3 - Remove the datesent to emulate a pending transfer
    UPDATE branchtransfers SET datesent = NULL itemnumber=1;
4 - View details page - no info on transfer
5 - Apply patch
6 - Item shows 'Transit pending'

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>
2022-11-02 19:18:01 -03:00