]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30501: Fix typo in sysprefs.sql
Lucas Gass [Fri, 8 Apr 2022 21:08:51 +0000 (21:08 +0000)]
Bug 30501: Fix typo in sysprefs.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 14393: (QA follow-up) Add template filters
Kyle Hall [Thu, 31 Mar 2022 15:32:11 +0000 (11:32 -0400)]
Bug 14393: (QA follow-up) Add template filters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 14393: Add collection code filter to inventory
David Cook [Wed, 17 Jun 2015 04:50:14 +0000 (14:50 +1000)]
Bug 14393: Add collection code filter to inventory

This patch adds the ability to do inventory by collection.

_TEST PLAN_

Before applying:
1) Go to "Tools > Inventory/stocktaking"
2) Note that there is no "Collection code:" option

Optionally:
2b) You can create a Barcode file with a single barcode
2c) Don't select anything from "Select items you want to check" (or filter if you know
how to filter to make it faster... doesn't matter)
2d) Click "Submit" at the bottom of the screen
2e) Note that there is no "Collection code" column in the screen output or CSV output
(ie with/without the "Export to CSV file" box ticked before submitting)

Apply the patch.

After applying:
3) Note that there is a "Collection code" filter on the main inventory screen
4) Create a Barcode file with a single barcode for an item with a collection
and upload it using the "Choose file" button.
5) Select that item's collection code from the "Collection code" filter
6) Click "Submit"
7) Note that the screen output and the CSV output contains a "Collection code" column
(ie with/without the "Export to CSV file" box ticked before submitting)

Signed-off-by: kelly mcelligott <kpmcelligott@gmail.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30118: (QA follow-up) Fix Perl Critic issues
Kyle M Hall [Wed, 30 Mar 2022 16:34:55 +0000 (16:34 +0000)]
Bug 30118: (QA follow-up) Fix Perl Critic issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30118: Make holds_block_checkin in SIP behave like in Koha interface.
Matthias Meusburger [Wed, 17 Mar 2021 13:14:25 +0000 (14:14 +0100)]
Bug 30118: Make holds_block_checkin in SIP behave like in Koha interface.

In koha interface, a warning is displayed when an item on hold is returned
only if the return is for this specific item.

This patch does the same in SIP: the return is blocked when holds_block_checkin
is enabled and there is a hold on a specific item and this is the very item
being returned.

Test plan:

The following behavior is expected in SIP:

 - An item is returned, and there is a reservation on record-level: block
 - An item is returned, and there is a reservation on this very item: block
 - An item is returned, and there is a reservation on another item: allow

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30243: When branccode is required on OPAC suggestion page default to empty value
Lucas Gass [Wed, 9 Mar 2022 14:55:21 +0000 (14:55 +0000)]
Bug 30243: When branccode is required on OPAC suggestion page default to empty value

To test:
1. Apply patch
2. Go the purchase suggestion page and see that branchcode defaults to the first option in the list.
3. Go to OPACSuggestionMandatoryFields and mark branchcode as required
4. BAck on the OPAC suggestion page notice that the branchcode defaults to an empty value
5. Try to submit the form without changing it, you cannot. You must choose a branch

Signed-off-by: shiyao <shiyao@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29990: DBRev 21.12.00.025
Fridolin Somers [Fri, 8 Apr 2022 13:22:47 +0000 (15:22 +0200)]
Bug 29990: DBRev 21.12.00.025

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29990: (QA follow-up) Change class name and apply to heading, add -x to update
Nick Clemens [Wed, 30 Mar 2022 13:00:56 +0000 (13:00 +0000)]
Bug 29990: (QA follow-up) Change class name and apply to heading, add -x to update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29990: Show authority appropriate heading use on search results
Aleisha Amohia [Wed, 23 Sep 2020 05:33:29 +0000 (17:33 +1200)]
Bug 29990: Show authority appropriate heading use on search results

Authority heading use is based on authority MARC 008/14-16. This could
be useful to show on authority search results, if new system preference
ShowHeadingUse is enabled.

To test:

1. Apply patches, update database, restart services
2. Go to Koha Administration -> system preferences -> searching tab.
Notice new ShowHeadingUse system preference is disabled. Leave it
disabled for now.
3. Do an authority search. Confirm it works as expected and no new
information is shown since ShowHeadingUse is disabled.
4. Do a biblio search and edit a record. Go to one of the authority
fields (1xx, 6xx or 7xx) and launch the authority finder plugin. Do an
authority search and confirm it works as expected and no new information
is shown since ShowHeadingUse is disabled.
5. Go back to system preferences and enable ShowHeadingUse syspref.
6. Repeat steps 3 and 4 but confirm the 'Heading use' column now shows, and
correctly displays what the heading can be used for based on 008/14-16.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Jessica <jzairo@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29990: Add ShowHeadingUse system preference
Aleisha Amohia [Mon, 31 Jan 2022 11:11:11 +0000 (00:11 +1300)]
Bug 29990: Add ShowHeadingUse system preference

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29821: Compiled CSS
Fridolin Somers [Fri, 8 Apr 2022 13:16:31 +0000 (15:16 +0200)]
Bug 29821: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29821: Add interface for generating barcodes using svc/barcode
Owen Leonard [Fri, 7 Jan 2022 15:55:29 +0000 (15:55 +0000)]
Bug 29821: Add interface for generating barcodes using svc/barcode

This patch adds a new page providing an interface for generating
barcodes using svc/barcode. A form allows the user to choose various
parameters and see the resulting barcode image.

To test, apply the patch and rebuild the staff interface SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to the "Tools" home page. Follow the link to "Barcode image
  generator."
- On the barcode image generator page, confirm that there is a "Barcode
  image generator" link in the sidebar and that it is displayed with
  bold text.
