]> git.koha-community.org Git - koha.git/log
koha.git
19 months agoBug 32057: (QA follow-up) Add a simple test
Marcel de Rooy [Wed, 22 Feb 2023 13:53:35 +0000 (13:53 +0000)]
Bug 32057: (QA follow-up) Add a simple test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: (QA follow-up) Remove pretty flag
Marcel de Rooy [Wed, 22 Feb 2023 13:50:10 +0000 (13:50 +0000)]
Bug 32057: (QA follow-up) Remove pretty flag

Not needed for storage. You can always display pretty in the
interface (on a follow-up report).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: Replace insert query with use of Koha::ActionLogs
Kyle Hall [Tue, 20 Dec 2022 14:21:34 +0000 (09:21 -0500)]
Bug 32057: Replace insert query with use of Koha::ActionLogs

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>
19 months agoBug 32057: Add optional stack trace to action logs
Kyle Hall [Tue, 1 Nov 2022 10:47:35 +0000 (06:47 -0400)]
Bug 32057: Add optional stack trace to action logs

It can be useful to know where in Koha a particular logged action was generated from, and how. We should add the ability to attach a syspref controlled basic stack trace with the caller depth controlled via the syspref. We can the call caller() until the specified depth has been reached.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
4) Restart all the things!
5) Set the new syspref ActionLogsTraceDepth to a number ( e.g. 3 )
6) Update a syspref or trigger another enabled log action
7) Query the database: SELECT * FROM action_logs WHERE trace IS NOT NULL
8) Note the stack trace was created!

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>
19 months agoBug 29354: Make overdue_notices.pl send .html
Magnus Enger [Mon, 12 Dec 2022 13:41:20 +0000 (13:41 +0000)]
Bug 29354: Make overdue_notices.pl send .html

If you have EmailOverduesNoEmail = Send and specify "--html somedir",
overdue_notices.pl will send a file by email that contains partial
HTML, as a file called attachment.txt. This patch fixes that.

To reproduce in koha-testing-docker:
- EmailOverduesNoEmail = Send
- Make sure you have a loan that was due yesterday, by backdating the
  due date
- Set up an overdue action to send "Overdue Notice" (ODUE) to the
  category you made the loan to above, when a loan is one day overdue
- Run this command:
  $ sudo koha-shell -c "perl misc/cronjobs/overdue_notices.pl -v -t -html /tmp/" kohadev
- Look at the file /tmp/notices-<DATE>.html and make sure it is a full
  HTML document, with <html>, <head>, <body> etc.
- Create a report like this:
  SELECT message_id, letter_id, borrowernumber, subject, CONCAT( '<pre>', content, '</pre>' ) AS content,
    metadata, letter_code, message_transport_type, time_queued, updated_on, to_address, content_type, failure_code
  FROM message_queue
  WHERE subject = 'Overdue Notices'
  ORDER BY message_id DESC
- Run the report and verify there is a line like this in the "content"
  of the newest message:
  Content-Type: text/plain; name=attachment.txt
- A part of the "content" will be a block of several lines of gibberish
  (base64) that look something like "RGVhciAga29oYSwNCg0KQWN...". Copy
  this block of text to somewhere like base64decode.org and decode the
  text. You should see a fragment of HTML, without <html>, <head>,
  <body> etc.

To test:
- Apply the patch
- Run overdue_notices.pl again, with the same arguments as above
- Make sure /tmp/notices-<DATE>.html is still a full HTML document
- Re-run the report, and make sure you now have this in the "content":
  Content-Type: text/html; name=attachment.html
- Decode the base64 and make sure it is now a full HTML document, with
  <html>, <head>, <body> etc.
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-csv /tmp/test.csv"
- Make sure /tmp/test.csv and the decoded base64 from the report
  contains CSV data
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-text /tmp/"
- Make sure /tmp/notices-<DATE>.txt and the decoded base64 from the
  report contains no HTML

Note:
- The actual text from the different messages will be enclosed in
  <pre>-tags
- If you have HTML in your ODUE message template and run with -v, you
  will have warnings saying "The following terms were not matched and
  replaced"
These are due to Bug 14347, and are not adressed by the current patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33150: Add specific message for informing about too_soon for renewal.
Andreas Jonsson [Mon, 6 Mar 2023 15:42:05 +0000 (16:42 +0100)]
Bug 33150: Add specific message for informing about too_soon for renewal.

The message "No renewals allowed" is incorrect when it is too soon for renewal,
this patch adds a specific error message.

To test:
- Make sure the system preference  SCOAllowCheckin is set to "allow"
- Go to Koha administration -> Circulation and fine rules
- Edit the rule for all items and change "No renewal before" to 1 and save.
- Check out an item to a borrower (for instance barcode 39999000000719 to the user koha with cardnumber 42).
- Go to self checkout (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl)
- Log in as the user (koha/koha)
- Verify that the error message in the Renew column is "This item cannot yet be renewed."

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32684: (QA follow-up) Move too_many_lost to Patron
Marcel de Rooy [Wed, 8 Mar 2023 12:45:53 +0000 (12:45 +0000)]
Bug 32684: (QA follow-up) Move too_many_lost to Patron

Alternative implementation outside sub new.

Test plan:
Run t/db_dependent/SIP/Message.t

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>
19 months agoBug 32684: Implement SIP patron status field "too many items lost"
Kyle Hall [Thu, 19 Jan 2023 18:45:07 +0000 (13:45 -0500)]
Bug 32684: Implement SIP patron status field "too many items lost"

The SIP patron status and information responses always return false foe "too many items lost". It would be reasonable to check the count of lost items still checked out to the patron and compare that to a threshold set in the sip config file. Though not all libraries operate in this way, it seems like a good and reasonable implementation as long is it is properly documented.

This patch adds the ability to set the SIP "too many items lost" flag
for a patron based on the number of lost checkouts the patron has where
the lost flag on those items is greater than the given flag value.

For example, one could specify that the flag be set if the patron has
more than 2 items checked out where itemlost is greater than 3.

By default the feature is disabled to retain the existing functionality.
If enabled, the default itemlost minimum flag value is 1 unless
specified.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33144: Unescape text from authority lookup for advanced editor
Phil Ringnalda [Mon, 6 Mar 2023 05:24:56 +0000 (21:24 -0800)]
Bug 33144: Unescape text from authority lookup for advanced editor

