Commit graph

48476 commits

Author SHA1 Message Date
8e33757a94 Bug 32558: (QA follow-up) Move ForkManager to required
Thx Martin Renvoize for noting this.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e1556b3fc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-08 14:39:16 +00:00
Julian Maurice
a06f4336dc Bug 32819: Fix cataloguing/value_builder/stocknumberam123.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

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>
(cherry picked from commit cc59823fa3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:26:55 +00:00
Julian Maurice
00fa18c944 Bug 32815: Fix cataloguing/value_builder/callnumber.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

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>
(cherry picked from commit aa726e5329)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:26:40 +00:00
565bb08b10 Bug 31665: Set today date for date cataloguing plugin
dateaccessioned.pl must pick today's date when the input gets the focus
on.

Test plan:
Edit an item, or create a new one.
Confirm that today's date is prefilled into the date's input when it's
empty and that it gets the focus on

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Michael Adamyk <madamyk@ckls.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 140493faf7)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:24:38 +00:00
4efed95bd4 Bug 33095: Text is white on white when hovering over pay/writeoff buttons in paycollect
The "Make a payment" page uses unusual navigation for the switch between
the "Pay" and "Write off" views: Bootstrap nav pills. The style on these
is a little muddled because a mix of Bootstrap and custom CSS is at
work.

This patch adds some CSS specific to nav pills and removes some
ambiguous CSS. Two links in the template get a dummy "#" href attribute
to make them work better with default styles.

To test, apply the patch and rebuild the staff interface CSS.

 - Locate a patron who has outstanding charges (lost item charge,
   account renewal fee, overdue fine, etc.).
 - From the patron checkout or detail page, click the "Accounting" tab
   in the left hand sidebar.
 - Click the "Pay" button on one of the oustanding charges.
 - On the "Pay an individual fine" page, confirm that there is a button
   and a link at the top of tab panel: "Pay" and "Write off." The
   "Pay" button should green with white text, the "Write off" button
   should be white with green text.
 - Click the "Write off" button and the styles of the links should be
   reversed.
 - Confirm that the CSS changes do not affect the appearance of the main
   navigation bar at the top of the page.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 98dd32e826)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:19:11 +00:00
13023b2fe8 Bug 32558: (QA follow-up) Leave default to 1, remove extra fork
The default of 1 resembles the old behavior: 1 fork for the job.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3bf4addb24)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:13:05 +00:00
95a5d612f3 Bug 32558: Add ability for background_jobs_worker.pl to process multiple jobs simultaneously up to a limit
Right now background_jobs_worker.pl only processes jobs in serial. It would make sense to handle jobs in parallel up to a user definable limit.

Test Plan:
1) Apply this patch
2) Stop background_jobs_worker.pl
3) Generate some background jobs by editing records, placing holds, etc
4) Watch processes in a new terminal: watch -n 0.1 'ps aux | grep background_jobs_worker.pl'
5) Run background_jobs_worker.pl with parameter -m 3 or some other
   number of max processes
6) Note the multiple forked processes in the ps output

Test notes - also tested the following on KTD:
1. Stop background_jobs_worker.pl
2. Edit /etc/koha/sites/kohadev/koha-conf.xml - set max_processes to 10
3. Generate some background jobs
4. Watch processes in a new terminal: watch -n 0.1 'ps aux | grep background_jobs_worker.pl'
5. Restart all
6. Confirm multiple forked processes in the ps output

Both methods work as expected and generate multiple forked processes
based on the value set for max processes.

Signed-off-by: emlam <emily.lamancusa@montgomerycountymd.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 311d68815f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:12:49 +00:00
857feb63e0 Bug 32472: Fix wrong POD for bookseller->subscriptions
You should not call this in list context anymore after
bug 29844.

Test plan:
Check pod of Bookseller.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 836f0c77e3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:11:59 +00:00
1453472e93 Bug 32678: Add new line in authorized values tests in search_for_data_inconsistencies.pl
In search_for_data_inconsistencies.pl, the test for authorized values is a list in one line :
	* The Framework *VR* is using the authorised value's category *LOC*, but the following items.location do not have a value defined ({itemnumber => value }):
 {94 => AV} {95 => AV} {96 => AV} {97 => AV} {98 => AV} {99 => AV} {100 => AV} {101 => AV} {102 => AV} {103 => AV}