- Test the features of the form:
  - Enter a numeric value in the "Barcode" field and tab out of the
    field or click "Show barcode" button. A barcode of type "Code39"
    should be shown with the text of the barcode included in the
    image below the barcode.
  - A text area below the barcode image should show the HTML used to
    generate the preview image.
    - Clicking in this textarea should automatically add the contents to
    the clipboard. You should be shown a message, "HTML copied to the
    clipboard."
  - Check the "hide text" checkbox. The barcode should be redisplayed
    without the text.
  - Check that changing the "barcode height" value is reflected
    correctly in the barcode image.
  - Try adding non-numeric data in the "Barcode" field. You should be
    shown an error message, "Barcodes of type [type]  must be numeric."
  - Test these other numeric barcode types: Code39, COOP2of5, EAN13,
    EAN8, IATA2of5, Industrial2of5, ITF, Matrix2of5, NW7, UPCA, and
    UPCE.

    Note that EAN13, EAN8, UPCA, and UPCE expect specific patterns. Test
    values (found here: https://barcode.tec-it.com/en/UPCE):

    EAN13: 978020137962
    EAN8: 9031101
    UPCA: 72527273070
    UPCE: 0123456

  - Change the barcode type to "QRcode."
    - The form should change, hiding the "Hide text" checkbox and
      showing a new ranger slider for "QR Code module size."
    - The barcode field should now be labeled "Text, URL, or barcode,
      etc"
    - The barcode field hint should change to a hint about QRcode
      dimensions.
    - Changing the "module size" slider should change the size of the
      generated QR code. As you change the slider the selected value
      should be reflected in the box.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20398: DBRev 21.12.00.024
Fridolin Somers [Fri, 8 Apr 2022 13:10:36 +0000 (15:10 +0200)]
Bug 20398: DBRev 21.12.00.024

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20398: (QA follow-up) Fix position of 'if' statement
Thibaud Guillot [Tue, 29 Mar 2022 13:37:01 +0000 (15:37 +0200)]
Bug 20398: (QA follow-up) Fix position of 'if' statement

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20398: (QA follow-up) Fix alphabetical order in sysprefs.sql
Katrin Fischer [Sun, 13 Feb 2022 12:45:33 +0000 (12:45 +0000)]
Bug 20398: (QA follow-up) Fix alphabetical order in sysprefs.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20398: Added a syspref to highlight or not highlight search terms in results...
ThibaudGLT [Wed, 8 Dec 2021 09:16:38 +0000 (09:16 +0000)]
Bug 20398: Added a syspref to highlight or not highlight search terms in results on the staff interface

There is a possibility on OPAC but not yet on the staff interface, so I added this syspref which has the same behaviour as the OPAC highlighting syspref.
When you choose to disable highlighting on the syspref, the toggle anchor in the result page does not appear at all.
But if you keep the default state (highlighting on), you still have the option to switch between "Unhighlight" and "Highlight" modes.

Test plan :
1. Go to the syspref named "StaffHighlightedWords" and see that the default state is "Highlight".
2. Look for something in the catalogue for example and see that the words are highlighted and that it is also possible to change between "Unhighlight" and "Highlight".
3. Go back to syspref and choose to disable highlighting by choosing "Don't Highlight".
4. Refresh your results page if you have not closed it or reload a new search.
5. There is no highlighting at all and anchors do not exist (same behaviour as the OPAC interface).

Signed-off-by: ManuB <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: DBRev 21.12.00.023
Fridolin Somers [Fri, 8 Apr 2022 13:06:03 +0000 (15:06 +0200)]
Bug 20517: DBRev 21.12.00.023

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: (QA follow-up) Add ability to override syspref with account level settings...
Kyle Hall [Wed, 30 Mar 2022 12:27:59 +0000 (08:27 -0400)]
Bug 20517: (QA follow-up) Add ability to override syspref with account level settings in SIP config file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: (follow-up) Add explanation to syspref and fix QA issues
Nick Clemens [Wed, 30 Mar 2022 11:09:04 +0000 (11:09 +0000)]
Bug 20517: (follow-up) Add explanation to syspref and fix QA issues

I added explanatory text to staff interface on the preference to explain how it works

Removed a debug warn in the _get_sort_bin routine

changed comparitor => comparator

fixed a missing call in the tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: (QA follow-up) Fix return undef.
Martin Renvoize [Thu, 27 Jan 2022 09:58:34 +0000 (09:58 +0000)]
Bug 20517: (QA follow-up) Fix return undef.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: Add support for specifying comparitor
Martin Renvoize [Thu, 27 Jan 2022 09:50:33 +0000 (09:50 +0000)]
Bug 20517: Add support for specifying comparitor

This patch adds support for specifying the comparison operator used in
the sort bin method. It allows for more complex cases where one may wish
to sort on groups of callnumbers for example.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: Add unit tests
Martin Renvoize [Thu, 27 Jan 2022 09:49:23 +0000 (09:49 +0000)]
Bug 20517: Add unit tests

This patch adds some unit tests for the new _get_sort_bin function.

We're testing that rules are applied in order and that the different
comparison operators work as expected.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 20517: Use the "sort bin" field in SIP2 Checkin Response
Magnus Enger [Fri, 24 Apr 2020 10:02:02 +0000 (12:02 +0200)]
Bug 20517: Use the "sort bin" field in SIP2 Checkin Response

This bug adds the SIP2SortBinMapping to make it possible to tell
the Koha SIP2 server to include a sort_bin/CL field in the
Checkin Response, if appropriate.

To test:
- Check out an item and return it via SIP2:
  $ telnet localhost 8023
  9300CNterm1|COterm1|CPCPL|
  09N20200422    12430020200422    124300APCPL|AOCPL|AB001|AC|
  (Where 001 in |AB001| is the barcode of the item in question)
- Check there is no CL field in the last response
- Apply the patch, fill in SIP2SortBinMapping with e.g.:
       CPL:itype:BK:3
- Repeat the first step
- Check the respons contains a CL field with a value of 3 (or what
  you put in the config). The field should look like |CL3|
- Signe ye offe

2020-06-25: Pass an item to _get_sort_bin, not a checkout. Rebase.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29059: Keep non-repeatable attribute from patron to preserve when merging
Jonathan Druart [Mon, 20 Sep 2021 14:59:37 +0000 (16:59 +0200)]
Bug 29059: Keep non-repeatable attribute from patron to preserve when merging

See bug 21648 comment 17.

Suggestion is to keep the non-repeatable patron's attribute from the patron we selected instead of raising a blocking error.

A side-effect will be that when several patrons are merged, the
non-repeatable attribute from the first one will be kept, which can
result in unexpected result if the original patron does not have the
attribute defined.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30076: Add ability to check patron messaging preferences from a notice
Kyle Hall [Thu, 10 Feb 2022 17:19:22 +0000 (12:19 -0500)]
Bug 30076: Add ability to check patron messaging preferences from a notice

Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking.

Test plan:
1) Apply this patch
2) Enable item checkout notices for a patron for email, but not sms
3) Include the following in the notice:
   TEST1: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %]
   <br/>
   TEST2: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %]