While the basic editor is happy with an array of subfields it can
stuff into separate fields, the advanced editor needs to get a JS
string back from the authority lookup plugin, because it is going
to just add the whole thing as text. The string has to be HTML
entity encoded, both to not allow XSS and just to not break the
window, but it needs to then be unencoded before being inserted
into the editor.

Test plan:
1. Set the system preference EnableAdvancedCatalogingEditor to
   Enable
2. Edit any Topical Term authority, and at the end of tag 150
   subfield a, add & </script>
3. Cataloging - Advanced editor
4. Press return in the editor to get a new blank line, type 650
   and press tab three times, then type Ctrl-Shift-L
5. Search for your modified authority, and click Choose
6. Verify that the tiny popup opened by the search window finished
   its job and closed itself
7. Verify that your 650 now shows as "‡aAbduction &
   </script>‡vDrama" rather than "‡aAbduction  &amp;
   &lt;/script&gt;‡vDrama."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32118: Add optional support for `:` as the modifier
Martin Renvoize [Thu, 3 Nov 2022 11:02:21 +0000 (11:02 +0000)]
Bug 32118: Add optional support for `:` as the modifier

This patch adds optional support for using `:` as the modifier for
invoking the 'count' method for relations as discussed.

We retain support for `+` for backward compatability to prevent a
breaking change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33214: (follow-up) Make tests less fragile
Tomas Cohen Arazi [Mon, 13 Mar 2023 19:53:25 +0000 (16:53 -0300)]
Bug 33214: (follow-up) Make tests less fragile

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33214: (follow-up) Consistency on key names
Tomas Cohen Arazi [Mon, 13 Mar 2023 19:42:26 +0000 (16:42 -0300)]
Bug 33214: (follow-up) Consistency on key names

This patch makes GetAuthorisedValueDesc used cache keys match what we
discussed on the bug, which seems to have been lost on some rebase and
highlighted by failing tests.

I also add some more cache flushes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32781: Prevent import from list to fail if package does not exist
Jonathan Druart [Wed, 1 Feb 2023 15:23:59 +0000 (16:23 +0100)]
Bug 32781: Prevent import from list to fail if package does not exist

This is theorical (caught when writting tests) but we need to deal with
it.

Can't call method "resources" on an undefined value at /kohadevbox/koha/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm line 94.

Test plan:
  prove t/db_dependent/Koha/BackgroundJob/CreateEHoldingsFromBiblios.t
must return green

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30943: Fix test
Jonathan Druart [Wed, 1 Feb 2023 15:17:57 +0000 (16:17 +0100)]
Bug 30943: Fix test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30943: Adjust CreateEHoldingsFromBiblios
Jonathan Druart [Wed, 1 Feb 2023 15:15:11 +0000 (16:15 +0100)]
Bug 30943: Adjust CreateEHoldingsFromBiblios

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30943: Simplify background jobs code using helpers
Tomas Cohen Arazi [Thu, 8 Sep 2022 00:35:09 +0000 (17:35 -0700)]
Bug 30943: Simplify background jobs code using helpers

This patch makes the current background jobs classes use the added
helpers in order to simplify them.

No behavior change is expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30624: DBRev 22.12.00.012
Tomas Cohen Arazi [Mon, 13 Mar 2023 18:40:32 +0000 (15:40 -0300)]
Bug 30624: DBRev 22.12.00.012

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30624: Make DB update idempotent
Lucas Gass [Mon, 13 Mar 2023 12:17:32 +0000 (12:17 +0000)]
Bug 30624: Make DB update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30624: (QA follow-up) Use C4:Context to get permissions
Lucas Gass [Tue, 28 Feb 2023 17:04:52 +0000 (17:04 +0000)]
Bug 30624: (QA follow-up) Use C4:Context to get permissions

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30624: Adjust number of tests
Lucas Gass [Tue, 24 Jan 2023 16:50:39 +0000 (16:50 +0000)]
Bug 30624: Adjust number of tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30624: Unit tests
Lucas Gass [Wed, 14 Dec 2022 21:53:18 +0000 (21:53 +0000)]
Bug 30624: Unit tests

Signed-off by: Bob Bennhoff/AspenCat Team

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30624: Add loggedinlibrary permission and DB update
Lucas Gass [Tue, 13 Dec 2022 20:59:50 +0000 (20:59 +0000)]
Bug 30624: Add loggedinlibrary permission and DB update

To test:
1. Apply patch, updatedatabase, restart_all
2. Have a user with superlibrarian privileges ( User1 )
3. Have a user who has staff access and circulate privileges but is not a super librarian. ( User2 ) Make note of this users home library
4. Turn on the system preference 'CircSidebar'.

-MAIN log in ( auth.tt )
5. As User1, go to the main login screen and try logging in. You should be able to log in AND you should be able to properly chnage your branch BEFORE logging in.
6. As User2, to to the main login screnn amd try logging in. You should be able to but if you try and switch your libraray to anything beside the user's home branch it will not work. You will be logged in at your home branch.
7. For User2, set the new top level permission 'Allow staff to change logged in library (loggedinlibrary).
8. Now you should be able to successfully switch libraries before log in.
9. Turn the 'loggedinlibrary' permission back off for User2.

-AFTER log in-
10. With User1, click on your name/branch in the top right, you should see the the link 'Set library' at the top. If you turn on 'UseCirculationDesks' the link will be 'Set library and desk'.
11. With User2, click on your name/branch in the top right. If you have 'UseCirculationDesks' on, you should see 'Set desk', otherwise you should see nothing.
12. Repeat step 7.
13. NOw if you click on your name/branch in the top right, you should see the the link 'Set library' at the top. If you turn on 'UseCirculationDesks' the link will be 'Set library and desk'.
14. Repeat Step 9.

-CircSideBar-
15. With 'CircSideBar' turned on, go to any ciculation page (Holds queue, Holds to pull, Holds awaiting pickup) with User1. You will see the 'Set library' link. If 'UseCirculationDesks' is on you will see a 'Set library and desk'.
16. Try with User2 and you will not see a 'Set library' link. If 'UseCirculationDesks' is on you will see a 'Set desk' link.
17. Repeat step 7.
18. For with User2 you go to any ciculation page (Holds queue, Holds to pull, Holds awaiting pickup). You will see the 'Set library' link. If 'UseCirculationDesks' is on you will see a 'Set library and desk'.
19. Repeat step 9.

