]> git.koha-community.org Git - koha.git/log
koha.git
19 months agoBug 33000: (follow-up) Add spans for translatability
Owen Leonard [Thu, 23 Feb 2023 22:29:16 +0000 (22:29 +0000)]
Bug 33000: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

This follow-up includes a change to admin/cities.tt as well.

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>
(cherry picked from commit 95891fe1e80363fb11cbd9a37f6fa5243f37ead9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
19 months agoBug 33000: Use template wrapper for breadcrumbs: Acquisitions part 1
Owen Leonard [Thu, 5 Jan 2023 18:40:06 +0000 (18:40 +0000)]
Bug 33000: Use template wrapper for breadcrumbs: Acquisitions part 1

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions home
  - Vendor search results
  - Basket details
    - Cancel order
    - Create EDIFACT order
    - Basket edit
    - Basket deletion confirmation
    - Add to basket
      - From a staged MARC file
      - From existing orders (copy)
  - Basket groups (create, edit)
  - EDIFACT messages

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>
(cherry picked from commit 3e3b27f87dc5c7be117f117113a75de0dad7fef6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
19 months agoBug 33068: Use template wrapper for breadcrumbs: Administration part 3
Owen Leonard [Fri, 6 Jan 2023 16:09:42 +0000 (16:09 +0000)]
Bug 33068: Use template wrapper for breadcrumbs: Administration part 3

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
 - Circulation and fine rules -> Clone rules
 - Table settings
 - Credit types ->
   - New credit type
   - Edit credit type
 - Curbside pickup
 - Currencies and exchange rates ->
   - New currency
   - Edit currency
   - Confirm deletion
 - Debit types ->
   - New debt type
   - Edit debit type
 - Desks ->
   - New desk
   - Edit desk
   - Confirm deletion
 - Did you mean?
 - EDI accounts
   - New account
   - Edit account
   - Confirm deletion

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>
(cherry picked from commit dbb3c88cfcbbcdf9bd2d72139948845571229fd5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
19 months agoBug 33155: Fix category and library filters in patron search header
Jonathan Druart [Tue, 7 Mar 2023 12:55:19 +0000 (13:55 +0100)]
Bug 33155: Fix category and library filters in patron search header

Caused by
  commit f1925cf89dbc1039fc48abfabad1472289387148
  Bug 7380: Rename filter to avoid confusion

     [% IF categorycode %]
-        $("#categorycode_filter").val("[% categorycode %]");
+        $("#categorycode_filter").val("[% categorycode_filter %]");
     [% END %]
     [% IF branchcode %]
-        $("#branchcode_filter").val("[% branchcode %]");
+        $("#branchcode_filter").val("[% branchcode_filter %]");
     [% END %]

Forgot to rename the vars in the IF statements

Test plan:
Go to the Koha mainpage
Click "Search patrons" in the headers
Open the filters
Select something for library and category, search
=> The values must be picked for the patron search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79e4aabc31c85fc32f2f09599818fd7b4dff117f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
19 months agoBug 32558: (QA follow-up) Move ForkManager to required
Marcel de Rooy [Tue, 7 Mar 2023 12:12:48 +0000 (12:12 +0000)]
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 8e1556b3fcede038d3a7c38d33d884522d70fc7d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32819: Fix cataloguing/value_builder/stocknumberam123.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
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 cc59823fa3cc25f79a4b247d6c66a07dfedbf045)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32815: Fix cataloguing/value_builder/callnumber.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
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 aa726e5329cda74f78e97c6ce379cfba93ea26f4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 31665: Set today date for date cataloguing plugin
Jonathan Druart [Wed, 1 Feb 2023 09:47:27 +0000 (10:47 +0100)]
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 140493faf71b2545a41032b1d0db5d11f1db5f65)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 33095: Text is white on white when hovering over pay/writeoff buttons in paycollect
Owen Leonard [Wed, 1 Mar 2023 19:03:33 +0000 (19:03 +0000)]
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 98dd32e82631d8623b0947a23e11b4c22b10b822)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32558: (QA follow-up) Leave default to 1, remove extra fork
Marcel de Rooy [Fri, 17 Feb 2023 07:25:08 +0000 (07:25 +0000)]
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 3bf4addb2497704877a8caa0d3456afc9b1aa0c8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32558: Add ability for background_jobs_worker.pl to process multiple jobs simulta...
Kyle M Hall [Tue, 3 Jan 2023 15:35:42 +0000 (15:35 +0000)]
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 311d68815fa69d66d948c023651c07271a0248c9)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32472: Fix wrong POD for bookseller->subscriptions
Marcel de Rooy [Thu, 15 Dec 2022 10:04:14 +0000 (10:04 +0000)]
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 836f0c77e38c945dd3b221f3d9bd72f408680b2e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32678: Add new line in authorized values tests in search_for_data_inconsistencies.pl
Fridolin Somers [Thu, 19 Jan 2023 07:12:48 +0000 (21:12 -1000)]
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 45323886ae4b73007e2ae2f822ae70a0f46435d0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32811: Remove useless lines for indexer.log
Marcel de Rooy [Fri, 3 Feb 2023 09:55:27 +0000 (09:55 +0000)]
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 d27d39e4b8acccfbed7296106eadd1499d63e35b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 31471: Send multiple ISBN with 'OR' for FindDuplicate
Nick Clemens [Fri, 24 Feb 2023 14:04:34 +0000 (14:04 +0000)]
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 2dafd6f7491f64ad8179d00cbcdb3822be57f11f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 33044: Return job id if there is no connection to rabbit
Nick Clemens [Wed, 22 Feb 2023 18:13:35 +0000 (18:13 +0000)]
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 b93b6f3ddebdbcb53b435c1b9d7e64e235688d2f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32674: Fix placing a hold at the OPAC for serials
Jonathan Druart [Tue, 28 Feb 2023 08:13:19 +0000 (09:13 +0100)]
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 f25893a2ba395e833c135fb590d4354c5ab6763f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 33145: Fix ERM swagger specs
Martin Renvoize [Mon, 6 Mar 2023 10:02:04 +0000 (10:02 +0000)]
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 79f7f44aa1c534ab30145ff3e0d95f30e6e04a67)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32728: Fix warning
Jonathan Druart [Tue, 28 Feb 2023 09:59:53 +0000 (10:59 +0100)]
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 87e717406bdbd48340115fe7522a7184359116bb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31221: Buttons overflow in OPAC search results in mobile view
Hammat Wele [Wed, 14 Dec 2022 12:39:54 +0000 (12:39 +0000)]
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 834e3c8e0ea4ad82ab4825e8994164cc85b2836f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32663: Limit streetnumber to 10 characters in OPAC
David Cook [Wed, 18 Jan 2023 01:28:38 +0000 (01:28 +0000)]
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 9e19a88f021c1a53ef3324193b88c55b48e19e87)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32983: Use REST API route to retrieve authorised values
Pedro Amorim [Thu, 23 Feb 2023 12:28:18 +0000 (12:28 +0000)]
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 09dabdad95473cdd0949cc76cbc5372abd9dcbae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32983: ERM - Retrieve AVs from an endpoint
Jonathan Druart [Thu, 16 Feb 2023 13:38:46 +0000 (14:38 +0100)]
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 5d8c6a36b8647aa33945e4e6e9b28e511cd433bb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32997: (QA follow-up) values => authorised_values
Tomas Cohen Arazi [Thu, 2 Mar 2023 14:45:12 +0000 (11:45 -0300)]
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 2d31e83f37d325754ba468f5c05033ec76843988)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32997: Add tests
Pedro Amorim [Thu, 23 Feb 2023 14:37:20 +0000 (14:37 +0000)]
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 109be55501e8879228366b056af85720c3a29bc7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32997: Add REST API endpoint to list authorised values for multiple given categories
Pedro Amorim [Mon, 20 Feb 2023 16:17:41 +0000 (16:17 +0000)]
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 bbc0e8fe32cb5e1b5bf752732428ce2f9ebbb840)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32981: (QA follow-up) Fix POD and file permissions
Nick Clemens [Fri, 24 Feb 2023 14:47:44 +0000 (14:47 +0000)]
Bug 32981: (QA follow-up) Fix POD and file permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 23ab22b0da6b2e16feca3b39dd570503c377cafd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32981: Add endpoint to get AV for given category
Jonathan Druart [Thu, 16 Feb 2023 10:45:20 +0000 (11:45 +0100)]
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 7e5c75549fe66eb16eb365ea3a79ee8d7fb6946b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32803: EnableItemGroups and EnableItemGroupHolds options are wrong
Caroline Cyr La Rose [Thu, 2 Feb 2023 17:45:04 +0000 (12:45 -0500)]
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 fe872b792037ee2f8cce0d25f95c1e4f739ffe49)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32576: Replace panels with page-sections
Martin Renvoize [Fri, 6 Jan 2023 15:33:29 +0000 (15:33 +0000)]
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 490b9223672914d253c1a5dadc51cab1d941ec39)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32576: Move page-section outside of table include
Martin Renvoize [Fri, 6 Jan 2023 15:17:06 +0000 (15:17 +0000)]
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 abda545a785005f1b1be65caea7bf23a8dfbae04)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33101: Restore OPAC basket detailed view
Frédéric Demians [Wed, 1 Mar 2023 08:22:22 +0000 (09:22 +0100)]
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 2737836e86123155f65cbb358aded2525dcf1add)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32639: Send opac-search.osdx without doing an empty search
David Cook [Mon, 16 Jan 2023 06:03:13 +0000 (06:03 +0000)]
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 0cf434b7a2654c17e60af1969faf99ca77ef42dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33055: (bug 32624 follow-up) Don't send a screen message if not blocked
Nick Clemens [Thu, 23 Feb 2023 15:33:00 +0000 (15:33 +0000)]
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 6c5c35aa32a7ff61e46d9198dee55a0239f55f96)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33055: (bug 32624 follow-up) Unit tests
Nick Clemens [Thu, 23 Feb 2023 15:32:21 +0000 (15:32 +0000)]
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 0324aed47056ab17de84849f2178d8a078c53468)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32507: (follow-up) Change parameter name to avoid collisions
Owen Leonard [Thu, 5 Jan 2023 18:44:47 +0000 (18:44 +0000)]
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 bf05e0898b17f21e024dfa3df00452bdc59f29f7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32507: Use template wrapper to build breadcrumb navigation
Owen Leonard [Tue, 20 Dec 2022 16:20:51 +0000 (16:20 +0000)]
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 8a01c095b7ec3ef6947148ad3b7771fd01603bc8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32665: Fix typo in template condition
David Cook [Wed, 18 Jan 2023 04:38:36 +0000 (04:38 +0000)]
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 c88f1ba9ddef64881c808c1740a9b8fedc660d25)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32799: DBRev 22.12.00.009
Tomas Cohen Arazi [Mon, 27 Feb 2023 16:01:30 +0000 (13:01 -0300)]
Bug 32799: DBRev 22.12.00.009

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d6f4edca00d995301484da0af1d0efd4903181c2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32799: Rename ILLSTATUS authorised value category to ILL_STATUS_ALIAS
Katrin Fischer [Thu, 9 Feb 2023 21:08:53 +0000 (21:08 +0000)]
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 412c0261014dabc0aada39287dc1b7d801c93ad0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32967: DBRev 22.12.00.007
Tomas Cohen Arazi [Fri, 24 Feb 2023 20:28:41 +0000 (17:28 -0300)]
Bug 32967: DBRev 22.12.00.007

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3de0da88a0a2555d2c77b20d11e5f0d637cb6f18)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices
Aleisha Amohia [Wed, 15 Feb 2023 02:15:15 +0000 (15:15 +1300)]
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 f7e05c32633d30da88d590a7ad405ebe97b46443)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 30869: Add the ability to delete stock rotation rotas
Pedro Amorim [Fri, 13 Jan 2023 13:23:17 +0000 (13:23 +0000)]
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 cf06f05ec0a3bc5f965ba09168e3dc8c82e0dbb3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 22428: DBRev 22.12.00.006
Tomas Cohen Arazi [Fri, 24 Feb 2023 20:17:37 +0000 (17:17 -0300)]
Bug 22428: DBRev 22.12.00.006

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5926e7246b1c0d7bd23196a01cb098fa20ce6dfa)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 22428: DBIC schema
Tomas Cohen Arazi [Fri, 24 Feb 2023 20:18:37 +0000 (17:18 -0300)]
Bug 22428: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 337ac711679889c01c71772fe438cadfc39231fe)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 22428: Change datatype of field_value to text
Matt Blenkinsop [Tue, 21 Feb 2023 10:31:13 +0000 (10:31 +0000)]
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 cce48fc7d41ee9a0a38ae6b537830de886f86fb4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 33004: DBRev 22.12.00.008
Tomas Cohen Arazi [Mon, 27 Feb 2023 15:00:37 +0000 (12:00 -0300)]
Bug 33004: DBRev 22.12.00.008

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit da6d7171e313702da0611567f933409d4f157fb2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 33004: Add VENDOR_TYPE to default authorised value categories
Katrin Fischer [Sat, 18 Feb 2023 11:01:54 +0000 (11:01 +0000)]
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 0f3a82f09c530fcb0681fa70edf5168fb396d25e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoRevert "Bug 32594: (QA follow-up) Adjust tests"
Matt Blenkinsop [Wed, 1 Mar 2023 11:10:27 +0000 (11:10 +0000)]
Revert "Bug 32594: (QA follow-up) Adjust tests"