It would be more clear with new lines, especially for scripts (grep, awk ...) :
	* The Framework *VR* is using the authorised value's category *LOC*, but the following items.location do not have a value defined ({itemnumber => value }):
 {94 => AV}
 {95 => AV}
 {96 => AV}
 {97 => AV}
 {98 => AV}
 {99 => AV}
 {100 => AV}
 {101 => AV}
 {102 => AV}
 {103 => AV}

Test plan :
1) In koha-testing-docker
2) Delete in authorized values LOC the value AV
3) Run misc/maintenance/search_for_data_inconsistencies.pl
=> You see the new line in result

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>
(cherry picked from commit 45323886ae)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:11:16 +00:00
05d5b029f2 Bug 32811: Remove useless lines for indexer.log
See also bug 32612.
The output option includes the stdout.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d27d39e4b8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:10:34 +00:00
47ad3dd1b2 Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate
When a record has multiple ISBNs the database stores them seperated by a
pipe

Zebra interprets a string like "isbn:1600213510 | 9781600213519" as an 'OR' search, but for
Elasticsearch we need to explicitly send "OR" - and Zebra support this
as well

To test:
1 - Make sure you are using Elasticsearch
2 - Cataloging->Add a new record from Z3950
3 - Choose target: LOC
4 - Search for: Control number: 14455023
5 - Import and save
6 - Search for the record again
7 - Import and save - duplicate check isn't been triggered
8 - Apply patch
9 - restart_all
10 - repeat 2-7
11 - this time you should get a duplicate notification
12 - Sitch SearchEngine syspref to 'Zebra'
13 - repeat 2-7
14 - Ensure you still get duplicate notification

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2dafd6f749)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:09:01 +00:00
99454c3885 Bug 33044: Return job id if there is no connection to rabbit
This patch simply ensures we return the job id even if we couldn't send
the job to rabbit.

To test:
1 - In KTD: sudo service rabbitmq-server stop
2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev
3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer
4 - Run t/db_dependent/Koha/BackgroundJob.t and notice that it fails.
5 - Apply patch
6 - Restart all
7 - Enqueue a new batch item modification
8 - Confirm the link works and has the correct id
9 - Run t/db_dependent/Koha/BackgroundJob.t; it should pass now.

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>
(cherry picked from commit b93b6f3dde)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:08:25 +00:00
7282cd87eb Bug 32674: Fix placing a hold at the OPAC for serials
Placing a hold at the OPAC explodes with a 500 when the record is a
serial
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /usr/share/koha/lib/Koha/Objects.pm line 394

Test plan:
* Create a serial subscription for an existing bibliographic record
* Place a hold on this record at the OPAC

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f25893a2ba)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:07:47 +00:00
780d51e75e Bug 33145: Fix ERM swagger specs
This patch adds the missing 'Provider name' parameter definition to the
various ERM paths that were missing it.

Test plan
1) Run:
   docker run --rm -v $PWD/api/v1/swagger:/swagger \
          jeanberu/swagger-cli \
          swagger-cli validate swagger/swagger.yaml
=> FAIL: The spec is not valid!
2) Apply this patch
3) Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tcohen edited the test plan because of the failure to install
swagger-cli cleanly
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79f7f44aa1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-07 18:07:06 +00:00
fce06269e1 Bug 32728: Fix warning
There is a couple of wrong things from the previous patch:

* There is a warning in the console
Firefox
[Vue Router warn]: Unexpected error when starting the router: TypeError: document.getElementById(...) is null
Chrome
[Vue Router warn]: Unexpected error when starting the router: TypeError: Cannot read properties of null (reading 'click')
That's because the tabs are not initialized yet, and so the tab is not
correctly selected when the app is loaded.

* "Search titles" is selected when on packages, and "Search packages" is
selected when on titles

This patch remove the warning and fix the second problem.

