Commit graph

49166 commits

Author SHA1 Message Date
1107d8dfe9
Bug 33438: Use template wrapper for breadcrumbs: Reports part 3
This patch updates several reports 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.

- Reports ->
  - Average loan time
    - Results
  - Circulation statistics
    - Results
  - Lost items
    - Results
  - Catalog by item type
    - Results

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-21 10:36:22 -03:00
29387c09aa
Bug 33555: Use template wrapper for breadcrumbs: Rotating collections
This patch updates rotating collections 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.

- Tools ->
  - Rotating collections
    - New rotating collection
    - Edit collection
    - Delete collection
    - Manage items
    - Transfer collection

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>
2023-04-21 10:36:22 -03:00
75f30ebd51
Bug 33558: Use template wrapper for breadcrumbs: Serials part 1
This patch updates several serials 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.

- Serials ->
  - Claims
    - Claims for a vendor
  - Check expiration
  - Subscription details ->
    - Serial collection
    - Create routing list
    - Edit routing list
    - Preview routing list

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>
2023-04-21 10:36:21 -03:00
449c51b08c
Bug 12029: DBRev 22.12.00.022
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:49 -03:00
3040b1bf39
Bug 12029: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:48 -03:00
806cbf8d8c
Bug 12029: Remove 'params' from filter_by_unread
It's not used and not needed, you can chain methods.

Also remove unused C4::Koha module and useless statement in tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:47 -03:00
Aleisha Amohia
368dfdc7d0
Bug 12029: Ability for patrons to dismiss OPAC messages
This enhancement adds the ability for patrons to dismiss an OPAC
message, marking it as read to remove it from their summary page.

To test:
1) Update database and restart services
2) Log into the staff interface and go to your patron account
3) Click the Add message button
4) Add a message for the OPAC and Save
5) Log into the OPAC. Note there is a message on the homepage saying you
have a message. Go to your user summary and confirm the message
displays.
6) Click the button to dismiss the message. A confirmation box should
pop up - hitting Cancel should stop the action.
7) Dismiss the message again and this time Confirm. Make sure the
message is gone from the OPAC user summary and from the homepage.
8) Confirm tests pass t/db_dependent/Koha/Patron/Messages.t
9) Create a few more messages for the OPAC
10) Log into the OPAC and dismiss one of the messages
11) Confirm the count of unread messages on the OPAC home page is
correct

Sponsored-by: Koha-US
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:46 -03:00
Aleisha Amohia
52f228c02a
Bug 12029: Tests
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:46 -03:00
Aleisha Amohia
56f16da47b
Bug 12029: Adding messages.patron_read_date column
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

JD Amended patch: Fix QA failure "File must have the exec flag"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:45 -03:00
165c6b3118
Bug 33103: DBRev 22.12.00.021
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:44 -03:00
b3fb8a7a15
Bug 33574: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:43 -03:00
a79c81b926
Bug 33103: Prevent vendors to be displayed several times in the search result
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:42 -03:00
268a044222
Bug 33103: Fix accessibility issues
* Add spaces
* Add 'Add' and 'Remove' in addition of the icons
* Do not submit the form when enter is hit
* Fix translatability

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:41 -03:00
0e666d6c2a
Bug 33103: Deal with html tags
HTML tags won't be interpreted. However <script> will still break the
display, but it's by nature, JS will execute it even if it's in a
string.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:40 -03:00
1077514901
Bug 33103: Display the aliases in the dropdown list in ERM
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:40 -03:00
7c38f5811b
Bug 33103: Add REST API tests
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:39 -03:00
14e5e175fc
Bug 33103: Embed aliases in GET /vendors
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:38 -03:00
359780886e
Bug 33103: Make vendors searchable by aliases
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:37 -03:00
5e3980502b
Bug 33103: Add the ability to create vendor aliases
This patchset is adding the ability to create aliases for vendors. It
will then be easier to search for vendors.