This reverts commit b7b8179380335914b1efc787410fdfb9b87f7821.

20 months agoBug 32594: (QA follow-up) Adjust tests
Tomas Cohen Arazi [Mon, 27 Feb 2023 16:11:54 +0000 (13:11 -0300)]
Bug 32594: (QA follow-up) Adjust tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 66e9bc71e423dea1b54ab397456caf8a3e820cae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32159: Fix heading hierarchy on uncertain prices page
Katrin Fischer [Thu, 9 Feb 2023 21:52:07 +0000 (22:52 +0100)]
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 83bde3e650ee83aed5419fa99282ae717752c458)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32585: (bug 32583 follow-up) Fix some variable references
Michael Hafen [Fri, 6 Jan 2023 23:11:01 +0000 (16:11 -0700)]
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 10a8203811a979d0a7190b4df1411be33a1b6dd9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32904: Check if responseJSON is defined for dataTable error
Aleisha Amohia [Tue, 7 Feb 2023 22:00:18 +0000 (22:00 +0000)]
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 bcc1c6c3fd19fe25d00b0fae4862a6b90b215ca5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31056: Restore closeandprint function on basketgroups page
Katrin Fischer [Thu, 9 Feb 2023 22:57:12 +0000 (23:57 +0100)]
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 a2314dc0ce6d0202451162cf11708ac73d4ba95e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32611: Not for loan items don't show the specific not for loan value in OPAC...
Owen Leonard [Thu, 23 Feb 2023 17:10:32 +0000 (17:10 +0000)]
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page