However the tab is still wrong when the app is loaded. Will see later if
that can be fixed, but it's not trivial at first glance.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 87e717406b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 13:39:02 +00:00
Hammat Wele
cabafa5311 Bug 31221: Buttons overflow in OPAC search results in mobile view
To reproduce:
1- Have at least 10 record of the same type that can be viewed from OPAC
2- Go to administration > system preferences > OPACnumSearchResults and set it to 1
3- Go to the OPAC and search for the type from step 1
4- Notice top and bottom page selections are numbered from 1 to 10 + Next >> + Last >>
5- Inspect the webpage and switch to mobile view
6- Reduce display width and notice the buttons (of step 4) on the right are overflowing the screen
7- Apply the patch
8- compile the .scss file 'yarn build --view opac'
9- Clear your navigator caches
10- repeat step 3,5 and 6
11- Notice the buttons (of step 4) are no more overflowing the screen

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

Bug 31221: (fix) Adding "flex-wrap: wrap" to the pagination links in opac.scss

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 834e3c8e0e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 13:36:20 +00:00
d26d371af9 Bug 32663: Limit streetnumber to 10 characters in OPAC
This change harmonizes the patron streetnumber input between
the staff interface and the OPAC, so that you can only enter 10
characters into the streetnumber for the OPAC. Without this change,
a fatal error will be thrown trying to save the too long data.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-memberentry.pl
2. Note that you can only enter 10 characters into the "Street number"
field as a self-registration patron
3. Log into Koha
4. Go to http://localhost:8080/cgi-bin/koha/opac-memberentry.pl
5. Note that you can only enter 10 characters into the "Street number"
field when editing logged in patron details too
6. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=S
7. Note that you can only enter 10 characters into the "Street number"
field as a staff member

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e19a88f02)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:22:54 +00:00
89ab353810 Bug 32983: Use REST API route to retrieve authorised values
Make one API call for all AV categories+values instead of one API call per AV category required

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09dabdad95)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:22:35 +00:00
ac3ec38f5f Bug 32983: ERM - Retrieve AVs from an endpoint
Bug 32981 let us retrieve the authorised values from a REST API route,
instead of injecting them from the template. Let us that for the ERM module!

Test plan:
You will notice a "Loading" screen when refreshing the ERM module
Then you should not notice any other UI changes. Dropdown list should be
populated like before this patch.

Some technical notes:
I am expecting this to be slower than before, but it feels better to use
a REST API route to retrieve the AV
Future improvement will be to lazy load the AVs, to speed up the landing
page. However it needs more changes, and this gets big enough.
I would like to see a follow-up that move the code from ERM/Main.vue to
the authorised value store (I've failed at that), but that should
certainly be done after the lazy loading is implemented anyway)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d8c6a36b8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:22:12 +00:00
4eee0de8c7 Bug 32997: (QA follow-up) values => authorised_values
This patch renames that for consistency, and also makes use of the
->authorised_values accessor on the category.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d31e83f37)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:11:41 +00:00
88aa0bb115 Bug 32997: Add tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 109be55501)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:11:20 +00:00
c6b76198db Bug 32997: Add REST API endpoint to list authorised values for multiple given categories
This patch adds /api/v1/authorised_value_categories endpoint that
retrieves authorised value categories for the given names and their
authorised values if x-koha-embed: authorised_values is also given.

To test:
Apply patch
curl -u koha:koha --request GET \"http://localhost:8081/api/v1/authorised_value_categories?q=%7B%22me.category_name%22%3A%5B%22LOC%22%2C%22YES_NO%22%5D%7D\" --header \"x-koha-embed:authorised_values\"

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bbc0e8fe32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:10:59 +00:00
f13c84ba77 Bug 32981: (QA follow-up) Fix POD and file permissions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 23ab22b0da)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:10:13 +00:00
ca6c984816 Bug 32981: Add endpoint to get AV for given category
For, at least, the ERM module we would like to retrieve the authorised
values for a given category to build a dropdown list with the different options.

It has been decided on bug 17390 to use
GET /authorised_value_categories/:authorised_value_category_id/values

Test plan:
curl -v -s -u koha:koha --request GET  http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/LOC/values
Should display the list of LOC