-Set library page-
20. Go to the set library page (http://localhost:8081/cgi-bin/koha/circ/set-library.pl) with User1. You will see a dropdown for 'Set library'. Make sure you can change your library successfully.
21. Go to the set library page (http://localhost:8081/cgi-bin/koha/circ/set-library.pl) with User2. You should NOT see see a dropdown for 'Set library'.
22. Repeat step 7.
23. Go to the set library page (http://localhost:8081/cgi-bin/koha/circ/set-library.pl) with User2. Now you should see a dropdown for 'Set library'.

Signed-off by: Bob Bennhoff/AspenCat Team

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33214: Make tests use random data and clear the cache
Tomas Cohen Arazi [Mon, 13 Mar 2023 17:29:18 +0000 (14:29 -0300)]
Bug 33214: Make tests use random data and clear the cache

This trivial patch removes some wrongly hardcoded bits, and makes the
tests also clear the cache before and after being run.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32734: (QA follow-up) Make use of $c->objects->to_api
Tomas Cohen Arazi [Mon, 13 Mar 2023 18:06:44 +0000 (15:06 -0300)]
Bug 32734: (QA follow-up) Make use of $c->objects->to_api

This is using plain `$biblios->to_api` but as of bug 33080, the new
helper should be used instead. This patch fixes that.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32734: (QA follow-up) Remove stray method
Tomas Cohen Arazi [Mon, 13 Mar 2023 17:58:21 +0000 (14:58 -0300)]
Bug 32734: (QA follow-up) Remove stray method

On bug 33083 we introduce a better way to implement a reusable method
for the same functionality.

This patch just removes the one in `Koha::Biblios` and the result should
be the same as the one inherited from  `Koha::Objects::Record::Collections` will be picked instead.

To test:
1. Run:
   $ prove t/db_dependent/Koha/Biblios.t \
           t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32734: Add REST endpoint to list biblios
Agustin Moyano [Fri, 17 Feb 2023 01:17:43 +0000 (22:17 -0300)]
Bug 32734: Add REST endpoint to list biblios

This patch adds an endpoint to list biblios

To test:
1. apply patch
2. enable basic auth
3. call to GET /api/v1/biblios with the following Accept headers:
 * application/json
 * application/marcxml+xml
 * application/marc-in-json
 * application/marc
 * text/plain
4. notice how data changes with each Accept header
5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t
6. sign off

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33083: Add a generic class to handle methods for collections of records
Agustin Moyano [Mon, 27 Feb 2023 22:10:31 +0000 (19:10 -0300)]
Bug 33083: Add a generic class to handle methods for collections of records

To test:
1. Apply patch
2. prove t/db_dependent/Koha/Objects/Record/Collections.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: (follow-up) Manually flush caches in tests
Martin Renvoize [Fri, 10 Mar 2023 16:34:26 +0000 (16:34 +0000)]
Bug 30920: (follow-up) Manually flush caches in tests

We can't rely on our cache flushing in either 'store' or 'delete'
triggers as t/lib/TestBuilder::build_object skips the Koha::Object store
and uses direct DB inserts in preference.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: (follow-up) Cleanup warning from C4::Biblio::GetAuthorisedValueDesc
Martin Renvoize [Fri, 10 Mar 2023 16:33:44 +0000 (16:33 +0000)]
Bug 30920: (follow-up) Cleanup warning from C4::Biblio::GetAuthorisedValueDesc

We simply return early and empty if $value is not passed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: (follow-up) Flush on delete
Martin Renvoize [Fri, 10 Mar 2023 15:26:45 +0000 (15:26 +0000)]
Bug 30920: (follow-up) Flush on delete

We missed the flush on delete triggers for the various caches introduced
here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: (follow-up) Cache key fixes
Martin Renvoize [Fri, 10 Mar 2023 15:11:51 +0000 (15:11 +0000)]
Bug 30920: (follow-up) Cache key fixes

We missed a few places, namely the flushes, when renaming the cache
keys.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: (QA follow-up) Use get_dirty_columns to avoid DB query
Tomas Cohen Arazi [Fri, 10 Mar 2023 12:07:26 +0000 (09:07 -0300)]
Bug 30920: (QA follow-up) Use get_dirty_columns to avoid DB query

We can rely on DBIC's get_dirty_columns to check if the descriptions
have changed, and set things for flushing without an extra DB query.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: (follow-up) Add missing use
Nick Clemens [Fri, 17 Jun 2022 13:36:13 +0000 (13:36 +0000)]
Bug 30920: (follow-up) Add missing use

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30920: Add caching to GetAuthorizedValueDesc
Martin Renvoize [Thu, 26 May 2022 15:31:30 +0000 (16:31 +0100)]
Bug 30920: Add caching to GetAuthorizedValueDesc

This patch adds caching to C4::Biblio::GetAuthorisedValueDesc for performance.

We cache each hash involved in the method use for description lookup and
we're careful to clear said caches appropraitely on changes.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31801: Add REST endpoint to modify a biblio
Agustin Moyano [Fri, 23 Dec 2022 21:38:04 +0000 (18:38 -0300)]
Bug 31801: Add REST endpoint to modify a biblio

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Pick a biblio to modify, and modify it's marc record
4. Make a PUT request to /api/v1/biblios/:biblionumber with one of the following content type header
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
5. Add the following header in the request 'x-framework-id: <framework id>'
5. Check that the biblio was modified
6. Sign off

Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33211: Fix failing test
Nick Clemens [Mon, 13 Mar 2023 14:39:03 +0000 (14:39 +0000)]
Bug 33211: Fix failing test

This patch updates the selector to use the full class and find the text
type as well

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32519: In Elasticsearch mappings table use of search field name and label
Fridolin Somers [Fri, 23 Dec 2022 06:15:09 +0000 (20:15 -1000)]
Bug 32519: In Elasticsearch mappings table use of search field name and label

In Elasticsearch mappings table, in tabs for mappings we should add search field name in addition to label ; in order to find them when searching using DataTable search field. This is very useful when debugging.

Also the lines are sorting alphabetically by search field name.
So I propose to display name and label between parenthesis.
And also add label to the form in last line.

By default label equals name so I display label only if different from name.

Test plan :
1) Go to : Administration > Search engine configuration (Elasticsearch)
2) In first tabe edit a line to change label, for example : author => Auteur
3) Save
4) Go to second tab
5) Check you see a line with 'author (Auteur)' and lines with only name when label equals name
6) Look at last line (addition form)
7) Check you see in combobox : 'author (Auteur)' and lines with only name when label equals name

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>
19 months agoBug 32952: Standardize action fieldsets in authorities, cataloging, and circulation
Owen Leonard [Wed, 1 Feb 2023 11:58:04 +0000 (11:58 +0000)]
Bug 32952: Standardize action fieldsets in authorities, cataloging, and circulation