This patch corrects what appear to be some copy-paste errors which
resulted in the "not for loan" authorized value description not
displaying, instead the generic "Not for loan" is shown.

The patch also adds another case for displaying the item restricted
status. Previously items.restricted would only display if the item
*also* had a notforloan value.

To test it's probably easiest to find a record with multiple items and
set various item statuses (damaged, notforloan, lost, restricted) and
confirm that the right description is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 23c69dbfc2fbd6d393468fdadb5c0f28e9896a92)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32973: Use template wrapper for breadcrumbs: about, main, and error page
Owen Leonard [Thu, 5 Jan 2023 17:16:30 +0000 (17:16 +0000)]
Bug 32973: Use template wrapper for breadcrumbs: about, main, and error page

This patch updates the staff interface home page, the about page, and
the error page template so that they use the new template WRAPPER for
breadcrumbs.

To test, apply the patch and view each page to confirm that the
breadcrumbs are correct:

- Staff interface home page
- About page
- Error page (the easiest example is a 404 error)

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>
(cherry picked from commit 1a200cc25e8ed977425b6045c2e85231e0fca781)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32293: Fix terminology in warning when creating orders from staged file
Katrin Fischer [Sun, 5 Feb 2023 01:49:21 +0000 (01:49 +0000)]
Bug 32293: Fix terminology in warning when creating orders from staged file