curl -v -s -u koha:koha --request GET  http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/xLOCx/values
Should return a 404

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e5c75549f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:09:48 +00:00
Caroline Cyr La Rose
4d5bd7aca5 Bug 32803: EnableItemGroups and EnableItemGroupHolds options are wrong
This patch corrects the options for the EnableItemGroups and
EnableItemGroupHolds system preferences.

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds system preferences
   1.1. Go to Administration > Global system preferences
   1.2. Search for EnableItemGroup (no s, to get both)
   1.3. Enable both EnableItemGroups and EnableItemGroupHolds
   1.4. Click Save all Circulation preferences
2. Go to About Koha > System information
   --> There is a warning message
3. Go to a bibliographic record with at least one item
   --> The item group tab is displayed
4. Create an item group
   4.1. Click New item group
   4.2. Enter a name
   4.3. Click Submit
   4.4. In the Holdings tab, select the item
   4.5. Click on Add/move to item group
   4.6. Click Set item group
5. Place a hold on the item group
   5.1. Click Place hold
   5.2. Search for a patron
   5.3. In the 'Hold next available item from an item group' section, select the item group
   5.4. Click Place hold
   --> Placing a hold is possible
6. Disable EnableItemGroups and EnableItemGroupHolds system preferences
   1.1. Go to Administration > Global system preferences
   1.2. Search for EnableItemGroup (no s, to get both)
   1.3. Disable both EnableItemGroups and EnableItemGroupHolds
   1.4. Click Save all Circulation preferences
7. Go to About Koha > System information
   --> There is a warning message
8. Apply patch
9. Redo steps 1 and 2
   --> There is no warning
10. Redo step 3
   --> The item group tab is displayed
11. Redo steps 4 and 5
   --> Placing a hold is possible
12. Redo steps 6 and 7
   --> There is no warning

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

JD Amended commit message: * Commit title does not start with 'Bug XXXXX: '
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fe872b7920)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:09:24 +00:00
c915818caa Bug 32576: Replace panels with page-sections
This patch replaces the bootstrap panels with the more modern koha
page-section cards layout.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 490b922367)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:07:39 +00:00
8d7d054ce9 Bug 32576: Move page-section outside of table include
This patch drops the superflous div from the ill-list-table include and
instead opts to wrap calls to it with a more appropriately positioned
div instead.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit abda545a78)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:07:01 +00:00
c8e192815c Bug 33101: Restore OPAC basket detailed view
The OPAC basket detailed view display is broken since since bug 32445.
This patch restore the usual operation.

TO TEST:

1. Add a biblio recor into the OPAC basket.
2. Click on the cart to display its content.
3. Click on More details
   => error 500
4. Apply the patch, and repeat 3.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2737836e86)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:04:57 +00:00
9e4bf2945d Bug 32639: Send opac-search.osdx without doing an empty search
This patch sends out opac-search.osdx without running the entirety
of opac-search.pl without any search query.

This prevents unnecessary computations and warnings from appearing
in the logs.

Test plan:
1. Apply patch
2. Go to
http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription
3. Note that no errors appear in
/var/log/koha/kohadev/plack-opac-error.log
4. Verify that opac-search.pl still works as expected when
doing a search via the web UI

Signed-off-by: David Nind <david@davidnind.com>

JD Amended patch: remove ref to bug number, we use git!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0cf434b7a2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:04:24 +00:00
a076542019 Bug 33055: (bug 32624 follow-up) Don't send a screen message if not blocked
To test:
0 - Apply first patch
1 - prove -v t/db_dependent/SIP/Patron.t
2 - It fails
3 - Apply second patch
4 - prove -v t/db_dependent/SIP/Patron.t
5 - It passes!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c5c35aa32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:03:36 +00:00
06194137ec Bug 33055: (bug 32624 follow-up) Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0324aed470)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-03 12:03:11 +00:00
e562c3c708
Bug 32507: (follow-up) Change parameter name to avoid collisions
The variable name "active" is very likely to already be set for other
reasons, so changing the parameter name to "bc_active" to avoid
problems.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf05e0898b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-02 12:04:01 +00:00
9af12d387c
Bug 32507: Use template wrapper to build breadcrumb navigation
This patch lays the groundwork for updating the way we build breadcrumb
navigation on each page, and implements it on the cities administration
page as a proof of concept.

The page creates two blocks, 'breadcrumbs' and 'breadcrumb_item'