4) Generate a checkout and notice for that patron
5) Note the generated notice has a 1 for TEST1, but not for TEST2

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 21225: (QA follow-up) Update pref description of SyndeticsCoverImages
Katrin Fischer [Mon, 28 Mar 2022 21:21:31 +0000 (23:21 +0200)]
Bug 21225: (QA follow-up) Update pref description of SyndeticsCoverImages

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 21225: (follow-up) correct filters
Lucas Gass [Mon, 28 Mar 2022 17:19:25 +0000 (17:19 +0000)]
Bug 21225: (follow-up) correct filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 21225: (follow-up) Account for Syndetics lightbox
Lucas Gass [Wed, 16 Feb 2022 17:48:50 +0000 (17:48 +0000)]
Bug 21225: (follow-up) Account for Syndetics lightbox

To test:
-Make sure when you apply all the patches that when you click on the Syndetics image in the detail page that it correctly displays the lightbox.
-Turn on some other cover image services and make sure you can toggle through each of them.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 21225: (follow-up) Make SyndeticCovers work on catalog detail page
Lucas Gass [Tue, 15 Feb 2022 22:59:37 +0000 (22:59 +0000)]
Bug 21225: (follow-up) Make SyndeticCovers work on catalog detail page

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 21225: Add Syndetics cover images to staff client.
Lucas Gass [Tue, 15 Feb 2022 18:55:59 +0000 (18:55 +0000)]
Bug 21225: Add Syndetics cover images to staff client.

To test:
1 - Enable system preferences:
    SyndeticsEnabled
    SyndeticsCoverImages
    SyndeticsClientCode (you will need a valid code for testing)
2 - Perform a search on the staff client
3 - Check that results have images if upc,oclc number, or isbn existin record
4 - Confirm that dtails paeg displays same image
5 - Confirm size on details page follows syspref  SyndeticsCoverImageSize

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 22827: Add age dependency on other fields than dateaccessioned
Alex Buckley [Tue, 11 Jan 2022 15:11:37 +0000 (15:11 +0000)]
Bug 22827: Add age dependency on other fields than dateaccessioned

A new agefield has been added to the 'Automatic item modifications by
age' tool. The options for the agefield are: replacementpricedate, datelastborrowed,
datelastseen, damaged_on, itemlost_on, withdrawn_on

If no option is selected then Koha will default to saving 'agefield' =
items.dateaccessioned

Similarly, if a Koha instance has an old item rule without 'agefield'
defined then Koha will default to using 'items.dateaccessioned'.
This is confirmed by the AutomaticItemModificationByAge.t unit test.

Test plan:

1. Go to: Tools > Catalog > Automatic item modifications by age
2. Observe there is a new 'Age field' dropdown in the rule form.
3. Create a rule, set the values:
- 'Age in days' = 20
- Leave 'Age field' = 'Choose an age field'
- 'Substitutions': 'items.barcode' = 'test'
- Save the rule
4. Confirm the 'List of rules' page displays 'items.dateaccessioned in the 'Age field' column
5. Add another rule:
- 'Age in days' = 2
- 'Age field' = 'items.datelastseen'
- 'Substitutions': 'items.barcode' = 'test2'
- Save the rule
6. Confirm the 'List of rules' page displays 'items.datelastseen' in
the 'Age field' column for that second rule
7. Add some more rules and confirm you can delete them
8. Edit a record:
- Make the items.dateaccessioned = 3 day ago (so rule 1 is false)
- Make the items.datelastseen = 3 days ago (so rule 2 is true)
9. Run the automatic_items_modification_by_age.pl:
- sudo koha-shell <instance>
- cd misc/cronjobs
- ./automatic_item_modification_by_age.pl -v -c
10. Confirm the item has it's barcode set to 'test2'
11. Run unit tests:
- sudo koha-shell <instance>
- prove t/db_dependent/Items/AutomaticItemModificationByAge.t -v

Sponsored-By: Catalyst IT
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29609: Centralized code to build the link to a biblio detail page
Jonathan Druart [Wed, 1 Dec 2021 14:12:17 +0000 (15:12 +0100)]
Bug 29609: Centralized code to build the link to a biblio detail page

There are 2 prefs that control the default view of biblio detail pages:
IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC.
There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't
allow access to those page for staff members.

This code need to be in a single place to avoid discrepancy.

Test plan:
Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm
that the links of biblio point to the correct view.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27212: Add Table configuration to acqui-home.pl accounts table
Lucas Gass [Wed, 2 Feb 2022 23:36:58 +0000 (23:36 +0000)]
Bug 27212: Add Table configuration to acqui-home.pl accounts table

To test, apply the patch and clear your browser cache

1. Go to acqui-home.pl
2. Test that the "Columns" button works to show and hide columns.
3. Go to Administration -> Table settings and look under the Acquisitions tab for the page 'acq_acqui-home' and the table 'accounts'.
4. Hide each column and make sure it hides correctly on acqui-home.pl
5. Test the export options (Excel, CSV, etc) and make sure hidden columns do not show up.
6. Make sure the totals at the bottom of the screen can still be calculated

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30120: Save and apply extended attributes during self registration verification...
Nick Clemens [Thu, 17 Feb 2022 14:02:35 +0000 (14:02 +0000)]
Bug 30120: Save and apply extended attributes during self registration verification by email

The self registration form stores a new borrower as a borrower modification when verifying by email.

Borrower modifications can  handle extended attributes.

This patch simply sotres the extended attributes in the modifications table, and approves a modification
to the extended attributes only after patron is created

To test:
1 - Apply patch
2 - Create a patron attribute and set it as viewable/editable in the OPAC
3 - Set system preference PatronSelfRegistrationVerifyByEmail
4 - Reigster a new patron on the OPAC, provide an email and populate the extended attribute
5 - Retrieve the verification token, the last on in the messages table
    SELECT * FROM message_queue;
6 - Go tot he url from above
7 - Confirm successful patron creation
8 - View patron record and confirm attribute was set

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30011: Compiled CSS
Fridolin Somers [Thu, 7 Apr 2022 08:42:28 +0000 (10:42 +0200)]
Bug 30011: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30011: Update links to jQueryUI assets, remove datepicker references, etc.
Owen Leonard [Thu, 3 Feb 2022 15:58:38 +0000 (15:58 +0000)]
Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc.

This patch updates templates to include the new version of jQueryUI. It
removes some references to the now unused datepicker widget as well as
the jQuery timepicker addon.

Some minor JavaScript and style updates to fix issues resulting from the
upgrade.