When you are ordering from a staged file and the
fund is missing, there is a warning:

Some budgets are not defined in item records

Budgets shoudl be funds here.

To test:
* Add a new basket
* Add an order from a staged file or from a file
* Leave the fund values of some selected items empty
* Make sure default fund entry is also empty
* Warning message should be triggered on saving
* Apply patch, repeat, verify it is correct now.

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 9cad3324637f739b689ec065bcb84504a217af3b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32205: Remove unnecessary syspref template params for failed OPAC auth
David Cook [Tue, 15 Nov 2022 01:25:42 +0000 (01:25 +0000)]
Bug 32205: Remove unnecessary syspref template params for failed OPAC auth

This patch removes some unnecessary syspref template params for
failed OPAC auth. The templates handle these syspref using the
Koha.Preference() TT plugin function, so they're completely redundant
and just make checkauth() longer than it needs to be.

Test plan:
1) Apply patch
2) Enable OpacCloud, OpacBrowser, and OpacTopissue sysprefs
3) koha-plack --restart kohadev
4) Log out of Koha if you're logged in
5) Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
6) Note that you can see the Cart as well as links for the following:
Browse by hierarchy, Authority search, Tag cloud, Subject cloud,
Most popular

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.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 60e7c991650c42b0533ec9d2983e6920e32324ac)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33015: Fix some 'Cancel' links to point to cataloging start page
Katrin Fischer [Mon, 20 Feb 2023 22:15:48 +0000 (22:15 +0000)]
Bug 33015: Fix some 'Cancel' links to point to cataloging start page