'breadcrumbs' builds the outer structure of the menu, currently:

    <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
        <ol class="breadcrumb">

It automatically adds the "Home" link which appears on all pages.

The 'breadcrumb_item' block builds the list item which contains the
individual link.

To test, apply the patch and go to Administration -> Cities & towns. On
each variation of the page, check the breadcrumbs menu:

 - On the initial summary view it should be:
   Home -> Administration -> Cities
 - Click "New city" and the menu should be:
   Home -> Administration -> Cities -> New city
 - When you edit a city:
   Home -> Administration -> Cities -> Modify city
 - When you delete a city:
   Home -> Administration -> Cities -> Confirm deletion of city

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>
(cherry picked from commit 8a01c095b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-02 12:03:30 +00:00
505e5372b2
Bug 32665: Fix typo in template condition
This patch fixes a typo in a template condition so that
the about.pl warning about RequireChoosingExistingAuthority is
shown when it's the only warning to display

Test plan:
0. Don't apply the patch yet
1. Go to http://localhost:8081/cgi-bin/koha/about.pl
2. Note that "No warnings" is shown
3. Apply the patch
4. Go to http://localhost:8081/cgi-bin/koha/about.pl
5. Note that there is a heading for "Warnings regarding the
system configuration" and a specific warning about the
"RequireChoosingExistingAuthority" system preference

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>
(cherry picked from commit c88f1ba9dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-02 11:38:50 +00:00
c0c8009fd9 Bug 32799: DBRev 22.12.00.009
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d6f4edca00)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:41:18 +00:00
Katrin Fischer
b4996bbc11 Bug 32799: Rename ILLSTATUS authorised value category to ILL_STATUS_ALIAS
To test:
1) Activate the IllModule system preference
2) Install a backend (BLDSS or FreeForm) following the wiki instructions:
3) Configure some authorised values for ILLSTATUS
4) Apply patch
5) Run database update
6) Verify your configured values have been updated to ILL_STATUS_ALIAS
7) Add another ILL_STATUS_ALIAS: there should now be an explanation in the
   categories list
8) Go to the ILL module and add a new request
9) Edit the request, verify that your status alias show in the status list
10) Set one of your status and save
11) Verify that the ILL requests list search filters show your status alias
12) Manage the request again and verify that the ILL request log shows the
    status descriptions correctly
13) Verify the description of the ILLHiddenRequestStatuses has
    been updated with the new authorised value category

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 412c026101)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:38:27 +00:00
a0a3b9809b Bug 32967: DBRev 22.12.00.007
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3de0da88a0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:36:06 +00:00
Aleisha Amohia
2390d252b9 Bug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices
This patch fixes two recalls notices which are referencing old column
names, so they leave empty fields when the notices are generated.

To test:

1) Apply database updates and restart services
2) Go to Tools -> Notices
3) Find the RECALL_REQUESTER_DET notice, open the Print tab
4) Confirm there are no references to recalls.waitingdate or
recalls.recallnotes. Confirm the reference is fixed to
recalls.waiting_date and recalls.notes
5) Find the PICKUP_RECALLED_ITEM notice, open the Email tab
6) Confirm there are no references to recalls.branchcode or
recalls.expirationdate. Confirm the reference is fixed to
recalls.pickup_library_id and recalls.expiration_date

Sponsored-by: Catalyst IT

https://bugs.koha-community.org/show_bug.cgi?id=32697
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f7e05c3263)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:33:26 +00:00
7fb699f46d Bug 30869: Add the ability to delete stock rotation rotas
'At the moment, it isn't possible to delete any rotas that have 0 items linked to it. The only way to do it is in MySQL - it would be good if this was possible from the staff client.'
This patch implements this, and also implements the possibility of deleting a rota with items linked to it, providing a warning that the item(s) currently in rotation will remain at its/their current stage library.

