Commit graph

48489 commits

Author SHA1 Message Date
fc16b09083
Bug 32609: Remove CSS and JS compiled files
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10873a5728)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-10 12:27:32 +00:00
02a558e639
Bug 32609: Add compiled css files to gitignore
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a1fccbb29)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-10 12:27:30 +00:00
de44b3b7f0
Bug 32609: Improve yarn build commands
We had:
yarn css # Build staff css
yarn css --view opac # Build OPAC css
yarn build # Nothing, was broken
yarn watch # Nothing, was broken
yarn build_js # Build JS/Vue
yarn watch_js # Watch JS/Vue

This patch is suggesting to have something more consistent:
yarn css:build      # Build CSS for OPAC and staff (dev)
yarn css:build:prod # Build CSS for OPAC and staff (prod)
yarn css:watch      # Watch CSS for OPAC and staff (dev)
yarn js:build       # Build JS (dev)
yarn js:build:prod  # Build JS (prod)
yarn js:watch       # Watch JS (dev)
yarn build          # Same as css:build and js:build (dev)
yarn build:prod     # Same as css:build:prod and js:build:prod (prod)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9bdca7f216)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-10 12:27:27 +00:00
86e7b3f191
Bug 32609: Remove JS vars from gulpfile
They are not used.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2285b184bb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-10 12:27:23 +00:00
edb394527f Bug 32492: (follow-up) Add missing HTML filters
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 6ca1810834)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 11:50:16 +00:00
Katrin Fischer
05163003b2 Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface
Sometimes you want to hide notice from the messaging options
becaue the library is not using it. With this patch, we'll
have unique IDs on the <tr> to do so easily.

To test:
* Look at the messaging preferences
  * in the OPAC messaging tab
  * in the staff interface details tab
  * in the staff interface patron edit form
* Verify there are no classes or IDs on the rows or other elements
* Apply patch
* Verify there are nice IDs now on the table rows (tr elements)
  for each message.

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 7371ee848f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 11:49:56 +00:00
021b9a5d2f Bug 32679: Use different CSS classes for titles of article requests in staff interface
The class article-request-title was used for the column with the
article title as well as for the link with the record title. This could
cause some confusion when changing the table with CSS. This patch makes
it so different CSS classes are used for each.

To test:
* Activate article requests in system preferences
* Make sure circulation conditions have article requets = yes
* Create an article request in staff or OPAC
* View the list of article requests in the patron account in staff
* Add the following line to IntranetUserCSS:
  .article-request-title { display:none; }
* Verify the Title column and the title from Record title (first column)
  have vanished.
* Apply patch: now only the column should vanish, Record title shoudl remain
  visible
* If you want: Verify that the record title has a differently named
  class now.

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 974563bfee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 09:48:11 +00:00
83e7475b71 Bug 32658: (follow-up) Use more unique variable name to avoid collisions
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d3312fc1c9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 09:33:51 +00:00
780323c869 Bug 32658: Use template wrapper in order from staged file template
This patch implements the template WRAPPER system (see Bug 32571) for
building tabs on the page for adding to a basket from a staged
file.

To test you need an active vendor, at least one basket for that vendor,
and a staged MARC file.

Apply the patch and go to Acquisitions -> Vendor -> Basket -> Add to
basket -> From a staged file.

- Click "Add to orders" on one of your staged files.
- On the "Add orders from..." page you should see three tabs, the first
  one active.
- Tabs should look correct and work correctly.

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 09717bb20d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 09:33:29 +00:00
f2e6e90d9c 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 95891fe1e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 09:33:08 +00:00
f1ae055b18 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 3e3b27f87d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 09:32:49 +00:00
dfca45354d 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 dbb3c88cfc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-09 09:32:26 +00:00
820c3cedb4 Bug 33155: Fix category and library filters in patron search header
Caused by
  commit f1925cf89d
  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 79e4aabc31)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-08 14:42:43 +00:00
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