Some 'cancel' links of tools moved to the cataloguing module still
pointed to the tools start page. This adds some more consistency.

To test:
* Go to cataloguing
  * Batch item editing
  * Batch record deletion
  * Batch record modification (create a MARC modification template first)
* Verify the 'cancel' link on each page points to tools
* Apply patch: cancelling should not take you to the cataloging start page

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
JD Amended patch: indentation + fix typo
-        <a class="cancel" href="/cgi-bin/koha/catalouging/cataloging-home.pl">Cancel</a>
+        <a class="cancel" href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cancel</a>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e53aae4f9451b340d5a808c16295a31809d729d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32215: Remove unused "Your searched for" lines from patron restrictions admin...
Katrin Fischer [Mon, 20 Feb 2023 23:08:51 +0000 (23:08 +0000)]
Bug 32215: Remove unused "Your searched for" lines from patron restrictions admin page

To test:
* Go to administration > patron restrictions
* Search for a specific restrictions
* Verify you can't make the 'You searched for' above the results table show
* Apply patch
* Everything should appear unchanged

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 b593f70b5d0d009ebf5690b66f3bff46f0c04836)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32824: Fix cataloguing/value_builder/unimarc_field_100.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32824: Fix cataloguing/value_builder/unimarc_field_100.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 2d25c2860c4b06a63048834fb99b2968f1fd57b1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32835: Fix cataloguing/value_builder/unimarc_field_122.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32835: Fix cataloguing/value_builder/unimarc_field_122.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>
https://bugs.koha-community.org/show_bug.cgi?id=32825
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e557357e62b6d8655f40cd576a8de846a687abf1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33048: Fix email link on error page when opac login not allowed
David Cook [Thu, 23 Feb 2023 00:43:31 +0000 (00:43 +0000)]
Bug 33048: Fix email link on error page when opac login not allowed

This change replaces a non-existent variable with the
KohaAdminEmailAddress syspref.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserlogin
2. Set to "Don't allow"
3. In an incognito window, go to http://localhost:8080/cgi-bin/koha/opac-reportproblem.pl
4. Note that the "mailto" link for "Email" has the value from KohaAdminEmailAddress syspref

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd9024abe25f0959f946ba9e219bc4ddce0587dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32503: Use first cancellation for date ordering
Martin Renvoize [Wed, 4 Jan 2023 10:59:55 +0000 (10:59 +0000)]
Bug 32503: Use first cancellation for date ordering

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37530b445fe3abad2861c02cc191bb6095f218c0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32503: (follow-up) Move data-order attributes
Martin Renvoize [Thu, 29 Dec 2022 11:33:47 +0000 (11:33 +0000)]
Bug 32503: (follow-up) Move data-order attributes