To test, apply the patch and update the CSS in the staff interface AND
in the OPAC
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

IN THE OPAC:

 - The OPAC only uses the tabs jQueryUI widget.
 - View pages where tabs are used: Bibliographic details, user summary,
   advanced search.

IN THE STAFF INTERFACE:

 - The staff interface uses four jQueryUI widgets: accordion,
   autocomplete, sortable, and tabs
 - Test the accordion widget on two pages: Administration -> Table
   settings and Patrons -> Patrons requesting modifications.
 - Test autocomplete (requires PatronAutoComplete to be enabled) on
   various pages. For example:
   - From the "Check out" tab in the header search box.
   - From the "Search patrons" tab in the header search box, e.g. from
     the main Patrons page.
   - Place hold -> Search patrons.
   - Tools -> Patron lists -> Add patrons to list -> Patron search.
 - Test sortable:
   - Administration -> System preferences -> Language.
     - With more than one language installed you should be able to
       drag to re-order the enabled languages. Confirm that your change
       is saved successfully.
   - Administration -> MARC bibliographic framework -> MARC structure ->
     Edit subfields on a tag with multiple subfields. You should be able
     to drag to re-order the tabs at the top of the subfield constraints
     edit page. Confirm that your changes are saved successfully.
   - Cataloging -> New record. Test that you can re-order subfields
     under a tag with multiple subfields and that your changes are
     saved.
 - Tabs: View various pages with tabs: Check out, bibliographic details,
   basic MARC editor. They're everywhere.

Also confirm that the removal of the leftover datepicker doesn't affect
pages which use the calendar include: Test various pages which use
Flatpickr, e.g. check out, renew, reports, etc.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface
Owen Leonard [Thu, 3 Feb 2022 15:45:09 +0000 (15:45 +0000)]
Bug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface

This patch updates jQueryUI in the OPAC and staff interface. Old assets
are removed and new assets added.

jQueryUI has been re-compiled in each interface to include only the
required features. In the OPAC: tabs and tooltip. In the staff
interface: accordion, autocomplete, sortable, and tabs.

The next patch will make the required updates to templates.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29228: Use Flatpickr on offline circulation page
Owen Leonard [Fri, 29 Oct 2021 13:09:41 +0000 (13:09 +0000)]
Bug 29228: Use Flatpickr on offline circulation page

This patch replaces the use of jQueryUI datepicker on the built-in
offline circulation page, where it was used for the "Specify due date"
date-time picker as well as for formatting datetime values for display.

To test, apply the patch and go to Circulation -> Built-in offline
circulation interface.

 - Click "Synchronize."
 - Click "Download records."
 - Submit a card number for a patron who has multiple items checked out.
 - In the table of previous checkouts, confirm that dates in the "Date
   due" and "Checked out on" columns are formatted according to your
   TimeFormat and DateFormat system preferences.
 - When checking out to a patron with fines, open the fines tab and
   submit an amount in payment. The table of payments should include a
   correctly-formatted datetime.
 - Test that the "Specify due date" date picker works correctly and that
   checkouts show the correct date.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29787: Add plugin version to plugin search results
Tomas Cohen Arazi [Mon, 10 Jan 2022 12:03:26 +0000 (09:03 -0300)]
Bug 29787: Add plugin version to plugin search results

This patch adds a new column to plugins search results: 'Latest
version'.

It takes the tag_name in both GitHub and GitLab cases and passes it to
the template.

To test:
1. Have this on your koha-conf.xml file:

 <plugin_repos>
    <repo>
        <name>ByWater Solutions</name>
        <org_name>bywatersolutions</org_name>
        <service>github</service>
    </repo>
    <repo>
        <name>Theke Solutions</name>
        <org_name>thekesolutions</org_name>
        <service>gitlab</service>
    </repo>
    <repo>
        <name>PTFS Europe</name>
        <org_name>ptfs-europe</org_name>
        <service>github</service>
    </repo>
 </plugin_repos>

2. Restart all services:
   $ restart_all
3. Search for the term 'barclaycard'
=> SUCCESS: You get results from PTFS Europe (Github)
=> FAIL: They don't include plugin version
4. Search for the term 'innreach'
=> SUCCESS: You get results from Theke (Gitlab)
=> FAIL: They don't include plugin version
5. Apply this patch
6. Repeat 2-4
=> SUCCESS: Results show up
=> SUCCESS: Results include the plugin version
7. Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 11083: DBRev 21.12.00.022
Fridolin Somers [Thu, 7 Apr 2022 08:34:40 +0000 (10:34 +0200)]
Bug 11083: DBRev 21.12.00.022

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 11083: Add sample XSLT for UNIMARC authorities
Julian Maurice [Fri, 24 Dec 2021 08:38:24 +0000 (09:38 +0100)]
Bug 11083: Add sample XSLT for UNIMARC authorities

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 11083: Add ability to generate authority summary using XSLT
Julian Maurice [Wed, 2 Jun 2021 12:20:34 +0000 (14:20 +0200)]
Bug 11083: Add ability to generate authority summary using XSLT

This patch only affects authority search results in the staff interface.
It adds a new system preference AuthorityXSLTResultsDisplay. If set,
each authority search result MARCXML will be transformed using the XSLT
at the given filename or URL. The output will be displayed in place of
the default summary.
If errors occur, the XSLT is ignored and the default summary is
displayed.

The syspref value can contain {langcode} and {authtypecode} which will
be replaced by the appropriate value (resp. current language and
authority type code)

Test plan:
1. Apply patch and run updatedatabase
2. Verify that authority search results are not affected yet.
3. Create an XSLT file (for instance in
/home/koha/xslt/en/GEOGR_NAME.xsl)
4. Set AuthorityXSLTResultsDisplay syspref value to
/home/koha/xslt/{langcode}/{authtypecode}.xsl
5. Do an authority search that returns GEOGR_NAME results. Verify that
the summary matches what you expect from your XSLT
6. Do an authority search that returns authorities of other types.
Verify that the default summary is displayed.

Example of a minimal XSLT:

<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:marc="http://www.loc.gov/MARC21/slim"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output omit-xml-declaration="yes"/>
  <xsl:template match="marc:record">
    <xsl:element name="div">
      <xsl:attribute name="class">
        <xsl:text>authority-summary</xsl:text>
      </xsl:attribute>
      <xsl:value-of
        select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30402: Import authorities subroutines to ImportBatch script