* new DB table aqbookseller_aliases(id, vendor_id, alias)
* new pair of Koha classes Koha::Acquisition::Bookseller::Alias[es]
* new method to retrieve the aliases from the vendor
Koha::Acquisition::Bookseller->aliases
* The api spec changes to allow aliases to be embeded on
GET /acquisitions/vendors
* Add/Delete alias when editing a vendor
* Display the aliases on the vendor show view
* Search vendors by aliases
* Display the aliases in the dropdown list of the vendors in the ERM
module

Test plan:
- Create a vendor, add it some aliases
- Edit the vendor, remove some aliases
=> Behaviour must be consistent
- Search the vendor in the acquisition module by its aliases
=> The vendor must be returned in the result
- Go to the ERM module, add a new agreement or license
=> Notice that the dropdown list of the vendors is displaying the
aliases, that make vendors searchable by their aliases

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:36 -03:00
a387b37c1c
Bug 33103: Add tests for Aliases Koha classes
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:36 -03:00
07576588ff
Bug 33103: Koha classes
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:35 -03:00
5e3e75f123
Bug 33103: DB changes
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:34 -03:00
d1879136a2
Bug 33574: Correct pointer for restrict_type.code
Somehow this was missed during QA of bug 31095.. likely during a rebase.

Test plan:
1) Check that manual restriction types are now saved.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:33 -03:00
981eeff7ef
Bug 33447: Make *->pickup_locations methods throw an exception on missing parameter
This patch fixes the FIXME for making the methods throw an exception.

Tests are added, and POD is adapted as well.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/patrons* \
           t/db_dependent/api/v1/holds.t \
           t/db_dependent/Reserves* \
           t/db_dependent/Hold* \
           t/db_dependent/Koha/Hold* \
           t/db_dependent/Items*

=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:32 -03:00
ef8adf34fd
Bug 33447: (follow-up) Fix tests and make assumption explicit
The patches made an assumption that patron would always be passed. It is
within Koha, but not in the Biblios tests.

There is no scenario where we can determine pickup locations that are not in
reference to a patron (who is picking it up?) so we should always have
this parameter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-20 15:48:31 -03:00
5a39823dbc
Bug 33416: Fix Searchbar_spec.ts
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:56 -03:00
2167028025
Bug 33416: Fix Agreements.ts
<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:56 -03:00
Caroline Cyr La Rose
360963c959
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt
This patch corrects the HTML markup in order to reunite "Patron
identity" or "Organization identity" for translatability.

To test:
1. Apply patch
2. Update translation files
./misc/translator/translate update xx-XX
3. Check the xx-XX-staff-prog.po file, the line for memberentrygen.tt:275
   should look like

\#: koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:275
\#, c-format
msgid "Organization %sPatron %sidentity"
msgstr "Identité de l'organisme %sIdentité de l'utilisateur %s"

4. Optionally, translate the string, install translation and check the
   page (Patrons > New patron), trying a institutional patron and a
   regular patron
./misc/translator/translate install xx-XX

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>
2023-04-19 09:20:55 -03:00
1518569eaa
Bug 33447: (QA follow-up) Add comment for flushing cache
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:54 -03:00
89fb8f31ab
Bug 33447: Adjust tests
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>
2023-04-19 09:20:53 -03:00
55dc8573c7
Bug 33447: Add Cache to Biblio->pickup_locations
This is going to have the most effect on records with large numbers of items
held by the same library, serial records and the like