Test plan:
1) Enable StockRotation system preference
2) Cataloging > Stock rotation > New rota
3) Enter Name, save
4) Verify 'Delete' button shows on the right
5) Click 'Delete' -> Confirm 'Yes'
6) Repeat steps 1-3 and click 'Manage'->'Stages'
7) Add a new stage, enter Library and Duration, click 'Save'
8) Return to rotas, click 'Manage'->'Items'
9) Add item, enter barcode, click 'Save' (optional: add more than 1 item)
10) Optional: Click 'Move to next stage' and verify that item is now in different branch
11) Click 'return to rotas' and press 'Delete'
12) Verify the warning now shows, because items are attached, with the attached items count
13) Click 'Delete' -> Deletion is successful
14) If you did step 10, verify the item is still in the branch that it was at the time the rota was deleted

Sponsored-by: PTFS-Europe

Signed-off-by: David Nind <david@davidnind.com>

JD Amended patch:
* Fix QA failures
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 150)
                forbidden pattern: tab char (line 151)
* Adjust commit message to describe what the patch does
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf06f05ec0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:32:49 +00:00
dfc61d419b Bug 22428: DBRev 22.12.00.006
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5926e7246b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:32:30 +00:00
9f9b12e859 Bug 22428: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 337ac71167)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:27:40 +00:00
e2b439fbb0 Bug 22428: Change datatype of field_value to text
This patch changes the datatype of the field_value column in
marc_modification_template_actions to "text". This is to stop text
strings longer than 100 characters from being chopped short and allow
longer strings up to 65,000 characters.

Test plan:
1) Follow the same steps outlined by Caroline in the problem statement
2) Apply patch
3) Follow the steps again and this time the text should upload with no
   problem

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cce48fc7d4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:27:23 +00:00
a079ac0312 Bug 33004: DBRev 22.12.00.008
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit da6d7171e3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 14:20:26 +00:00
Katrin Fischer
70dc8a3ebe Bug 33004: Add VENDOR_TYPE to default authorised value categories
To test:
* Go to administration > authorised values
* Verify that VENDOR_TYPE doesn't show in the list
* Apply patch
* Run database update
* Verify that VENDOR_TYPE does now appear and has a nice
  description (not added by this patch)
* Bonus: start over and run the web installer, VENDOR_TYPE
  should now be already there

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>
(cherry picked from commit 0f3a82f09c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 14:15:04 +00:00
027ef7444a Revert "Bug 32594: (QA follow-up) Adjust tests"
This reverts commit b7b8179380.
2023-03-01 11:10:27 +00:00
b7b8179380 Bug 32594: (QA follow-up) Adjust tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 66e9bc71e4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-01 09:53:40 +00:00
Katrin Fischer
6613a8914a Bug 32159: Fix heading hierarchy on uncertain prices page
This makes sure we don't have 2 level 1 headings on the same page.

To test:
* Create a new order for a basket in the acq module,
  make sure the uncertain price checkbox is checked bevor saving
* Go to uncertain prices using the link in the toolbar on the
  basket summary page
* Verify that there are 2 almost identical h1 headings and a "/ Fax:"
  reference at the top of the page
* Apply patch
* Verify that we now have one level 1 heading and a level 2 heading
  for each section. The fax reference is also gone.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 83bde3e650)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-01 09:53:12 +00:00
Michael Hafen
695b51c054 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>
(cherry picked from commit 10a8203811)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-01 09:52:50 +00:00
Aleisha Amohia
75621c4d99 Bug 32904: Check if responseJSON is defined for dataTable error
This patch checks if responseJSON is defined before checking if
responseJSON.errors is defined.

Sponsored-by: Education Services Australia SCIS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcc1c6c3fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-01 09:50:39 +00:00
Katrin Fischer
db7de6b9e8 Bug 31056: Restore closeandprint function on basketgroups page
Bug 13614 removed the basketgroup.js asset from the basket group
page. This file includes the closeandprint function used for
closing and printing the PDF from the open basket groups tab.
The patch restores just this function directly in the file where
it's needed as this is the only spot and it's only a few lines.
The rest of basketgroup.js appears unused.

To test:
* Create a basket with one or more oder lines
* Close the basket and check the checkbox to add it to a
  basket group
* Reopen the basket group from the basket groups page
* Verify the close and print only leads to a JS error and
  nothing happens
* Apply patch
* Repeat and verify you can now 'Close and print' from the
  open basket group tab
* Verify all other buttons work as expected as well

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

JD Amended patch: fix indentation and spacing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2314dc0ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-01 09:50:19 +00:00