Aleisha Amohia [Mon, 28 Mar 2022 16:37:30 +0000 (05:37 +1300)]
Bug 30402: Import authorities subroutines to ImportBatch script

The following authorities subroutines are used by the ImportBatch
script but are not accessible, because they aren't imported. This
caused MARC importing errors.
- GetAuthorityXML
- ModAuthority
- DelAuthority

These affected the BatchCommitRecords and BatchRevertRecords routines,
and it wasn't caught because there are no tests written for them.

To test:
1. Find an existing authority record, or import one to use.
2. Save this authority record (export/download).
3. Go to Admin -> Record matching rules. Create a new record matching
   rule for authorities that matches on 001, Local-Number index.
4. Go to Tools -> Stage MARC for import. Upload the authority file you
   just downloaded.
5. Change record type to authority.
6. Under 'Look for existing items in catalog?', set the record matching
   rule to the rule you just made which matches on 001. If matching
   record found, replace the existing one. If no match is found, ignore.
7. Stage the record. Once complete, a match should've been found.
8. Go to Staged MARC management.
9. Import the batch into the catalog. Notice it hangs and never
   completes.

10. Apply the patch and restart services.
11. Repeat steps 4-9. This time importing should be successful.

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29859: Fix BatchUpdateAuthority
Jonathan Druart [Wed, 6 Apr 2022 09:35:41 +0000 (11:35 +0200)]
Bug 29859: Fix BatchUpdateAuthority

Use of inherited AUTOLOAD for non-method Koha::BackgroundJob::BatchUpdateAuthority::ModAuthority() is
no longer allowed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29859: Fix club/enroll
Jonathan Druart [Tue, 5 Apr 2022 13:19:12 +0000 (15:19 +0200)]
Bug 29859: Fix club/enroll

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: (follow-up) Fix missing TT filters
Jonathan Druart [Tue, 5 Apr 2022 11:25:53 +0000 (13:25 +0200)]
Bug 30063: (follow-up) Fix missing TT filters

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Fix missing TT filters
Fridolin Somers [Tue, 5 Apr 2022 09:56:34 +0000 (11:56 +0200)]
Bug 30063: Fix missing TT filters

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: DBRev 21.12.00.021
Fridolin Somers [Mon, 4 Apr 2022 14:28:37 +0000 (16:28 +0200)]
Bug 30063: DBRev 21.12.00.021

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30395: Fix TT filtering of publicationyear in reserve/request.tt
Julian Maurice [Tue, 29 Mar 2022 11:27:10 +0000 (13:27 +0200)]
Bug 30395: Fix TT filtering of publicationyear in reserve/request.tt

biblioitems.publicationyear is not a date (it can be, but we cannot
guarantee that) so the $KohaDates filter should not be used on this data

Test plan:
1. Verify that in the default MARC framework there is a field linked to
   biblioitems.publicationyear (typically it's 210$d for UNIMARC)
2. Create a biblio with a non ISO-formatted date in this field. It
   can be a "YYYY" year for instance. Create an item for this biblio.
3. Try to place a hold on this biblio. If it works, you can sign off

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30345: Make Koha::BackgroundJob->enqueue set borrowernumber=undef if no userenv
Tomas Cohen Arazi [Wed, 23 Mar 2022 18:47:38 +0000 (15:47 -0300)]
Bug 30345: Make Koha::BackgroundJob->enqueue set borrowernumber=undef if no userenv

This patch makes ->enqueue set undef if no userenv is provided. The CLI
scripts will usually use Koha::Script and have this set to undef as
well, but on the tests, there's usually no userenv set unless we need to
test it. And as we are adding triggers everywhere, that will schedule
background jobs, it means we would end up mocking userenv or the
->enqueue method everywhere and it will get messy.

This patch just make it set undef.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/BackgroundJob.t
=> FAIL: Wow, it explodes badly. Same as any test that happens to
trigger a background job enqueuing.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Great, tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30345: Regression tests
Tomas Cohen Arazi [Wed, 23 Mar 2022 18:47:24 +0000 (15:47 -0300)]
Bug 30345: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30172: Enqueue the job even if rabbitmq is not reachable
Jonathan Druart [Thu, 24 Mar 2022 15:24:06 +0000 (16:24 +0100)]
Bug 30172: Enqueue the job even if rabbitmq is not reachable

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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30172: Prevent race condition when enqueuing a new task
Jonathan Druart [Thu, 24 Feb 2022 09:41:16 +0000 (10:41 +0100)]
Bug 30172: Prevent race condition when enqueuing a new task

As we are sending the job to the rabbitmq before in the transaction, the
worker can receive the job to process before the transaction committed.

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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30107: When editing desks default to the branch the desk belongs to
Lucas Gass [Wed, 9 Mar 2022 18:41:56 +0000 (18:41 +0000)]
Bug 30107: When editing desks default to the branch the desk belongs to

TO test:
1. Turn on UseCirculationDesks
2. Add some desks via Administration > Circulation desks, make several and have them belong to different libraries.
3. Go edit some of those desks and notice the Library: dropdown always defaults to the users logged in branch
4. Apply patch
5. Try editing desk again, now the dropdown should default the library that the desk belongs to.
6. Try making a new desk and make sure it defaults to the logged in branch

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26669: (QA follow-up) Update last run when report run by name
Nick Clemens [Wed, 30 Mar 2022 12:25:55 +0000 (12:25 +0000)]
Bug 26669: (QA follow-up) Update last run when report run by name

This alters the svc scripts to set the report id after fetchign the report object
to ensure it is passed to exectue query

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26669: Adjust POD
Nick Clemens [Wed, 30 Mar 2022 12:25:42 +0000 (12:25 +0000)]
Bug 26669: Adjust POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26669: Last Run if report not always updated
Fridolin Somers [Thu, 14 Jan 2021 15:46:25 +0000 (16:46 +0100)]
Bug 26669: Last Run if report not always updated

The last run of a report is updated only if method execute_query() is
called with report_id.
This whas missing for :
- when report is run publicly
- when report is sent by email
- when report is exported

Patch changes the method signature to use a hash of params, in order to
easily avoid some params.

Test plan :

1) Create a report.
2) Run report.
3) Check the report listing.  Confirm that the last run info on the report is updated.
4) Make report public.
5) Run report via public url.
6) Check the report listing.  Confirm that the last run info on the report IS NOT updated.
7) Schedule the report to run at a given time and e-mailed to an address.
8) After the report runs at the scheduled time, check the report listing.  Confirm that the last run info on the report IS NOT updated.
9) Run report.
10) Export results.
11) Check the report listing.  Confirm that the last run info on the report IS NOT updated AT THE TIME OF THE EXPORT.