This patch updates some templates in authorities, cataloging, and
circulation so that fieldsets with the "action" class are placed outside
the form's main fieldset.

To test, apply the patch and check the following pages to confirm that
changes to form structure look correct:

- Authorities -> Authority search -> Merge
- Catalog -> Search -> Merge records
- Catalog -> Bibliographic record details -> Edit -> Attach item
- Circulation -> Check out to patron -> Batch check out
- Circulation -> Overdues -> Sidebar filter
- Circulation -> Holds to pull -> Sidebar filter

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32683: Convert header search tabs to Bootstrap
Owen Leonard [Thu, 19 Jan 2023 19:04:53 +0000 (19:04 +0000)]
Bug 32683: Convert header search tabs to Bootstrap

This patch updates all search header include files so that they have
Bootstrap tab markup instead of jQueryUI. jQueryUI-related JavaScript is
updated to work with Bootstrap.

To test, apply the patch and rebuild the staff interface CSS. Clear your
browser cache if necessary.

Test that keyboard shortcuts work correctly: Alt-U for circulation,
Alt-R for returns, Alt-W for renewals, and Alt-Q for search. Each
shortcut should either activate the correct search tab (if present on
the page) or redirect you to that page.

Cursor focus should be automatically placed in expanded header search
form, whether it be on page load or when switching tabs.

Test search header forms with additional search options work correctly:
Clicking the "settings" icon should expand the panel with additional
fields.

Test at least one page which uses each include file:

- acquisitions-search.inc
  - Acquisitions and related pages
- adv-search.inc
  - Advanced catalog search
- authorities-search.inc
  - Authorities and related pages
  - Check that the right tab is preselected after each kind of search,
e.g. a search by "Main heading" should return a search results page
where the "Main heading" tab is preselected.
- budgets-admin-search.inc
  - Administration -> Budgets
- cat-search.inc
  - Catalog search results, bibliographic details, etc.
- cataloging-search.inc
  - Cataloging home page and cataloging search results
- checkin-search.inc
  - Circulation -> Check in
- circ-search.inc
  - Circulation -> Check out
- cities-admin-search.inc
  - Administration -> Cities and towns
- contracts-admin-search.inc
  - Acquisitions -> Vendor -> Contracts
- currencies-admin-search.inc
  - Administration -> Currencies
- desks-admin-search.inc
  - Administration -> Desks (must have UseCirculationDesks enabled)
- erm-search.inc
  - ERM (must have ERMModule enabled)
- home-search.inc
  - Staff interface home page
- letters-search.inc
  - Tools -> Notices
- patron-search-header.inc
  - Patron details, patron accounting, etc.
- patrons-admin-search.inc
  - Administratoin -> Patron categories
- prefs-admin-search.inc
  - Administration home page and system preferences
- serials-search.inc
  - Serials and related pages
- suggestions-add-search.inc
  - Not used
- z3950-admin-search.inc
  - Administration -> Z39.50 servers

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33080: Adapt other use-cases
Tomas Cohen Arazi [Tue, 7 Mar 2023 11:26:51 +0000 (08:26 -0300)]
Bug 33080: Adapt other use-cases

This patch adapts the other controllers that rely on
add_pagination_headers outside of `objects.search`.