It looks like the data-order attributes were at the wrong level to me,
i.e. not part of the 'td' but instead part of the cell content.

This patch moves those data-order attributes where possible and drops
the data-type definitions on the headers.

However, for the cancellation case, this isn't as clear cut as we may
well display more than one cancellation request date in the same cell.
For this case I've left Katrins data-type="@data-order" trick.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d76a6cb1049107af77efc4f642f754d98c9821d8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32503: Fix date sorting for holds awaiting pickup tables
Katrin Fischer [Wed, 28 Dec 2022 22:39:43 +0000 (22:39 +0000)]
Bug 32503: Fix date sorting for holds awaiting pickup tables

This patch is a little experimental, but seems to do the trick.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 208de0c37160c2dc055072b167d901525e7eb94f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33032: Remove alternateholdings_count
Jonathan Druart [Thu, 23 Feb 2023 14:46:48 +0000 (15:46 +0100)]
Bug 33032: Remove alternateholdings_count

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e36e393c7d05fc6e2af6391b908807655f6841e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33032: Fix alternate holdings in staff interface search results
Fridolin Somers [Tue, 21 Feb 2023 20:03:25 +0000 (10:03 -1000)]
Bug 33032: Fix alternate holdings in staff interface search results

If system preference AlternateHoldingsField is used, one can see a display in OPAC search results.
This display does not appear in staff interface search results anymore.

Test plan :
1) Enable feature with system preference 'AlternateHoldingsField', ie 852abc
2) Edit a record to add some datas in field 852
3) Perform a search in staff interface
=> You see the alternate holdings datas

Signed-off-by: Lucas Gass <lucas@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 ae1aeaac0715da95b65b9374ac8eba704e5d2409)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32685: Correct authority match display on import
Nick Clemens [Thu, 19 Jan 2023 20:47:31 +0000 (20:47 +0000)]
Bug 32685: Correct authority match display on import

Bug 22785 updated the import records table, but mixed javascript variables and template toolkit, this means all matches are treated as biblios

To test:
1 - Export some authority records form Koha
2 - Create a matching rule based on 'Local-number' and field 001
3 - Stage the records for import using above rule
4 - Note the match links point to authorities, but the citations point to biblios
5 - Apply patch
6 - Reload the page
7 - Confirm the links have the correct text

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.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 9d7cca8b4dcdda09e5134bcd57731346285c9fc2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33020: (QA follow-up) POD and chmod
Nick Clemens [Fri, 24 Feb 2023 21:01:43 +0000 (21:01 +0000)]
Bug 33020: (QA follow-up) POD and chmod

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d599694ef5d9d7a8798d16815d839c9c286d6476)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33020: Add missing Koha::Logger->history
Jonathan Druart [Wed, 22 Feb 2023 10:02:39 +0000 (11:02 +0100)]
Bug 33020: Add missing Koha::Logger->history

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 28fd57d78a69a9bb7963597ddc8ec7a70883c7e1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33020: Add test
Jonathan Druart [Wed, 22 Feb 2023 09:20:56 +0000 (10:20 +0100)]
Bug 33020: Add test

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 8098dfbe3a9763c96ffdcc0c75417b1f5abb552f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Rename isSubmitting with submitting
Jonathan Druart [Wed, 15 Feb 2023 13:17:16 +0000 (14:17 +0100)]
Bug 32925: Rename isSubmitting with submitting

Asking to do somthing, not asking if it's being done

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 228b9ec2e92c65083c304868286cc9ed4b2c3ba5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Add test
Jonathan Druart [Wed, 15 Feb 2023 11:26:39 +0000 (12:26 +0100)]
Bug 32925: Add test

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 b312b6313671852cea3b8e352317a87824f999c4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Handle submission notification at fetch level
Jonathan Druart [Wed, 15 Feb 2023 11:02:31 +0000 (12:02 +0100)]
Bug 32925: Handle submission notification at fetch level