Questionable (I don't know if this is addressed):
12) Run report on backend through a cron job and send results via e-mail.
13) Check the report listing.  Confirm that the last run info on the report IS NOT updated.

14) Apply patch.
15) Rerun steps 2-13.  Confirm that steps 3, 6, 8, 11, and 13 DO UPDATE the last run info.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26669: Avoid a warn in update_sql
Fridolin Somers [Thu, 14 Jan 2021 15:41:07 +0000 (16:41 +0100)]
Bug 26669: Avoid a warn in update_sql

In C4/Reports/Guided.pm update_sql() called by test suite return warn :
Use of uninitialized value $sql in substitution (s///)

Test plan :
Run prove t/db_dependent/Reports/Guided.t and see warning disapearing
(whouchhhh)

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30408: Make API and OpenAPI versions strings in spec
Tomas Cohen Arazi [Wed, 30 Mar 2022 12:07:20 +0000 (14:07 +0200)]
Bug 30408: Make API and OpenAPI versions strings in spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30394: Make datatables.js aware of x-koha-request-id
Tomas Cohen Arazi [Wed, 30 Mar 2022 11:57:39 +0000 (13:57 +0200)]
Bug 30394: Make datatables.js aware of x-koha-request-id

This patch makes the wrapper handle the data.draw parameter (from
DataTables) translating it into the x-koha-request-id header for making
the Koha request, and then translates the received header into data.draw
for proper use in DataTables.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30394: Add x-koha-request-id support on API routes
Tomas Cohen Arazi [Wed, 30 Mar 2022 11:54:24 +0000 (13:54 +0200)]
Bug 30394: Add x-koha-request-id support on API routes

This patch adds the x-koha-request-id to all GET routes that rely on
objects.search, for immediate support for the header.

The patch itself is trivial:
- It adds the header parameter definition to the top level swagger.yaml
- It adds a reference on each route that already implements q params,
  etc

To test:
1. Apply the patch
2. Reload plack
3. Notice the API still works
4. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/query.t
=> SUCCESS: It now passes! The /cities route implements the
x-koha-request-id header pass through.
5. Run the rest of the API tests
=> SUCCESS: All good
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30394: Add x-koha-request-id handling in controllers
Tomas Cohen Arazi [Wed, 30 Mar 2022 11:45:48 +0000 (13:45 +0200)]
Bug 30394: Add x-koha-request-id handling in controllers

This patch adds 'x-koha-request-id' to the reserved param names list,
and makes the objects.search helper read it and send it back in the
response headers.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30394: Unit tests
Tomas Cohen Arazi [Wed, 30 Mar 2022 11:43:50 +0000 (13:43 +0200)]
Bug 30394: Unit tests

This patch adds tests for checking the x-koha-request-id header is
returned on GET routes that have it enabled, and then the request
includes it.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/query.t
=> FAIL: The feature is not implemented, tests fail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28610: Elasticsearch 7 - hits.total is now an object
Kevin Carnes [Tue, 8 Feb 2022 13:48:19 +0000 (14:48 +0100)]
Bug 28610: Elasticsearch 7 - hits.total is now an object

In Elasticsearch 7 hits.total is now an object which is not always an exact
value. You can always get an exact total by adding a track_total_hits
parameter set to true when using the Elasticsearch search method

To test:
1) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
2) If you observe an error about types, apply patch for bug 25669
3) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4) Observe that tests with count fail
5) Apply patch
6) Observe that tests with count pass
7) Sign off

Sponsored-by: Lund University Library
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30377: Fix two CGI::param called in list context-warnings
Marcel de Rooy [Mon, 28 Mar 2022 12:07:43 +0000 (12:07 +0000)]
Bug 30377: Fix two CGI::param called in list context-warnings

Trivial fix.

Test plan:
Delete two lines from opac search history.
Verify results. Check plack-opac-error.log.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 22038: Fix excel export if CurrencyFormat is FR
Didier Gautheron [Fri, 11 Dec 2020 09:46:04 +0000 (10:46 +0100)]
Bug 22038: Fix excel export if CurrencyFormat is FR

DataTables excel export is broken if number decimal separator is a comma.

Test plan:
1 - Set syspref CurrencyFormat to US
2 - Export as excel a table with decimal numbers, patrons list with fines
for example.
3 - Open in libreoffice or excel, numbers are ok.
4 - Set syspref CurrencyFormat to FR
5 - Export and open again, number are wrong 25,10 is imported as 2510
6 - Apply patch
7 - Redo 1 to 4
8 - Excel export, number is 25,10

Signed-off-by: hakam <hakam@inlibro.com>
Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) JS translatability, clean warns, other
Aleisha Amohia [Mon, 14 Feb 2022 12:51:04 +0000 (01:51 +1300)]
Bug 13952: (follow-up) JS translatability, clean warns, other

Also addresses QA test tools, perldoc in ImportExportFramework.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) fixing indentation and rebasing
Aleisha Amohia [Fri, 4 Dec 2020 01:43:14 +0000 (14:43 +1300)]
Bug 13952: (follow-up) fixing indentation and rebasing

Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) Removing XML options
Aleisha Amohia [Tue, 21 Apr 2020 07:22:28 +0000 (07:22 +0000)]
Bug 13952: (follow-up) Removing XML options

Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) Tests
Aleisha Amohia [Thu, 14 Feb 2019 03:18:43 +0000 (03:18 +0000)]
Bug 13952: (follow-up) Tests

Run:
prove -v t/db_dependent/ImportExportFramework.t and confirm all tests
pass.

I've also added a fix to remove the warns when exporting in ODS format.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) template filters, moving js to separate file
Aleisha Amohia [Wed, 5 Dec 2018 21:33:48 +0000 (21:33 +0000)]
Bug 13952: (follow-up) template filters, moving js to separate file

This patch adds filters to the template file and moves the JS into a
separate file.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) Fixing export on default biblio framework
Aleisha Amohia [Tue, 24 Oct 2017 20:46:13 +0000 (20:46 +0000)]
Bug 13952: (follow-up) Fixing export on default biblio framework

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) Fixing import for default auth type
Aleisha Amohia [Thu, 19 Oct 2017 23:57:13 +0000 (23:57 +0000)]
Bug 13952: (follow-up) Fixing import for default auth type

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: (follow-up) Fixing authority type import
Aleisha Amohia [Mon, 19 Jun 2017 01:00:19 +0000 (01:00 +0000)]
Bug 13952: (follow-up) Fixing authority type import