To test:
1 - Add 500 items to a biblio by select myltiple copies on the add item page
2 - Place a hold via the API and note response time, I found ~3-5 seconds
3 - Apply patch
4 - Restart all
5 - Place hold using api again
6 - Note improved response time, less than 1/2 a second in my tests

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>
2023-04-19 09:20:52 -03:00
a0ec93d84f
Bug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:52 -03:00
98adcf957b
Bug 33354: Show all form error messages in the warning dialog
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:51 -03:00
816b1a3e3f
Bug 33354: Add error if related user open but user is missing
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:50 -03:00
823fa8517d
Bug 33354: Add 'required' UI elements
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:49 -03:00
0411bf0573
Bug 33216: Catch and handle RegisterRequired exceptions for SIP fee paid messages
If registers are being used in Koha, they are required. If a SIP account has no register and a fee paid message is sent, the SIP server crashes and the client never gets a response. It would be much better if Koha would response with 38 response where "payment accepted" is N, and an AF field stating that the SIP account needs to be associated with a register.

Test Plan:
1) Enable UseCashRegisters, set RequireCashRegister to "always require a
   cash register". Do *not* set a cash register for the SIP account you
   will be testing with.
2) Using the SIP cli tester, send a fee paid message for a patron owing
   fees.
3) Note the lack of a SIP response
4) Apply this patch
5) Restart the SIP server
6) Repeat step 2, you should now get a SIP response with the error
   message in it!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:48 -03:00
bb30aab206
Bug 33483: Prevent 400 when more than 1 agreement is linked
We were passing package_agreements.agreement and the server returned
Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" }

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:48 -03:00
2e7ac09fe2
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:47 -03:00
d4204cb9c6
Bug 33483: Restore 'select'
We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:46 -03:00
9d1fe4591c
Bug 33483: Make KohaTable accept customizable actions button
We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:45 -03:00
e4d9246a6c
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:44 -03:00
c0b189ff0a
Bug 33483: Fix link EBSCO package with local agreements
Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-19 09:20:39 -03:00
cf83ec866c
Bug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron privacy to 2
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-17 09:55:48 -03:00
Magnus Enger
2ea5163970
Bug 23824: Add a "Save and run" button to reports
This will save one click every time you want to save and then run
a report.

To test:
- Apply this patch
- Create a new report
- Click the new "Update and run SQL" button
- Verify the report was saved and the results are displayed

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>
2023-04-17 09:39:45 -03:00
7fd06b8c3a
Bug 33038: Add classes to patroncategorycode for easier customization
To test:
1. Pull up a patron and look at the patroncategory inside the patronbriefinfo. Description and code are together in one HTML element, they are hard to seperate.
2. Apply patch.
3. Look again and notice the new classes.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-17 09:39:44 -03:00
Janusz Kaczmarek
68b2f29d48
Bug 33238: Fix bad suggestions query (Bug 29886 follow-up)
With IndependentBranches Koha explodes with Error 500 when a non
superlibrarian tries to add to basket from suggestions.  In errorlog you
would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Column 'branchcode' in where clause is
ambiguous".

Test plan:
==========
1. Have a Koha instance with IndependentBranches, some accepted
   suggestions, and a vendor defined.
2. Be a non superlibrarian librarian with permissions to
   manage acquisitions.
3. Create a new basket and try to add an item to the basket
   "From a suggestion".
4. Koha would generate error 500.
5. Apply the patch.
6. Try to add an item to the basket "From a suggestion".
7. You should succeed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-17 09:39:43 -03:00
1344050ab4
Bug 18829: (QA follow-up) Replace forbidden indirect syntax
This pattern is forbidden and was overlooked by QA.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-17 09:39:42 -03:00
Katrin Fischer
d95f31dcc6
Bug 18829: (QA follow-up) I18N, test character and breadcrumbs
* Removes a 'heart' character from the file, probably added for testing
* Corrects breadbrumbs to make QA test tool happy
* Makes JS message translatable (test by manipulating the link to an invalid record number in DOM)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-14 15:39:46 -03:00
768f587c7b
Bug 18829: (follow-up) Don't messup record encoding
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-14 15:39:45 -03:00
a730a76069
Bug 18829: (follow-up) Return 404 when record cannot be loaded
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-14 15:39:44 -03:00