To test:
1. Apply this patchset
2. Run:
   $ ktd --shell
   $ prove t/db_dependent/api/v1/* \
           t/db_dependent/Koha/REST/Plugin/Objects.t \
           t/db_dependent/Koha/REST/Plugin/Pagination.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33080: Allow pagination to be built from stashed values
Tomas Cohen Arazi [Fri, 3 Mar 2023 12:28:14 +0000 (09:28 -0300)]
Bug 33080: Allow pagination to be built from stashed values

The way the old `objects.search` was build implied several totals were
calculated there, and passed to the `$c->add_pagination_headers` helper.

With the introduction of `objects.search_rs` and the ability of doing
things to the resultset afterwards, it felt like out of place to have
the pagination headers be implicitly set inside `objects.search_rs`.

This patch makes the search_rs stash some required values (from the original request) and
makes `add_pagination_headers` accept those values. This way other
callers can still build their own pagination values, while allowing this
simplified implementation.

Full-stack tests still pass, and the helper tests are moved to the
`db_dependent` section and are now more meaningful as well

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
   $ prove t/db_dependent/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/api/v1/
=> SUCCESS: Tests pass! Nothing broken!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33080: Introduce objects.search_rs, objects.find_rs and objects.to_api
Tomas Cohen Arazi [Fri, 6 Jan 2023 15:49:14 +0000 (12:49 -0300)]
Bug 33080: Introduce objects.search_rs, objects.find_rs and objects.to_api

This patch introduces the mentioned helpers, and reimplements
objects.search and objects.find in terms of them.

To test:
1. Apply patch
2. restart_all
3. Check that any API that uses objects.search helper is still running
   (GET /api/v1/items, GET /api/v1/holds, etc)
4. prove t/db_dependent/Koha/REST/Plugin/Objects.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32021: Don't show 'appear in position' for Pages
Aleisha Amohia [Wed, 15 Feb 2023 01:58:33 +0000 (14:58 +1300)]
Bug 32021: Don't show 'appear in position' for Pages

The 'Appear in position' option isn't relevant for Pages, so we should
hide it when not adding or modifying a Page.

To test:

1) Add a new Page
2) Confirm the 'Appear in position' option does not show
3) Add a new News item or HTML customisation
4) Confirm the 'Appear in position' option DOES show

Sponsored-by: Catalyst IT
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31611: Clearly highlight biblios that cannot be deleted in the Batch record delet...
Alex Buckley [Thu, 22 Sep 2022 23:16:22 +0000 (11:16 +1200)]
Bug 31611: Clearly highlight biblios that cannot be deleted in the Batch record deletion tool

Test plan:
1. Apply patch
2. Check out an item
3. Go to: 'Cataloguing' > 'Batch record deletion'
4. Into the 'Enter a list of record numbers' area paste in the
biblionumber belonging to the checked-out item and that of a biblio without checked out items
5. Submit the form
6. Observe the row of the biblio with checked-out items is highlighted yellow, with a
red cross in the first column
7. Hover over the red cross to see the reason why the biblio cannot be
deleted
8. Observe the row of the biblio without checked-out items is not
highlighted yellow, and does have a checkbox in the first column
9. Click 'Delete selected records'
10. Confirm the biblio without checked-out items is successfully deleted

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
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>
19 months agoBug 31611: Clearly highlight items that cannot be modified/deleted in the Batch item...
Alex Buckley [Thu, 22 Sep 2022 07:15:25 +0000 (19:15 +1200)]
Bug 31611: Clearly highlight items that cannot be modified/deleted in the Batch item tools

Test plan:
1. Apply patches
2. Check out an item with a different home branch than the library
you're logged in as
3. Go to: 'Cataloguing' > 'Batch item deletion'
4. Into the barcode list area paste the checked-out item's barcode and the barcode of a non-checked out item (with the same home library as the branch you're logged in as) and submit the form
5. Observe in the table that loads the row containing the checked out item is highlighted
yellow, and it has a red cross in the first column.
6. Hover over the red cross to see the reason why you cannot delete the
item appears
7. Observe the non checked out item has a checkbox and is not
highlighted yellow
8. Click 'Select all' and 'Clear all' links and notice the display of
the checked out item remains unchanged

9. Change 'IndependentBranches' syspref = 'yes'
10. Log into the staff client as a patron with only the '(catalogue)', '(editcatalogue)', and '(tools)'
permissions selected
11. Go to: 'Cataloguing' > 'Batch item modification'
12. Enter the checked-out item's barcode and a non-checked out item's
barcode and submit the form
13. Observe the table row for the checked out item is again highlighted
yellow, with a red cross.
14. Hover over the red cross and observe the text 'Cannot edit' is shown
15. Observe the non-checked out item is not highlighted yellow and does
have a checkbox

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
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>
19 months agoBug 31800: Add REST endpoint to add a biblio
Agustin Moyano [Fri, 23 Dec 2022 20:15:29 +0000 (17:15 -0300)]
Bug 31800: Add REST endpoint to add a biblio

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Make a POST request to /api/v1/biblios with one of the following content type header
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
4. Add the following header to the request: "x-framework-id: <framework id>"
5. Check that the biblio is created
6. Sign off

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33161: (QA follow-up) Fix api_strings_mapping inconsistency
Tomas Cohen Arazi [Fri, 10 Mar 2023 14:33:02 +0000 (11:33 -0300)]
Bug 33161: (QA follow-up) Fix api_strings_mapping inconsistency

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32886: Set focus for cursor to Code when adding a new restriction
Owen Leonard [Tue, 7 Feb 2023 13:40:29 +0000 (13:40 +0000)]
Bug 32886: Set focus for cursor to Code when adding a new restriction

This patch adds the "focus" class to the form for defining a new patron
restriction so that the cursor focus is automatically added.

To test, apply the patch and go to Administration -> Patron restrictions
-> New restriction.

The cursor should automatically move to the "Code" input field.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29935: Archived suggestions filter always visible
Frédéric Demians [Sat, 24 Dec 2022 09:52:05 +0000 (10:52 +0100)]
Bug 29935: Archived suggestions filter always visible

In suggestion sidebar menu, make visible 'Include archived' checkbox
without having to develop a filter.

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>
19 months agoBug 32991: Don't display breadcrumb if pref is off
Jonathan Druart [Thu, 2 Mar 2023 10:04:23 +0000 (11:04 +0100)]
Bug 32991: Don't display breadcrumb if pref is off

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Remove _is_loading warning, and improve 'ERMModule' disabled warning
Agustin Moyano [Wed, 1 Mar 2023 15:56:55 +0000 (12:56 -0300)]
Bug 32991: Remove _is_loading warning, and improve 'ERMModule' disabled warning

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Add cypress tests for the dialog box
Jonathan Druart [Tue, 28 Feb 2023 11:21:54 +0000 (12:21 +0100)]
Bug 32991: Add cypress tests for the dialog box

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Don't remove all messages when confirm box is closed
Jonathan Druart [Tue, 28 Feb 2023 10:48:55 +0000 (11:48 +0100)]
Bug 32991: Don't remove all messages when confirm box is closed

If we cancel the confirmation box we should not clear all the messages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Flag the deletion messages as displayed already
Jonathan Druart [Tue, 28 Feb 2023 10:21:48 +0000 (11:21 +0100)]
Bug 32991: Flag the deletion messages as displayed already

Or they will be displayed again on the next view

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Fix cypress tests. Added new test for when deleting from show view.
Pedro Amorim [Fri, 24 Feb 2023 16:06:31 +0000 (16:06 +0000)]
Bug 32991: Fix cypress tests. Added new test for when deleting from show view.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Agreements: Add delete dialog to show. Removed FormConfirmDelete component...
Pedro Amorim [Mon, 27 Feb 2023 15:22:48 +0000 (15:22 +0000)]
Bug 32991: Agreements: Add delete dialog to show. Removed FormConfirmDelete component and routes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Licenses: Add delete dialog to list and show. Removed FormConfirmDelete...
Pedro Amorim [Fri, 24 Feb 2023 17:01:15 +0000 (17:01 +0000)]
Bug 32991: Licenses: Add delete dialog to list and show. Removed FormConfirmDelete component and routes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Local Packages: Add delete dialog to list and show. Removed FormConfirmDel...
Pedro Amorim [Fri, 24 Feb 2023 18:30:54 +0000 (18:30 +0000)]
Bug 32991: Local Packages: Add delete dialog to list and show. Removed FormConfirmDelete component and routes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Local titles: Add delete dialog to list and show. Removed FormConfirmDelet...
Pedro Amorim [Mon, 27 Feb 2023 11:08:35 +0000 (11:08 +0000)]
Bug 32991: Local titles: Add delete dialog to list and show. Removed FormConfirmDelete component and routes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Allow for a confirmation title, message, accept_label and cancel_label...
Pedro Amorim [Mon, 27 Feb 2023 15:09:41 +0000 (15:09 +0000)]
Bug 32991: Allow for a confirmation title, message, accept_label and cancel_label in Dialog.vue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: accept is a callback, rename accept to accept_callback
Pedro Amorim [Fri, 24 Feb 2023 17:10:03 +0000 (17:10 +0000)]
Bug 32991: accept is a callback, rename accept to accept_callback

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Style the dialog to be in line with rest of Koha; Fix duplicate HTML eleme...
Pedro Amorim [Fri, 24 Feb 2023 11:32:29 +0000 (11:32 +0000)]
Bug 32991: Style the dialog to be in line with rest of Koha; Fix duplicate HTML element ID

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Add a confirmation message
Jonathan Druart [Fri, 17 Feb 2023 10:45:43 +0000 (11:45 +0100)]
Bug 32991: Add a confirmation message

Looks easier to have a separate variable for the confirmation box, and
easier for styling as well.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32991: Improve our Dialog component
Jonathan Druart [Fri, 17 Feb 2023 10:26:38 +0000 (11:26 +0100)]
Bug 32991: Improve our Dialog component

This is picking some improvements made by Agustin on bug 32607.
This patch is only a POC and we should apply this change to the
different delete route.

We will then remove the *FormConfirmDelete components, and the /delete routes

Initially I wanted to have the same behaviour as in other areas of Koha,
and have a separate view for the deletion step. But it's too much
overhead for not much gain.

Additionally we will have to remove messages.js, the aim of this file
was to import the methods to add messages very easily (only 1 import
line). Now we will need 2 lines (it was more when I added messages.js,
because I didn't inject the store). Not a big deal.

Finally, there is something weird in Main.vue we need to fix. The
console is showing a warning
"[Vue warn]: setup() return property "_is_loading" should not start with "$" or "_" which are reserved prefixes for Vue internals."

I had a hard time to display this "loading" modal when the app is
loading all the things it needs. Pinia/store is not available as we are
accessing the methods/actions too earlier. It will be good to fix that
before we decide to move forward with this approach.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32977: Add callnumber column to boraccount.tt
Lucas Gass [Wed, 15 Feb 2023 23:05:12 +0000 (23:05 +0000)]
Bug 32977: Add callnumber column to boraccount.tt

To test:
1. Apply patch, restart_all
2. Create a manual invoice for an item that has an item.itemcallnumber
3. Go to the transaction tab and see that the particualar accountline contains a callnumber in the new callnumber column.
4. Make sure you can hide the column, and other columns, correctly via Table settings or via the Column  icon.

Signed off by: Michael Perry (Siskiyou County Library)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32746: Standardize structure around action fieldsets in acquisitions
Owen Leonard [Mon, 30 Jan 2023 15:45:32 +0000 (15:45 +0000)]
Bug 32746: Standardize structure around action fieldsets in acquisitions

This patch updates acquisitions templates so that fieldsets with the
"action" class are placed outside the form's main fieldset. A couple of
minor changes have been made to related CSS.

To test, apply the patch and rebuild the staff interface CSS. Go to
acquisitions and check the following pages to confirm that changes to
form structure look correct:

- Open the "Late orders" page from the left-hand sidebar menu and check
  the form in the sidebar.
- Open the "Orders search" form in the search header and submit the form
  without specifying any search criteria. This should bring up a blank
  orders search form.
- Open the "Invoices" page from the left-hand sidebar menu. Check the
  form in the sidebar.
  - Perform an invoice search which will return results.
  - View one of the invoices returned by your search.
  - On the invoice detail age, the "Save" button associated with the
    invoice details at the top should look correct.
  - There should be a box below that with the heading "Adjustments" and
    a link to add an adjustment.
  - When you click "Add an adjustment," a form should be displayed with
    the correct controls at the bottom. Clicking "Cancel" should hide
    the form.
  - Click the "Manage invoice files" link, and check the form on that
    page.
- Locate a vendor and view its details.
  - Check the "Uncertain prices" page, linked from the menu in the
    left-hand sidebar.
  - Open the "Baskets" page from the left-hand sidebar. Click the "Add
    to basket" button for one of the existing baskets.
  - Click "From existing orders (copy)". Check that this form looks
    correct.
  - Open the "Basket groups" page from the left-hand sidebar menu.
    - Click "New basket group" and check that form.

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>
19 months agoBug 33063: Make sure correct subgroup is pre-selected when duplicating reports
Katrin Fischer [Mon, 27 Feb 2023 23:45:12 +0000 (23:45 +0000)]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports

When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33031: Update OPAC lists page to use Bootstrap markup for tabs
Owen Leonard [Tue, 21 Feb 2023 19:52:28 +0000 (19:52 +0000)]
Bug 33031: Update OPAC lists page to use Bootstrap markup for tabs

This patch updates the OPAC lists page with Bootstrap markup for the
static tabs used to link to private and public shelves. These tabs are
not dependent on JavaScript.

To test, apply the patch and click "Lists" -> "Public lists" in the
OPAC. The "Your lists" and "Public lists" tabs should look correct, and
each should link to the correct view.

Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31858: (QA follow-up) Fix number of tests
Tomas Cohen Arazi [Fri, 10 Mar 2023 13:56:21 +0000 (10:56 -0300)]
Bug 31858: (QA follow-up) Fix number of tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31858: unit tests
Alex Arnaud [Wed, 19 Oct 2022 14:36:18 +0000 (14:36 +0000)]
Bug 31858: unit tests

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31858: add TT syntax for ACQORDER notices
Alex Arnaud [Wed, 19 Oct 2022 11:42:19 +0000 (11:42 +0000)]
Bug 31858: add TT syntax for ACQORDER notices

Test Plan:
    1) Set your ACQORDER notice content to:
        [%- USE Price -%]
        [% bookseller.name %]
        [% FOREACH order IN orders %]
        Ordernumber [% order.ordernumber %] ([% order.biblio.title %] - [% order.biblio.biblioitem.publicationyear %]) (quantity: [% order.quantity %]) ($[% order.listprice | $Price %] each).
        [% END %]
        Thank you,
        [% branch.branchname %]
    2) Set up a vendor with an email, set contact for email so the "E-mail
        order" button shows on a basket for that vendor
    3) E-mail the basket
    4) Check the content is correct

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33090: Add page-section to accountline-details
Martin Renvoize [Tue, 28 Feb 2023 16:40:34 +0000 (16:40 +0000)]
Bug 33090: Add page-section to accountline-details

This patch adds page-section containers to the accountlines details
display page.

Note: This patch contains whitespace changes, so use diff accordingly.

To test, apply the patch and locate a patron with charges on their
account (lost item fee, account renewal fee, overdue fine, etc).

- From the patron detail page, click the "Accounting" tab in the sidebar
  menu.
- Click the "Transactions" tab.
- Click the "Details" button for an individual charge.
- On the transaction detail page, confirm that the page sections look
  correct.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33152: Add focus to search field
Matt Blenkinsop [Wed, 8 Mar 2023 12:04:57 +0000 (12:04 +0000)]
Bug 33152: Add focus to search field

This patch adds focus to the search field for a new SQL report from
mana.

Test plan:
1) Navigate to Reports > Create from SQL
2) Click on the new report dropdown and select "New SQL from Mana"
3) Observe that there is no focus on the input and the user needs to
   click to start typing
4) Apply patch
5) Repeat steps 1-2
6) There should now be focus on the input and typing can be started
   immediately

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>
19 months agoBug 31793: (QA follow-up) Require editauthorities flag
Tomas Cohen Arazi [Mon, 6 Mar 2023 20:39:14 +0000 (17:39 -0300)]
Bug 31793: (QA follow-up) Require editauthorities flag

This patch makes the route require the right permissions. Tests are
adjusted to reflect this new situation.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/authorities.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31793: (QA follow-up) DelAuthority doesn't return errors
Tomas Cohen Arazi [Mon, 6 Mar 2023 20:36:38 +0000 (17:36 -0300)]
Bug 31793: (QA follow-up) DelAuthority doesn't return errors

DelAuthority doesn't return an error, so the only possible error
conditions are exceptions, that are unknown for now. Removing the error
checking control structure and the 409 error returning, which is
inherited from DelBiblio's call on the biblios endpoint.

It will now just return a 500 in the event of an unhandled internal
error.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31793: Add REST endpoint to delete authorities
Agustin Moyano [Wed, 7 Dec 2022 15:05:35 +0000 (12:05 -0300)]
Bug 31793: Add REST endpoint to delete authorities

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Get the id of an authority
4. Make a DELETE request to /api/v1/authorities/{authid}
5. Check that the authority was deleted
6. Sign off

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>
19 months agoBug 33161: Unit tests
Tomas Cohen Arazi [Thu, 9 Mar 2023 22:23:03 +0000 (19:23 -0300)]
Bug 33161: Unit tests

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Edit: added missing test for unmapped attribute

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33161: (follow-up) Remove stray variables and fix POD
Tomas Cohen Arazi [Thu, 9 Mar 2023 14:36:27 +0000 (11:36 -0300)]
Bug 33161: (follow-up) Remove stray variables and fix POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33161: Clarify method names
Martin Renvoize [Thu, 9 Mar 2023 13:14:04 +0000 (13:14 +0000)]
Bug 33161: Clarify method names

The api_strings_mapping method isn't really only about api strings.. we
deal with database fields in and out.. we just happen to then use those
in to_api to map in the api.

This patch simply renames the standard method whilst we're still early.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33161: (follow-up) Consistent use of db fields throughout
Martin Renvoize [Thu, 9 Mar 2023 12:43:05 +0000 (12:43 +0000)]
Bug 33161: (follow-up) Consistent use of db fields throughout

We should stick to DB field names as long as possible to allow re-use
and only convert to api field names via to_api_mapping at the last
moment inside the parent to_api function.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33161: Add +strings support to GET /items and /items/:item_id
Tomas Cohen Arazi [Tue, 7 Mar 2023 23:51:35 +0000 (20:51 -0300)]
Bug 33161: Add +strings support to GET /items and /items/:item_id

This patch introduces the `api_strings_mapping` method to the
*Koha::Item* class, and makes the API spec for the following routes:

* GET /items
* GET /items/:item_id
* GET /acquisitions/orders

accept the new `+strings` parameter that can be passed through the
`x-koha-embed` header and was introduced by bug 26635. In the case of
/acquisitions/orders, you will need to use

x-koha-embed: items+strings

I introduce it here to highlight the flebility we introduced with bug
26635.

The `api_strings_mapping` method has its roots on the cool
`columns_to_str` method already present. The main differences:

* It is aware of the `public_read_list` for attributes so no hidden
  information is exposed.
* Attribute names get mapped for consistency with the API (e.g.
  `homebranch` is converted into `home_library_id`, etc).
* The data structure it returns includes information about the source
  for the descriptions (e.g. it it is an authorised value, then `type`
  will be `av`, and the related category information is returned so
  dropdowns and such can be built. The same goes for other types as
 `library`, `item_type` and `call_number_source`.

To test:
1. Apply this patch
2. Reload everything
3. Play with your favourite REST tool (e.g. Postman)
4. Try:
GET http://localhost:8081/api/v1/items
x-koha-embed: +strings
=> SUCCESS: You get a list of items, they include the new _strings
structure, and the contents make sense!
5. Repeat with a specific item:
GET http://localhost:8081/api/v1/items/14
x-koha-embed: +strings
=> SUCCESS: It all makes sense!
6. Sign off :-D

Sponsored-by: Virginia Polytechnic Institute and State University
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3831: Add a warning to about page when there is no FA framework
Nick Clemens [Fri, 3 Mar 2023 20:41:21 +0000 (20:41 +0000)]
Bug 3831: Add a warning to about page when there is no FA framework

The feature is effectively disab;ed throughout Koha when this framework
is deleted. There do not appear to be any other side effects.

We should report this on the about page for informatinal purposes

To test:
1 - Apply patch
2 - Check about page, no change
3 - sudo koha-mysql kohadev
    UPDATE biblio_framework SET frameworkcode = 'FB' WHERE
    frameworkcode = 'FA'
4 - Refresh about page
5 - Note new warning
6 - sudo koha-mysql kohadev
    UPDATE biblio_framework SET frameworkcode = 'FA' WHERE
    frameworkcode = 'FB'
7 - Refresh about page
8 - No warning

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33189: Make plugin upload look for .kpz files in file picker
David Cook [Fri, 10 Mar 2023 05:23:24 +0000 (05:23 +0000)]
Bug 33189: Make plugin upload look for .kpz files in file picker

This change configures the file picker to look for *.kpz files instead
of *.* files, which makes it more convenient to locate .kpz files
for upload when uploading plugins.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/plugins/plugins-upload.pl
2. Click on "Choose file"
3. Note that the file type in the box at the bottom right of the screen
defaults to "KPZ File (*.kpz)
4. If you navigate to a directory that contains .kpz files (like Downloads),
you'll now see directory folders and .kpz files.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32675: Fix guarantor selection when simple quote present
Jonathan Druart [Wed, 22 Feb 2023 15:31:54 +0000 (16:31 +0100)]
Bug 32675: Fix guarantor selection when simple quote present

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33173: Save and continue button in standard cataloging module broken
Nick Clemens [Wed, 8 Mar 2023 18:49:57 +0000 (18:49 +0000)]
Bug 33173: Save and continue button in standard cataloging module broken

To test:
1 - Edit a record in the standard editor
2 - Click on to tab 2
3 - Click 'Save and continue'
4 - Error: tab is not defined
5 - Apply patch
6 - Reload page and try again
7 - Fixed!

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32924: (follow-up) Add left margin to 'Show mine only' label
Pedro Amorim [Thu, 9 Feb 2023 15:14:52 +0000 (15:14 +0000)]
Bug 32924: (follow-up) Add left margin to 'Show mine only' label

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32924: Add the ability to filter agreement by logged in user
Jonathan Druart [Thu, 9 Feb 2023 13:00:56 +0000 (14:00 +0100)]
Bug 32924: Add the ability to filter agreement by logged in user

This patch adds a new filter checkbox at the top of the agreement list
"Show only mine" that will display agreements linked with the logged in
user.

Test plan:
Create several agreements, add your current logged in user to some of
them
On the agreement list view us the new checkbox to filter the agreements
and see those where you are involved in.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
19 months agoBug 31028: (follow-up) Remove special:undefined
Martin Renvoize [Tue, 7 Mar 2023 14:36:18 +0000 (14:36 +0000)]
Bug 31028: (follow-up) Remove special:undefined

There's a cleaner way to achieve this now using `additional_filters` and
passing a function.

This patch removes the `special:undefined` handling, replacing it with a
single field filter passed as a function via additional_filters.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31028: (follow-up) Fix executable bit
Martin Renvoize [Tue, 7 Mar 2023 13:30:02 +0000 (13:30 +0000)]
Bug 31028: (follow-up) Fix executable bit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31028: (follow-up) Fix missing whitespace on patron-title
Martin Renvoize [Tue, 7 Mar 2023 13:24:50 +0000 (13:24 +0000)]
Bug 31028: (follow-up) Fix missing whitespace on patron-title

This patch restores some missing whitespace in the patron-title include.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
19 months agoBug 32613: (follow-up) Cache the tables
Nick Clemens [Fri, 3 Mar 2023 16:43:54 +0000 (16:43 +0000)]
Bug 32613: (follow-up) Cache the tables

This shouldn't be expected to change, except maybe after an upgrade,
seems worth caching.

To test:
1 - Apply patch
2 - Confirm the feature still works

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32613: Add database tables to autocomplete
Jacob O'Mara [Wed, 1 Mar 2023 11:02:34 +0000 (11:02 +0000)]
Bug 32613: Add database tables to autocomplete

This patch adds a database call to get the table and column names in the
database and parse them into the autocomplete engine.

Test Plan:
As previous commit but also check for column/table names in the
autocomplete popup

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32613: Add autocomplete to SQL reports editor
Jacob O'Mara [Mon, 23 Jan 2023 16:03:20 +0000 (16:03 +0000)]
Bug 32613: Add autocomplete to SQL reports editor

This adds auto-complete for the sql reports editor codemirror instance.
To prevent a regression in syntax highlighting the overlay mode
'sqlPlaceholders' has been removed and replaced with a highlighting
engine that works correctly with the autocomplete engine.

Test Plan:
1. Navigate to reports and create a new sql report
2. Write an Sql query and observe that there is no autocomplete options
3. Apply patch
4. Write a new Sql query and observe that there are now auto-complete
   options that can be navigated through with the arrow keys and
   accepted with either tab or the enter keys.
5. Ensure that items bounded in << >> or [[ ]] are still syntax
   highlighted post-patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31794: (follow-up) Add description to authorities tag
Agustin Moyano [Wed, 7 Dec 2022 18:32:48 +0000 (15:32 -0300)]
Bug 31794: (follow-up) Add description to authorities tag

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31794: Add REST endpoint to get an authority
Agustin Moyano [Tue, 6 Dec 2022 20:07:02 +0000 (17:07 -0300)]
Bug 31794: Add REST endpoint to get an authority

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Get the id of an authority
4. Make a GET request to /api/v1/authorities/{authid} with one of the following content type header
  - application/json
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
  - text/plain
5. Check that you get the authority in the corresponding format
6. Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 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>
19 months agoBug 33071: Show tooltip when hovering on home icon in staff interface breadcrumbs
Owen Leonard [Wed, 1 Mar 2023 19:23:09 +0000 (19:23 +0000)]
Bug 33071: Show tooltip when hovering on home icon in staff interface breadcrumbs

This patch modifies the breadcrumbs WRAPPER in html_helpers.inc so that
the default "Home" link has a title attribute set to "Home."

To test, apply the patch and view any page which has been updated to use
the breadcrumbs WRAPPER. For example, cities administration, the
staff interface home page, the about page.

Hover your mouse over the house icon in the breadcrumb navigation and
you should see a "Home" tooltip.

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>
19 months agoBug 32679: Use different CSS classes for titles of article requests in staff interface
Katrin Fischer [Fri, 20 Jan 2023 13:51:53 +0000 (13:51 +0000)]
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>