This patch fixes the comments from Comment 29 and the import
functionality. You should now be able to import an exported file without
editing the file at all and the authority type code will be overwritten
in the file (same behaviour as biblio frameworks).

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 13952: Import and export authority types
Aleisha [Tue, 26 Jan 2016 23:39:26 +0000 (23:39 +0000)]
Bug 13952: Import and export authority types

This patch amends C4::ImportExportFramework to work for authority types as well as MARC frameworks.
New file: admin/import_export_authtype.pl
Update: Ensuring we are passing the right column to the right tables.
Update2: Making the error messages the same to be consistent with patch on Bug 15665
Update3: Fixing merge conflicts
Update4: Fixing merge conflicts and removing tabs
Update5: Getting rid of warns, making sure Import and Export of default
authority will work
Update6: Merge conflicts and making sure export of default auth type
works
Update7: Fixing merge conflicts and updating buttons to bootstrap3

To test:
1) Go to Admin -> Authority types
2) Confirm there are two new columns 'Export' and 'Import' in the table
3) Click 'Export' on an existing authority type and choose a file type, click 'Export'
4) Confirm that the authority type is exported as your chosen file type. Save the file
5) Create a new authority type
6) Import into your new authority type using the file you just exported
7) Confirm you are taken to auth_tag_structure.pl
8) Go back to Authority types
9) Export your new authority type. View the exported file and confirm
the authtypecode has been updated to match the code you set for the new
auth type
10) Click 'Import' next to any existing authority type and attempt to import a file that is not XML, CSV or ODS. Confirm that this fails and you are asked to import a file of the correct file type
11) Confirm Export and Import work for the Default authority type
12) Go to Admin -> MARC bibliographic framework
13) Confirm that the 'Export' and 'Import' functions still work here as well

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30222: Remove warning
Jonathan Druart [Fri, 25 Mar 2022 08:05:18 +0000 (09:05 +0100)]
Bug 30222: Remove warning

Use of uninitialized value in string ne at misc/cronjobs/automatic_renewals.pl line 193.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30222: Further simplify logic
Nick Clemens [Tue, 15 Mar 2022 13:34:39 +0000 (13:34 +0000)]
Bug 30222: Further simplify logic

For any borrower, we are either:
1 - following their preference, and that should set 'wants_email'
OR
2 - Never sending / following the cron, and can determine 'wants_email'
    from the 'send_notices' variable

This patch adds an 'else' if not using preferences to accomplish this

Follow test plan on previous patches

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30222: Simplify logic for reporting
Nick Clemens [Fri, 11 Mar 2022 13:24:33 +0000 (13:24 +0000)]
Bug 30222: Simplify logic for reporting

This patch adds two new variables:
$wants_email and $wants digest

These are used to simplify checks on whether notices should be sent

To test:
1 - Apply patch
2 - Confirm notices are not sent of pref is 'cron' and send_notcies flag not set
3 - Confirm notices are sent if pref is cron and send_notices flag is set and borrower
    does not have preference set for auto renewals
4 - Confirm notices not sent if pref is set to follow messaging preference and borrower
    does not have preferences set for auto_renewals
5 - Confirm regular notices sent if pref is set to follow messaging preferences and borrower
    does have the preference set but not digest
6 - Confirm digest notices sent if pref is set to follow messaging preferences and borrower
    does have the preference set and wants digest

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30222: Only send auto renewal digest wehn there is an update
Nick Clemens [Fri, 11 Mar 2022 12:00:26 +0000 (12:00 +0000)]
Bug 30222: Only send auto renewal digest wehn there is an update

Currently, the code sends an email to the patron when there is any error that is not
'too_soon' - we also don't include issues that are 'too_soon', so emials may be missing information

This patch changes the code to:
1 - push all issues that were checked to the report when a borrower wants a digest
2 - adds a variable to track when any of the issues has been updated, and checkes this when
    sending digests
3 - if nothing has been updated, no report is sent to the patron

To test:
 1 - Checkout an item, marked for autorenewal, backdated to be overdue to a patron
 2 - Set preferences
    AutoRenewalNotices = 'according to patron messaging preferences'
    EnhancedMessagingPreferences = 'Allow'
 3 - Set the patrons preference for auto renewal to email+digest
 4 - Ensure the patron has an email
 5 - Place an item level hold for another patron on the issued item
 6 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
 7 - Check patron record/notices tab
 8 - Note item not renewed, patron notified
 9 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
10 - Note item not renewed, status not changed, patron notified again
11 - Apply patch
12 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
13 - Item not renewed, patron no notified
14 - Checkout another item marked for auto renewal to the patron, but due in the future
     ensure it is outside of 'no renewal before'
15 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
16 - Patron not notified, items not renewd
     Change to status of 'auto_too_soon' is not notified
17 - Checkout a third item, marked for auto renew, overdue
18 - place an item level hold for another patorn on third item
19 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
20 - patron is notified, nothing renewed, all statuses reported
21 - cancel the item level hold on third item
22 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
23 - item renewed, patron notified, all statuses reported
24 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
25 - nothing renewed, patron not notified, only change is one issue 'auto_too_soon'

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30003: Prevent double up of point-of-sale items
Jake Deery [Tue, 8 Feb 2022 11:40:06 +0000 (11:40 +0000)]
Bug 30003: Prevent double up of point-of-sale items

This patch prevents the double submission of point-of-sale items when form validation fails at the first submission

Test plan
 1.  Navigate to /cgi-bin/koha/pos/pay.pl
 2.  Add an item from 'items to purchase'
 3.  Under 'collect payment', click submit without altering the form
 4.  See 'This field is required.'
 5.  Now, fill a value in 'Amount tendered' that satisfies or exceeds 'Amount being paid'
 6.  The payment should succeed
 7.  Navigate to /cgi-bin/koha/pos/register.pl
 8.  See duplicate lines in Transactions
 9.  Apply patch
10.  Repeat 2-6
11.  Navigate to /cgi-bin/koha/pos/register.pl
12.  Confirm only a single line was added

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29576: (QA follow-up) Rename road type to street type to match patron form
Katrin Fischer [Sun, 27 Mar 2022 00:05:02 +0000 (00:05 +0000)]
Bug 29576: (QA follow-up) Rename road type to street type to match patron form