This is done in a single place now!

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 2e9ed49df2babaf18f46806a37ff3d76dbee02d5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Use a new state for this message
Jonathan Druart [Thu, 9 Feb 2023 15:17:09 +0000 (16:17 +0100)]
Bug 32925: Use a new state for this message

The previous patch didn't work, there is a validation step that make the
form non-accessible after it's greyed out.

This patch is using a new state is_submitting, like the other messages.

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 daeccd0b8c2ae9e3d16f32db379a39994433b69d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Display loading info when a form is submitted
Jonathan Druart [Thu, 9 Feb 2023 13:56:43 +0000 (14:56 +0100)]
Bug 32925: Display loading info when a form is submitted

With this new ButtonSubmit component all our submit buttons will look
and behave identically.
Here we need a "submitting" information to be displayed, and the form to
be "deactivated".

This patch is a POC and use the new component on the add agreement and
delete agreement forms

Test plan:
It's easier to test if you add a sleep in the relevant place
(Koha/REST/V1/ERM/Agreements.pm for list and add/update)
Confirm that you see a "Submitting..." in the middle of the screen

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 35dd04e9cb1d8b881b75504a55a253c5cd74f3cd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: (follow-up) Use APIClient to fetch vendors
Jonathan Druart [Fri, 24 Feb 2023 12:23:32 +0000 (13:23 +0100)]
Bug 32939: (follow-up) Use APIClient to fetch vendors

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2540ba19cb26a9d4f288086213891fdfe7561ab5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to replace PATCH requests
Jonathan Druart [Tue, 21 Feb 2023 12:09:23 +0000 (13:09 +0100)]
Bug 32939: Use APIClient to replace PATCH requests

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 821808ec31176d662e518418c9ff8a71948e1a4b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to replace some more fetch calls
Jonathan Druart [Tue, 21 Feb 2023 11:50:02 +0000 (12:50 +0100)]
Bug 32939: Use APIClient to replace some more fetch calls

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 7d95acb40280bd5c3cc4f248b14cb138db5393cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Remove fetch/erm.js
Jonathan Druart [Tue, 21 Feb 2023 11:42:29 +0000 (12:42 +0100)]
Bug 32939: Remove fetch/erm.js

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 b30a5a21d12e94171e4226b5f06eeb5117993847)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch EBSCO eHoldings
Jonathan Druart [Tue, 21 Feb 2023 11:42:15 +0000 (12:42 +0100)]
Bug 32939: Use APIClient to fetch EBSCO eHoldings

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 50aab456bc37fefa74149e85f2dfa9d6d308ab6c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch local eHoldings
Jonathan Druart [Tue, 21 Feb 2023 10:59:01 +0000 (11:59 +0100)]
Bug 32939: Use APIClient to fetch local eHoldings

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 7e58b6d74cc7f98d261b58e9a32cc7eb31d2f8f6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch vendors
Jonathan Druart [Tue, 21 Feb 2023 09:50:02 +0000 (10:50 +0100)]
Bug 32939: Use APIClient to fetch vendors

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 2d86a671f2e4ae42bfaba2b69642a5cae3707655)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch patrons
Jonathan Druart [Tue, 21 Feb 2023 09:14:55 +0000 (10:14 +0100)]
Bug 32939: Use APIClient to fetch patrons

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 66dd767813fb59cfa1d6b976365df9172198e0e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch licenses
Jonathan Druart [Tue, 21 Feb 2023 09:04:53 +0000 (10:04 +0100)]
Bug 32939: Use APIClient to fetch licenses

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 23266f7b002f8d99b3201de72766b8c06d5c2844)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch agreements
Jonathan Druart [Tue, 21 Feb 2023 08:46:28 +0000 (09:46 +0100)]
Bug 32939: Use APIClient to fetch agreements

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 b8dac5b1e296a56187990edca2193fba0e0360ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Uniformize api calls
Jonathan Druart [Wed, 15 Feb 2023 10:38:08 +0000 (11:38 +0100)]
Bug 32939: Uniformize api calls