This changes the pref description so the field name matches what
we use in the patron form.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 34874: Add streettype and B_streettype to PrefillGuaranteeField
Didier Gautheron [Thu, 25 Nov 2021 14:39:14 +0000 (15:39 +0100)]
Bug 34874: Add streettype and B_streettype to PrefillGuaranteeField

To test :
 1) modify PrefillGuaranteeField system preference
 2) road type for main and alternate addresses aren't in the list
 3) Apply patch
 4) Redo 1, now they are

https://bugs.koha-community.org/show_bug.cgi?id=29576
Signed-off-by: The Minh Luong <the-minh.luong@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29517: Check if agerestriction field is mapped before fetching biblio
Nick Clemens [Thu, 18 Nov 2021 12:03:36 +0000 (12:03 +0000)]
Bug 29517: Check if agerestriction field is mapped before fetching biblio

This patch simply adds a check of cached values to see if agerestriction enabled before
fetching the biblio object

To test:
1 - prove -v t/db_dependent/Holds.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30114: Koha offline circulation will always cancel the next hold when issuing...
Kyle Hall [Tue, 15 Feb 2022 16:33:33 +0000 (11:33 -0500)]
Bug 30114: Koha offline circulation will always cancel the next hold when issuing item to a patron

If a record has holds on it, and, using offline circulation, an item on
that is checked out to a patron that did not have a hold on the record,
the next hold that would have trapped that item will be canceled.

1) Place two bib level holds on an item for two patrons
2) Find a third patron, note his or her cardnumber
3) Create the file test.koc by copying and pasting the following into a
   text editor

Version=1.0 Generator=kocTest GeneratorVersion=0.7
2008-06-11 12:24:11 547 issue PATRONCARDNUMBER ITEMBARCODE

note the fields are tab delemited, ensure the tabs do not get lost
when copying and pasting!

4) Upload the offline circ action, and commit the action
5) Note the item was checked out to the third patron
6) Note one of the other patron's holds were canceled
7) Reset your database
8) Apply this patch
9) Test again, no hold should be canceled!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30114: Add Unit Tests
Kyle Hall [Mon, 7 Mar 2022 14:07:14 +0000 (09:07 -0500)]
Bug 30114: Add Unit Tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29501: Use the default transport
Tomas Cohen Arazi [Mon, 21 Mar 2022 16:45:16 +0000 (13:45 -0300)]
Bug 29501: Use the default transport

This patch makes the script pass the default SMTP transport to the
->send_or_die call.

The default is picked as this is the current behavior. New enhancements
could add the *library_id* to the message_queue table, and allow using
different transports depending on that. But it is out of the scope of
this bug.

To test:
1. Verify messages are being sent.
2. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
JD amended patch: revert
-        unless $format =~ m[^html$|^csv$|^ods$];
+        unless $format =~ m/^html$|^csv$|^ods$/;
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29501: (follow-up) Remove unused MIME::QuotedPrint dependency
Tomas Cohen Arazi [Tue, 8 Mar 2022 11:36:56 +0000 (11:36 +0000)]
Bug 29501: (follow-up) Remove unused MIME::QuotedPrint dependency

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29501: Remove MIME::Lite dependency
Tomas Cohen Arazi [Thu, 18 Nov 2021 12:41:44 +0000 (09:41 -0300)]
Bug 29501: Remove MIME::Lite dependency

The library usage is discouraged by the current maintainer and we don't
use it in the codebase anymore.

To test:
1. Apply this patch
2. Run:
   $ git grep MIME::Lite
=> SUCCESS: No uses of the removed library
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29501: Make gather_print_notices.pl use Koha::Email
Tomas Cohen Arazi [Thu, 18 Nov 2021 12:40:22 +0000 (09:40 -0300)]
Bug 29501: Make gather_print_notices.pl use Koha::Email

This patch makes the cronjob script use Koha::Email and thus relying on
configured SMTP settings instead of just trying localhost.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 30425: April fools 🐟: Add ponies to staff homepage"
Fridolin Somers [Mon, 4 Apr 2022 07:46:47 +0000 (09:46 +0200)]
Revert "Bug 30425: April fools 🐟: Add ponies to staff homepage"

This reverts commit 68b56685c74779a2859e13cbccf340c892544d2d.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Compiled CSS
Fridolin Somers [Fri, 1 Apr 2022 08:18:22 +0000 (10:18 +0200)]
Bug 30063: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30404: Enlarge all patron search pop-ups
Jonathan Druart [Thu, 31 Mar 2022 08:30:22 +0000 (10:30 +0200)]
Bug 30404: Enlarge all patron search pop-ups

Enlarging the pop-ups will hide the scrollbars (at least the horizontal
one).

Test plan:
Search for patrons (when a new pop-up is opened) and confirm that the
pop-up is bigger than without this patch.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Fix QA issues
Jonathan Druart [Thu, 31 Mar 2022 12:43:50 +0000 (14:43 +0200)]
Bug 30063: Fix QA issues

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Sort by "Name" surname:firstname
Jonathan Druart [Wed, 30 Mar 2022 15:31:38 +0000 (17:31 +0200)]
Bug 30063: Sort by "Name" surname:firstname

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Fix permission for GET /patrons
Jonathan Druart [Wed, 30 Mar 2022 11:37:40 +0000 (13:37 +0200)]
Bug 30063: Fix permission for GET /patrons

edit_borrowers should be enough, we don't need the whole borrowers
module flag

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Fix start with
Jonathan Druart [Wed, 30 Mar 2022 11:34:01 +0000 (13:34 +0200)]
Bug 30063: Fix start with

It was doing "end with"...

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Restore back behaviour
Jonathan Druart [Wed, 30 Mar 2022 11:02:07 +0000 (13:02 +0200)]
Bug 30063: Restore back behaviour

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Sort by "Name" firstname,surname
Jonathan Druart [Wed, 30 Mar 2022 08:28:34 +0000 (10:28 +0200)]
Bug 30063: Sort by "Name" firstname,surname

As it's how it's displayed

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Fix table settings
Jonathan Druart [Tue, 29 Mar 2022 08:28:43 +0000 (10:28 +0200)]
Bug 30063: Fix table settings

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30063: Be more flexible for filters
Jonathan Druart [Wed, 23 Mar 2022 16:36:50 +0000 (17:36 +0100)]
Bug 30063: Be more flexible for filters

On later follow-ups (ERM) we need to filter columns that contain AVs,
and so be more flexible. Here we are expecting a _id and _str keys we
are gonna use to build the select's options

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>