We want to make the call easier and without less errors possible.
Here, no need to async keyword, try-catch, etc.
Only call the method and use the common then with the 2 success and
error Promise arguments.

We will certainly want to add later a parameter to prevent the display
of the error in fetchJSON, in case the failure does not require a message
for the end user.

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 545e568b9f243d3347ee7770f752e23d0af851ac)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Fix delete
Jonathan Druart [Wed, 15 Feb 2023 11:52:10 +0000 (12:52 +0100)]
Bug 32939: Fix delete

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 225f2c664b9549e05a9c98a4fd91df08bcc55c65)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Introduce count
Jonathan Druart [Wed, 15 Feb 2023 09:43:46 +0000 (10:43 +0100)]
Bug 32939: Introduce count

Not used yet, will replace myFetchTotal

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 2c34c60951a5d7aaa1862a6a5d667bf17edef0f9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Restore checkError
Jonathan Druart [Wed, 15 Feb 2023 09:36:38 +0000 (10:36 +0100)]
Bug 32939: Restore checkError

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 929f5a2199fc3e5ee84ad71c86d00ed4bfd6a530)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Set the default header at lower level
Jonathan Druart [Wed, 15 Feb 2023 09:13:58 +0000 (10:13 +0100)]
Bug 32939: Set the default header at lower level

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 5871db79587436bc28eb04f0558f2423ecfcac8c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Have a generic APIClient object
Jonathan Druart [Wed, 15 Feb 2023 08:35:19 +0000 (09:35 +0100)]
Bug 32939: Have a generic APIClient object

You always import the same, only once, and you can access other
resources from the same object.

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 10322566d40fd31cdf7ee554cbd7f9a0ac33d0a6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Have a generic fetch function for POST and PUT requests in vue modules
Pedro Amorim [Fri, 10 Feb 2023 12:19:08 +0000 (11:19 -0100)]
Bug 32939: Have a generic fetch function for POST and PUT requests in vue modules

Rebase to 32806 and prior to 32925. Squash
More updates. Ready for review, for now.

JD amended patch:
* prettier
* remove changes to AgreementRelationships.vue and EHoldingsLocalPackageAgreements.vue to have less files to update in upcoming patches

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 866cc641d924496b9d201a3996843eb8787d618f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Move main-erm.ts to modules/erm.ts
Jonathan Druart [Tue, 7 Feb 2023 19:54:47 +0000 (20:54 +0100)]
Bug 32806: Move main-erm.ts to modules/erm.ts

Looks fine.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 a8847a0d1dfaeb44b838f713f595d8fbb5067423)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: (follow-up) Rename main.js to erm.js
Jonathan Druart [Tue, 7 Feb 2023 15:55:05 +0000 (16:55 +0100)]
Bug 32806: (follow-up) Rename main.js to erm.js

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 710a3198932f89d2e3432e14175cd496f7276603)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Move routes.js to routes/erm.js
Jonathan Druart [Thu, 2 Feb 2023 20:23:13 +0000 (21:23 +0100)]
Bug 32806: Move routes.js to routes/erm.js

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 4f3ecedfde7698c444aa59d0fa86f8730145ecfe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Rename ERMHome and ERMMain to Home and Main
Jonathan Druart [Thu, 2 Feb 2023 20:16:58 +0000 (21:16 +0100)]
Bug 32806: Rename ERMHome and ERMMain to Home and Main

We don't need to repeat "ERM"

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 998289850f373a6b83d1ee4387161575fd6d3def)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Rename main.js to erm.js
Jonathan Druart [Thu, 2 Feb 2023 20:13:00 +0000 (21:13 +0100)]
Bug 32806: Rename main.js to erm.js

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 bb3459cabc01acfdb118074fde4fe4ac1ee8e02c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Move Vue files for reusability
Jonathan Druart [Thu, 2 Feb 2023 19:53:14 +0000 (20:53 +0100)]
Bug 32806: Move Vue files for reusability

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 1edd4d45890b06c8c5604ae0e6ba847799b76ad9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>