]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 28768: Fix borrowernumber from opac-readingrecord.tt
Jonathan Druart [Fri, 5 Nov 2021 08:30:31 +0000 (09:30 +0100)]
Bug 28768: Fix borrowernumber from opac-readingrecord.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28768: (QA follow-up) Remove unused variable
Nick Clemens [Fri, 30 Jul 2021 12:12:17 +0000 (12:12 +0000)]
Bug 28768: (QA follow-up) Remove unused variable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28768: remove unnessesary template variable
Lucas Gass [Tue, 27 Jul 2021 18:08:12 +0000 (18:08 +0000)]
Bug 28768: remove unnessesary template variable

To test:
1. Add some news that should display on opac-readingrecord.pl. For example: opacheader, OpacCustomSearch, opaccredits
2. Go to opac-readingrecord.pl, the news doesn't display
3. Apply patch, restart_all
4. Go to opac-readingrecord.pl, the news displays
5. Turn on 'opacreadinghistory' and test to make sure it still works

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29180: DBRev 21.06.00.044
Jonathan Druart [Fri, 5 Nov 2021 11:16:53 +0000 (12:16 +0100)]
Bug 29180: DBRev 21.06.00.044

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29180: (QA follow-up) Don't alter old DB up date
Nick Clemens [Fri, 5 Nov 2021 10:03:34 +0000 (10:03 +0000)]
Bug 29180: (QA follow-up) Don't alter old DB up date

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29180: (QA follow-up) Alphabetize sysprefs.sql
Nick Clemens [Fri, 5 Nov 2021 10:02:32 +0000 (10:02 +0000)]
Bug 29180: (QA follow-up) Alphabetize sysprefs.sql

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29180: Rename syspref RequestOnOpac with OPACHoldRequests
Jonathan Druart [Thu, 4 Nov 2021 13:39:28 +0000 (14:39 +0100)]
Bug 29180: Rename syspref RequestOnOpac with OPACHoldRequests

It is a confusing name because we have 'Article Request' as a feature,
and this does not follow Koha terminology.

Test plan:
`updatedatabase` and confirm that the syspref has been renamed
`git grep RequestOnOpac` => No occurrence in the code

QA: The syspref's value is always retrieved using Koha.Preference from
.tt files, we don't need to send it from controllers or C4::Auth

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29386: DBIC schema changes
Jonathan Druart [Fri, 5 Nov 2021 11:12:52 +0000 (12:12 +0100)]
Bug 29386: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29386: DBRev 21.06.00.043
Jonathan Druart [Fri, 5 Nov 2021 11:10:30 +0000 (12:10 +0100)]
Bug 29386: DBRev 21.06.00.043

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29386: Extend background_jobs.data to LONGTEXT
Jonathan Druart [Thu, 4 Nov 2021 09:44:28 +0000 (10:44 +0100)]
Bug 29386: Extend background_jobs.data to LONGTEXT

TEXT is too small, we must extend it to allow bigger jobs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29265: Add missing category parameter
Jonathan Druart [Fri, 5 Nov 2021 10:50:09 +0000 (11:50 +0100)]
Bug 29265: Add missing category parameter

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 26326: Add missing +x flag
Jonathan Druart [Thu, 4 Nov 2021 08:25:34 +0000 (09:25 +0100)]
Bug 26326: Add missing +x flag

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29261: Add missing html filters
Jonathan Druart [Thu, 4 Nov 2021 08:24:59 +0000 (09:24 +0100)]
Bug 29261: Add missing html filters

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29265: Add option to pick editor when creating a new content entry
Owen Leonard [Mon, 25 Oct 2021 18:55:53 +0000 (18:55 +0000)]
Bug 29265: Add option to pick editor when creating a new content entry

This patch changes the "New entry" button on the additional contents
page to be a split button which offers the alternative of the
non-default editor (as defined by AdditionalContentsEditor).

Also changed: I moved some of the template logic around to consolidate
handling of the editor variables.

To test, apply the patch and go to Tools -> HTML customizations.

 - At the top of the page there should be a split button. The dropdown
   option should offer the non-default editor.
 - If AdditionalContentsEditor is set to "text editor," clicking the
   "main" part of the button should take you to an entry page which uses
   the text editor.
   - The dropdown part of the button should say "New entry using
      WYSIWYG editor."
 - Switch the AdditionalContentsEditor preference and confirm that the
   button reflects the change.
 - Confirm that the individual "Edit" buttons for each existing content
   entry still works correctly according to the system preference.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29201: Add option to insert biblio_framework runtime parameter in SQL report
Owen Leonard [Thu, 28 Oct 2021 11:00:29 +0000 (11:00 +0000)]
Bug 29201: Add option to insert biblio_framework runtime parameter in SQL report

This patch modifies the SQL report creation process so that the list of
runtime parameters includes an option for bibliographic framework.

To test, apply the patch and go to Reports -> Create from SQL.

- Click the "Insert runtime parameter" menu button and select
  "Bibliographic framework."
- You should be shown a modal dialog in which you can change the label
  on the framework input.
- Click "Insert parameter." The SQL field should now contain the correct
  parameter, e.g. <<Framework|biblio_framework>>
- Use the parameter to define an SQL query, e.g.

  "SELECT * FROM biblio WHERE frameworkcode =
  <<Framework|biblio_framework>> LIMIT 10"

- Run the report. You should be asked to choose a framework. Confirm
  that the report runs correctly.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29369: Use Flatpickr in dateaccessioned cataloging plugin
Owen Leonard [Fri, 29 Oct 2021 10:47:03 +0000 (10:47 +0000)]
Bug 29369: Use Flatpickr in dateaccessioned cataloging plugin

This patch udpates the dateaccessioned cataloging plugin to use the
Flatpickr date picker instead of jQueryUI.

To test, apply the patch and open an item for editing in Cataloging.

- The date acquired field (952$d) should have flatpickr styling.
- Clicking in the field should populate the field with today's date and
  trigger the calendar popup.
- Clicking the "..." next to the field should populate the field (when
  empty) with today's date.
- Verify that tabbing from a different field into the date acquired
  field behaves the same as a click.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28982: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:02:59 +0000 (15:02 +0100)]
Bug 28982: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28982: (follow-up) Ensure that date format is correctly checked
Owen Leonard [Mon, 4 Oct 2021 17:33:31 +0000 (17:33 +0000)]
Bug 28982: (follow-up) Ensure that date format is correctly checked

This patch modifies the global calendar include so that it doesn't use
the potentially-undefined template variable "dateformat."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28982: Use Flatpickr on onboarding pages
Owen Leonard [Thu, 9 Sep 2021 14:10:57 +0000 (14:10 +0000)]
Bug 28982: Use Flatpickr on onboarding pages

This patch replaces the use of jQueryUI's datepicker in the onboarding
templates. The addition of calendar.inc to the template requires that
some additions be made to the installer's header files, adding the i18n
JavaScript assets.

jQueryUI-specific CSS is removed from installer.scss, and inclusion of
Flatpickr's SCSS is added.

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

- Start the installation process.
- Continue through the installation process until you reach the stage in
  onboarding where you are creating a patron category.
- The "Enrollment period -> Until" field should be a Flatpickr calendar
  widget. The widget should look and work correctly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28816: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:02:46 +0000 (15:02 +0100)]
Bug 28816: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28816: Improve the display of multiple holds during hold process
Owen Leonard [Thu, 5 Aug 2021 18:02:29 +0000 (18:02 +0000)]
Bug 28816: Improve the display of multiple holds during hold process

This patch updates the appearance of the "confirm holds" page, shown
during the process of placing a hold for someone in the staff interface.

Most of the changes affect the appearance of the page when placing
multiple holds on titles which have one or more holds on them already.

The changes are intended to make the page clearer and easier to scan,
especially when placing multiple holds at once.

Also changed: The page heading when placing multiple holds now changes
based on whether you've selected a patron or not. It says "Search
patrons or clubs" when it's waiting for a patron/club selection. It says
"Place holds" after the patron/club has been selected. This is instead
of "Confirm holds" on both pages.

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

- Go to Administration -> System preferences and set HoldsSplitQueue to
  "nothing."
- Perform a search in the staff client catalog and place multiple holds
  titles from that result set on hold for a patron.
- Perform the same search and select one or more of the titles you
  selected before in addition to one or more titles with no holds.
- After clicking the "Place hold" button you should see a page with the
  heading "Search patrons or clubs" showing information about existing
  holds. This section of the page should be clear and readable, with
  clear distinction between each section of information about each hold.
- Test this page again under each different option for the
  "HoldsSplitQueue" system preference by changing the preference and
  reloading the page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28694: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:02:35 +0000 (15:02 +0100)]
Bug 28694: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28694: Check alert in cataloguing should be a static message
Owen Leonard [Fri, 8 Oct 2021 15:31:46 +0000 (15:31 +0000)]
Bug 28694: Check alert in cataloguing should be a static message

This patch modifies the basic cataloging interface so that form
validation errors are collected in a static "dialog" at the top of the
page instead of showing in a transient JavaScript alert.

The text of the message is roughly the same as it was in the alert, and
links have been added so that the user can click to jump directly to the
field referenced.

If the user scrolls down away from the static error message, a button
appears in the floating toolbar to jump back to the message.

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

- Go to Cataloging and create a new record using the basic cataloging
  editor and a framework which has multiple mandatory fields defined
  (e.g. an unmodified default framework)
- Without entering anything in mandatory fields, click the "Save"
  button.
- You should see a message box appear at the top of the page.
  - It should list each missing mandatory subfield and tag, each with a
    "Go to field" link next to it.
  - Clicking the "Go to field" link should switch you to the correct tab
    and scroll the mandatory field into view.
- When you have scrolled down far enough for the error messages to be
  offscreen, an "Errors" button should appear in the floating toolbar.
  Clicking it should scroll the box back into view.
- The JS function for scrolling to a particular element on the screen
  has been modified, so test that the links in the toolbar for
  individual tags still work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28537: (follow-up) Correct and improve OverDrive checkout modal
Owen Leonard [Fri, 17 Sep 2021 15:15:55 +0000 (15:15 +0000)]
Bug 28537: (follow-up) Correct and improve OverDrive checkout modal

This patch corrects the markup of the modal which is displayed when the
user clicks the "Download as" button in their list of OverDrive
checkouts. The modal markup had not been updated in the conversion to
Bootstrap 4.

I have also modified the markup generated when listing the download
format options so that they use some standard Bootstrap 4 classes,
improving the layout a little.

To test you must have valid credentials entered in system preferences
for the OverDrive API. You should test using a patron who has holds and
current checkouts in OverDrive.

Apply the patch and log in to the OPAC.

- On the "Your summary" page, open the "OverDrive Account" tab.
  - Log in to your OverDrive account.
  - In the list of current checkouts, click the "Download as" button for
    one of the titles.
    - A modal window should display with a list of radio buttons for
      each available format.
      - Confirm that the format text acts as the label for the radio
        button.
      - Confirm that closing the modal without making a selection works
        correctly.
      - Confirm that making a selection and submitting the form closes
        the modal and submits your choice.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28537: Improve HTML generated by OverDrive integration
Owen Leonard [Wed, 9 Jun 2021 15:43:50 +0000 (15:43 +0000)]
Bug 28537: Improve HTML generated by OverDrive integration

This patch makes changes to the way HTML is generated when showing
output from OverDrive integration:

- Buttons have Bootstrap button classes
- Layout of information is improved.
- Handling of cover image thumbnails is improved, especially in cases
  where images were much larger than expected.
- An OverDrive-specific CSS file is added.

To test you must have valid credentials entered in system preferences
for the OverDrive API. You should test using a patron who has holds and
current checkouts in OverDrive.

Apply the patch and log in to the OPAC.

- On the "Your summary" page, open the "OverDrive Account" tab.
  - Log in to your OverDrive account.
  - The contents of the tab should display well, with item
    thumbnails showing in a column to the left, and item information
    showing to the right.
  - Controls should be styled with standard Bootstrap style.
  - Confirm that operations work correctly: Acessing titles, checking
    in, canceling holds, etc.

- Perform a catalog search which will return results also found in your
  OverDrive collection.
  - Open the OverDrive results page.
  - The page should display correctly, especially thumbnails.
  - Confirm that operations work correctly: Checking out and placing
    holds.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28450: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:02:16 +0000 (15:02 +0100)]
Bug 28450: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28450: Make Account summary print tables configurable
Owen Leonard [Tue, 12 Oct 2021 10:32:05 +0000 (10:32 +0000)]
Bug 28450: Make Account summary print tables configurable

This patch adds table settings for the three tables which appear on the
patron's "Print summary" view. This will allow the administrator to
set a default configuration for columns on the print summary page.

To test, apply the patch and restart-all to load the revised columns
settings YAML. Rebuild the staff interface SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Administration -> Table settings -> Circulation.
- Under the "Circulation tables" heading you should see a "Jump to" link
  to "print_summary."
- In the settings for the print_summary page you should see three
  tables: print-summary-checkouts, print-summary-fines, and
  print-summary-holds.
- Locate a patron account which has checkouts, fines, and holds.
  - From the patron detail view click "Print -> Print summary."
  - A new window should open with the print summary view. All tables
    should display correctly.
  - Test that the "Columns" buttons work correctly to show and hide
    columns.
- Make changes to the default settings for these tables to confirm that
  they work on the print summary page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27823: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:01:46 +0000 (15:01 +0100)]
Bug 27823: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27823: List upcoming steps during installation process
Owen Leonard [Fri, 15 Oct 2021 12:26:16 +0000 (12:26 +0000)]
Bug 27823: List upcoming steps during installation process

This patch adds text to each step of the installation process showing
which steps have been completed, which step is current, and which steps
come next. This helps the user know where they are in the process.

To test, apply the patch and begin the process of installing Koha. In my
testing environment I drop the Koha database and create it again.

On each step of the installation process, confirm that the list of steps
is correct, showing the right stage in the process.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27296: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:01:21 +0000 (15:01 +0100)]
Bug 27296: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27296: Return claims should be filtered by default to show unresolved claims
Owen Leonard [Mon, 9 Nov 2020 19:36:22 +0000 (19:36 +0000)]
Bug 27296: Return claims should be filtered by default to show unresolved claims

This patch modifies the DataTables configuration of the return claims
table on the checkout and patron detail pages. Using the footerCallback
function, the count of resolved and unresolved claims is calculated and
used to filter the list of claims to show only unresolved claims by
default.

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

- If necessary, Enable claims returned functionality by defining a value
  in the ClaimReturnedLostValue system preference.
- Open for checkout a patron who has items checked out.
- From the table of checkouts, click "Claim returned" for one or more
  items.
  - As you mark items "Clamed returned," the the items should appear
    under the "Claims" tab. The corresonding filter links should be
    updated accordingly, "Show all X claims."
  - Mark one or more claims resolved. As you do so they should disappear
    from the list of claims. The filter links should be updated to
    reflect that there are some resolved and some unresolved claims.
  - Clicking each filter link should trigger the correct filter.
  - Test this process when the count of unresolved claims is zero and
    when the cound of resolved claims is zero.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/checkouts.js for
  translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:1086
  msgid "Show 1 claim"
  msgid_plural "Show all {count} claims"
  msgstr[0] ""
  msgstr[1] ""

- Edit the "msgstr" strings however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client and
  repeat the test plan above. The translated strings should appear.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29015: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 14:01:06 +0000 (15:01 +0100)]
Bug 29015: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29015: (QA follow-up) Change collection code to be just collection
Katrin Fischer [Wed, 27 Oct 2021 14:09:52 +0000 (14:09 +0000)]
Bug 29015: (QA follow-up) Change collection code to be just collection

We did some clean-up in that area a little while ago, agreeing that
as we acutally display the descriptions, the label should be just
"collection".

This patch also removes some ():

Before:
4 items found for Centerville and item type:(Books) and collection: (Reference) and shelving location: (General Stacks)

Now:
4 items found for Centerville and item type: Books and collection: Reference and shelving location: General Stacks

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29015: (follow-up) Default to logged in branch unless viewing queue
Nick Clemens [Wed, 15 Sep 2021 17:17:28 +0000 (17:17 +0000)]
Bug 29015: (follow-up) Default to logged in branch unless viewing queue

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29015: (follow-up) Show sidebar filter form with results
Owen Leonard [Wed, 15 Sep 2021 12:14:19 +0000 (12:14 +0000)]
Bug 29015: (follow-up) Show sidebar filter form with results

This patch adds the new filter form in the sidebar when showing results.
To do so the form markup is moved into a BLOCK so that it can be reused.

This patch also adds pre-selection of submitted options on the filter
form so that it reflects the user's choices.

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

- Go to Circulation -> Holds queue.
- Submit the form with one or more filters selected.
- On the results page the queue should be correctly filtered and the
  sidebar should show your search fields preselected.
- Test with the CircSidebar preference enabled and disabled. The
  circulation menu should appear correctly, with the filter form only
  displaying in the sidebar after submitting the form.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29015: Unit tests
Nick Clemens [Wed, 15 Sep 2021 10:34:15 +0000 (10:34 +0000)]
Bug 29015: Unit tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD Amended patch: perltidy!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29015: Add options for itemtype, collection, and shelving location to view_holdsq...
Nick Clemens [Tue, 14 Sep 2021 19:29:27 +0000 (19:29 +0000)]
Bug 29015: Add options for itemtype, collection, and shelving location to view_holdsqueue.pl

This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code

This also remove the 'post' method from the form to allow easy bookmarking

To test:
1 - Add holds to your system
2 - Run the holds queue builder
3 - Browse to Circulation->Holds queue
4 - Note the library dropdown
5 - Apply patch
6 - Reload and note new options
7 - Test that both limits and 'All' options work as expected
8 - Note that description at top includes options when selected
    "### items found for All libraries and item type:(Books)"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 26326: DBRev 21.06.00.042
Jonathan Druart [Wed, 3 Nov 2021 14:07:07 +0000 (15:07 +0100)]
Bug 26326: DBRev 21.06.00.042

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 26326: DBIC Schema changes
Nick Clemens [Wed, 19 May 2021 12:54:16 +0000 (12:54 +0000)]
Bug 26326: DBIC Schema changes

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 26326: (follow-up) Add ability to check for existence of any primary key
Nick Clemens [Tue, 30 Mar 2021 15:08:09 +0000 (15:08 +0000)]
Bug 26326: (follow-up) Add ability to check for existence of any primary key

Before dropping a primary key we need to see if one exists - this updates
the installer method to allow searching for existence of key

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 26326: (follow-up) Address qa script failures

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 26326: Add Koha Objects for Import Records and Import Record Matches
Nick Clemens [Mon, 31 Aug 2020 16:47:51 +0000 (16:47 +0000)]
Bug 26326: Add Koha Objects for Import Records and Import Record Matches

To test:
1 - Apply patches
2 - Update database
3 - Generate schema files (dbic)
4 - prove -v t/db_dependent/Koha/Import/Records.t
5 - prove -v t/db_dependent/Koha/Import/Record/Matches.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD Amended patch: remove unused unset_chosen method

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: DBRev 21.06.00.041
Jonathan Druart [Wed, 3 Nov 2021 14:04:06 +0000 (15:04 +0100)]
Bug 27360: DBRev 21.06.00.041

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: Prevent crash if branchcode does not exist
Jonathan Druart [Wed, 3 Nov 2021 13:39:17 +0000 (14:39 +0100)]
Bug 27360: Prevent crash if branchcode does not exist

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: Add hint to input field
Katrin Fischer [Wed, 27 Oct 2021 04:37:19 +0000 (04:37 +0000)]
Bug 27360: Add hint to input field

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: (follow-up) Mark public as boolean
Martin Renvoize [Mon, 1 Nov 2021 08:21:09 +0000 (08:21 +0000)]
Bug 27360: (follow-up) Mark public as boolean

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: Use 'public' to filter libraries for opac display
Martin Renvoize [Wed, 27 Oct 2021 13:54:43 +0000 (14:54 +0100)]
Bug 27360: Use 'public' to filter libraries for opac display

This patch adds the ability to set a library as 'public' or not; this
allows librarians to hide back office library branches from the opac.

Test plan
1/ Set a library as public from `admin > libraries`.
2/ Navigate to the `Libraries` page in the OPAC
3/ Note that only `public` libraries are displayed.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: DBIC Build
Martin Renvoize [Wed, 27 Oct 2021 13:49:01 +0000 (14:49 +0100)]
Bug 27360: DBIC Build

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27360: Add public field to branches table
Martin Renvoize [Wed, 27 Oct 2021 13:48:16 +0000 (14:48 +0100)]
Bug 27360: Add public field to branches table

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 25883: (follow-up) Update columns_settings
Martin Renvoize [Mon, 1 Nov 2021 08:30:44 +0000 (08:30 +0000)]
Bug 25883: (follow-up) Update columns_settings

Replace 'holdinglibrary' with 'transferlibrary' in checkedin
columns_settings description.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 25883: Replace 'holdingbranch' with 'transfer to' in returns
Martin Renvoize [Tue, 27 Apr 2021 13:10:27 +0000 (14:10 +0100)]
Bug 25883: Replace 'holdingbranch' with 'transfer to' in returns

This patch replaces the "Holding library" column in the returns table
with a 'Transfer to' column that displays the destination for the item
awaiting transfer if a transfer exists.

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27173: Add tests
Marcel de Rooy [Tue, 28 Sep 2021 13:39:58 +0000 (13:39 +0000)]
Bug 27173: Add tests

Test plan:
Run t/db_dependent/Koha/Plugins/authority_hooks.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27173: Add plugin hooks for authority record changes
Marcel de Rooy [Tue, 8 Dec 2020 14:54:00 +0000 (15:54 +0100)]
Bug 27173: Add plugin hooks for authority record changes

2021-09-28 Updated version

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks
Kyle M Hall [Thu, 27 May 2021 13:53:01 +0000 (09:53 -0400)]
Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks

It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters.

Test Plan:
1) Apply this patch
2) Install Kitchen Sink plugin v2.2.0 or later
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/download/v2.2.0/dev-koha-plugin-kitchen-sink-2.2.0.kpz
3) Run misc/cronjobs/process_message_queue.pl with any or all non-email
   related paramters
4) Note the plugin output shows the parameters were passed to the plugin

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 24406: Wrap patron category type code in a span on patron search results
Katrin Fischer [Sun, 22 Aug 2021 14:20:55 +0000 (14:20 +0000)]
Bug 24406: Wrap patron category type code in a span on patron search results

The patron category type code (A, C, O, ...) is currently displayed in the
patron module search and the patron card creator and acquisition patron searches.

This information is not useful for most users, as these are internal codes
that cannot be easily "decoded". And while you might be able to guess A as
Adult in English, it doesn't translate to other languages.

This patch wraps a span around the patron category type code shown
in () after the patron category.

To test:
- Verify for each of the following three searches, that the patron category code
  displays in the search results, but is wrapped in a span with the class
  patron_category_type
- Tools > Patron card creator
  - New > New card batch > Add patrons
  - Search for patrons
- Patrons
  - Search for patrons
- Acquisitions
  - Add a budget
  - Add a fund for the budget
  - Search for a user or owner to add

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28417: Don't require C4::Auth_with_cas from opac-user if not needed
Jonathan Druart [Wed, 3 Nov 2021 12:43:11 +0000 (13:43 +0100)]
Bug 28417: Don't require C4::Auth_with_cas from opac-user if not needed

Note that without the use URI::QueryParam statement in C4::Auth we get:
Can't locate object method "query_param_delete" via package "URI::_generic" at /kohadevbox/koha/C4/Auth.pm line 1254

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28417: (follow-up) Fix typo
Tomas Cohen Arazi [Fri, 29 Oct 2021 19:17:17 +0000 (16:17 -0300)]
Bug 28417: (follow-up) Fix typo

- There are CAS demo servers, pick one [1]
- They all seem to have the same user/pass as of writing this:
  User: casuser
  Password: Mellon

To test:
1. Enable CAS and all related preferences. I chose v3 or higher, it only affects the logout action.
2. Set the CAS URL: https://casserver.herokuapp.com/cas (note that if you click on any of the examples, they include a trailing /login, don't put it).
3. Generate a Koha user, with userid: casuser (I also used that for cardnumber, just in case). Set no password to the user, or its irrelevant anyway. Add it stff permissions.
4. Open your Koha OPAC, I use KTD thus:
   http://kohadev.myDNSname.org:8080
5. Try to login using CAS
=> SUCCESS: You are redirected to the right login page
6. Login using casuser/Mellon as advertised in the 'demos' site.
=> SUCCESS: You are logged in!
7. Now logout
=> SUCCESS: You are sent to CAS so they know you wanted to logout (if you enabled CAS logout)
8. Repeat on the staff interface.
=> SUCCESS: Things work!
9. Apply this patches, restart all the things:
   $ restart_all
10. Repeat all in OPAC and admin interfaces
=> SUCCESS: Things work!
11. Sign off :-D

[1] https://apereo.github.io/cas/Demos.html

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28417: Don't use C4::Auth_with_cas if CAS is not used
Jonathan Druart [Fri, 21 May 2021 12:26:29 +0000 (14:26 +0200)]
Bug 28417: Don't use C4::Auth_with_cas if CAS is not used

We should follow the same pattern as ldap and not use C4::Auth_with_cas
if the cas syspref is not turned on.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27375: Set YAML file settings in .editorconfig
Johanna Raisa [Mon, 11 Jan 2021 07:49:45 +0000 (09:49 +0200)]
Bug 27375: Set YAML file settings in .editorconfig

To test:
1) Start an editor that supports .editorconfig.
2) Open YAML file mappings.yaml for example.
3) Format the file.
4) Observe that nothing changes.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28879: Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 12:36:27 +0000 (13:36 +0100)]
Bug 28879: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28879: Fix display of request metadata
Andrew Isherwood [Wed, 18 Aug 2021 14:07:54 +0000 (15:07 +0100)]
Bug 28879: Fix display of request metadata

This commit adjusts the CSS surrounding the display of request
metadata, it improves the display for metadata with long key names.

Test plan:

- Do not apply patch
- Create a FreeForm ILL request with a custom metadata field with a long
  name
- View the created request
- Observe that the long metadata name breaks the display of the metadata
- Apply the patch
- View the created request
  => TEST: Observe that the display is no longer broken

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 26402: Add --framework parameter to commit_file.pl
Andreas Jonsson [Mon, 7 Sep 2020 09:31:58 +0000 (09:31 +0000)]
Bug 26402: Add --framework parameter to commit_file.pl

This patch adds the option to pass a frameworkcode to the commit_file.pl
script.

To test:
1. Stage a MARC file using stage_file.pl.  For instance using the devbox:

   cd ~/kohaclone
   sudo koha-shell -c 'perl misc/stage_file.pl --file t/db_dependent/www/data/marc21record.mrc' kohadev

2. Note the assigned batch number and commit the batch using --framework parameter to commit_file.pl.  For example using the devbox:

   sudo koha-shell -c 'perl misc/commit_file.pl --batch-number 1 --framework ACQ' kohadev

3. Verify that the framework code was correctly assigned:

   sudo koha-mysql kohadev -e 'SELECT frameworkcode FROM biblio ORDER BY timestamp DESC LIMIT 1;'
=> SUCCESS: It picked it

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28973: Improve Koha::Patron::can_see_patron_infos efficiency
Kyle M Hall [Wed, 8 Sep 2021 12:31:47 +0000 (08:31 -0400)]
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency

The method can_see_patron_infos looks up a row in the branches table by branchcode just to get the branchcode it already has. This seems inefficient.

Test Plan:
1) Apply this patch
2) No changes should be noted

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28365: (Bug 19873 follow-up) Make it possible to search on value 0
Fridolin Somers [Mon, 17 May 2021 14:20:41 +0000 (16:20 +0200)]
Bug 28365: (Bug 19873 follow-up) Make it possible to search on value 0

Bug 19873 fixed search with value 0.
It works in first page but not in other pages.

This patch fixes query_cgi var.

Test plan:
  - create a st-numeric index in zebra conf related to
    a numeric field
    i.e:
    yourindex 1=yourindex 4=109
  - fill a field with 0 in several biblio records,
  - reindex your biblios,
  - search yourindex=0 and go to second page of results,
  - should not work,
  - apply this patch,
  - test again,
  - should work

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28365: Add unit test
Fridolin Somers [Mon, 17 May 2021 14:15:19 +0000 (16:15 +0200)]
Bug 28365: Add unit test

Run prove t/db_dependent/Search.t

Without fix you get error :
    #   Failed test 'buildQuery should keep 0 value in query_cgi'
    #   at t/db_dependent/Search.t line 670.
    #          got: 'idx=su%2Cphr'
    #     expected: 'idx=su%2Cphr&q=0'

This patch also adds a test for query_desc in case it is broken in the
future.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29380: Correct table name in joins to prevent errors
Joonas Kylmälä [Sat, 30 Oct 2021 19:02:39 +0000 (19:02 +0000)]
Bug 29380: Correct table name in joins to prevent errors

The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the joins were not updated accordingly so a
few scripts got broken.

To test:
 1) Notice that
    $ perl misc/cronjobs/automatic_renewals.pl -c -s -v
    returns 255 error code on exit
 2) Apply patch
 3) Notice the automatic_renewals.pl works now and exit code is 0
 4) Make sure /cgi-bin/koha/tools/batch_extend_due_dates.pl works.
 5) Try to grep for 'borrower' in Koha source code and see if there
    are any other join done using the Koha::Checkout or
    Koha::Old::Checkout objects.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29380: (follow-up) Fix renewal feature in staff interface

The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the usage in the renew.pl script was not
updated.

To test:
 1) Try to renew a book in intranet through the renewal tab
 2) Notice it gives error
 3) Apply patch
 4) Notice the error is now gone

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28236: Allow access to json files from apache config
Johanna Raisa [Thu, 2 Sep 2021 09:22:51 +0000 (12:22 +0300)]
Bug 28236: Allow access to json files from apache config

This patch grants json files from koha-tmpl. Otherwise systempreferences won't be able to fetch them.

TEST PLAN:

1) Try to set systempreference BorrowerUnwantedField.
2) The modal is empty.
3) Modify Apache configurations like in this patch.
4) Try again set the systempreference.
5) The modal should show list of parameters.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD Amended patch: replace tab characters and reword commit title

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 24850: Correctly handle suspended_until for PUT
Jonathan Druart [Wed, 3 Nov 2021 11:05:42 +0000 (12:05 +0100)]
Bug 24850: Correctly handle suspended_until for PUT

if we are passing suspended_until to the body, it should be a rfc3339 (what the spec is expecting)
but $hold->suspend_until will be iso

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 24850: Date only are not RFC3339
Jonathan Druart [Wed, 3 Nov 2021 09:06:35 +0000 (10:06 +0100)]
Bug 24850: Date only are not RFC3339

We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (YYYY-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be YYYY-MM-DD, without fallback.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 24850: suspended_until is a date-time
Tomas Cohen Arazi [Wed, 3 Nov 2021 09:55:19 +0000 (06:55 -0300)]
Bug 24850: suspended_until is a date-time

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 24850: Fix api/v1/holds.t
Jonathan Druart [Wed, 3 Nov 2021 09:44:14 +0000 (10:44 +0100)]
Bug 24850: Fix api/v1/holds.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29395: use EXPORT_OK from Koha::Patron::Debarments
Jonathan Druart [Wed, 3 Nov 2021 08:55:54 +0000 (09:55 +0100)]
Bug 29395: use EXPORT_OK from Koha::Patron::Debarments

Missed from bug 17600.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29261: (bug 15812 follow-up 3) Fix translation issue in include file
Jonathan Druart [Tue, 2 Nov 2021 08:42:05 +0000 (09:42 +0100)]
Bug 29261: (bug 15812 follow-up 3) Fix translation issue in include file

This is getting messy. No idea how I tested the previous patches but it
was not working, the problem still persisted.

This patch is using the I18N TT plugin to make things easier and fix the
original problem.

Test plan:
Apply the patch
perl translate update fi-FI
Edit misc/translator/po/fi-FI-messages.po
Locate and translate "Check out"
 61 #: koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt:20
 62 msgid "Check out"
 63 msgstr "Laina"
Locate and transate "View"
 182 #: koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt:22
 183 msgid "View"
 184 msgstr "Nayta"
Apply the change to the fi-FI templates
perl translate install fi-FI

Now enable the fi-FI in the lang syspref, search for patron and confirm
that the result view is displayed correctly.
Note that the "Check out" and "View" strings are correctly translated
(when you hover the cardnumbers or patron's names)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28901: (follow-up) Compiled CSS
Jonathan Druart [Wed, 3 Nov 2021 12:36:04 +0000 (13:36 +0100)]
Bug 28901: (follow-up) Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28729: Additions to POD
Martin Renvoize [Fri, 29 Oct 2021 12:22:59 +0000 (13:22 +0100)]
Bug 28729: Additions to POD

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28729: Unit tests
Martin Renvoize [Tue, 19 Oct 2021 15:57:10 +0000 (16:57 +0100)]
Bug 28729: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28729: Make Koha::Email->send_or_die handle returnpath
Martin Renvoize [Tue, 19 Oct 2021 15:57:25 +0000 (16:57 +0100)]
Bug 28729: Make Koha::Email->send_or_die handle returnpath

Koha used to rely on Mail::Sendmail for sending emails. As an SMTP
client, the library would extract the from address from the Sender
header to pass along in the MAIL FROM: field of the SMTP protocol [1].

This was overlooked when we moved to Email::Stuffer/Email::Simple and
there's a different behavior as it expects the envelope to be passed and
falls back to extracting the 'From' header when said envelope is not
found [2].

This patchset re-introduces the behavior from Mail::Sendmail by
overriding the send_or_die method locally (in Koha::Email) and doing the
right thing.

Unless an explicit {from} parameter is passed, it extracts the MAIL FROM
envelope from the Sender header, as Mail::Sendmail did, and calls
$self->SUPER::send_or_die with the right parameters.

To test:
1. Apply the unit tests
2. Run:
   $ kshell
   k$ prove t/Koha/Email.t
   => FAIL: Sender is not handled correctly!
3. Apply this patch
4. Repeat 2
   => SUCCESS: Tests pass!
   The from parameter is correct!
   No Sender header sent!
5. Sign off :-D

[1] https://metacpan.org/dist/Mail-Sendmail/source/lib/Mail/Sendmail.pm#L284
[2] https://metacpan.org/pod/Email::Sender::Manual::QuickStart#envelope-information

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
AMENDED (SHORTENED)
-        my @headers = $self->email->header_str_pairs;
-        foreach my $pair ( pairs @headers ) {
-            my ( $header, $value ) = @$pair;
-            $args->{from} = $value if $header eq 'Sender';
-        }
-
-        # Remove the Sender header
-        $self->email->header_str_set('Sender');
+        $args->{from} = $self->email->header_str('Sender');
+        $self->email->header_str_set('Sender'); # remove Sender header

Tested with same results (scrambled domains):
From: noreply@mydevserver.com
Cc: marcel@email.nl
To: test@somewhere.nl
Reply-To: bieb@mydevserver.com
Return-Path: postmaster@mydevserver.com

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28904: Fix typo and display
Martin Renvoize [Mon, 1 Nov 2021 09:52:26 +0000 (09:52 +0000)]
Bug 28904: Fix typo and display

Fix typo in template: Newletter => Newsletter
Fix latest newsletter editor definition.. it's a has not an array.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28904: Update team list to include newsletter editors
Martin Renvoize [Wed, 27 Oct 2021 14:37:07 +0000 (15:37 +0100)]
Bug 28904: Update team list to include newsletter editors

It seems we stopped recording the newsletter editor as part of the team
for a while :(.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28904: Add newsletter editor to about page display
Martin Renvoize [Wed, 27 Oct 2021 14:27:45 +0000 (15:27 +0100)]
Bug 28904: Add newsletter editor to about page display

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29329: Remove stray character in opac-detail.tt
Lucas Gass [Tue, 26 Oct 2021 19:52:24 +0000 (19:52 +0000)]
Bug 29329: Remove stray character in opac-detail.tt

1. Have  OpacBrowseResults on.
2. Make search with many results.
3. Go to the record detail page
4. Click 'Browse results'
5. At the bottom of the container notice the stray "s".
6. apply patch
7. Try again, the "s" is gone!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27884: Add tests
David Gustafsson [Wed, 15 Sep 2021 13:32:35 +0000 (15:32 +0200)]
Bug 27884: Add tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 27884: Add html support for report mails
David Gustafsson [Thu, 4 Mar 2021 16:54:22 +0000 (17:54 +0100)]
Bug 27884: Add html support for report mails

To test:
1) Create a new notice, for example with Koha module "Patrons",
   name/code TEST and message body "<strong>testing<strong>".
2) Create a new sql report, the query could be someting like:
   SELECT "<number>" as `borrowernumber`, "to@example.com", as `email`, "from@example.com" as `from`;
   where "<number>" is a valid borrowernumber.
3) Run patron_emailer.pl --report=<id> --notice=TEST --module=members -commit
   where <id> is the report id.
4) Check the message_queue table that the content_type column has been
   set to text/html; charset="UTF-8".
5) Ideally process the message queue and veriy that the sent email is displayed
   as rendered html.
6) Run tests in t/db_dependent/Reports/Guided.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 25459: Makes barcode position respect units in patron cards layout
Maryse Simard [Mon, 11 May 2020 18:20:42 +0000 (14:20 -0400)]
Bug 25459: Makes barcode position respect units in patron cards layout

When using any unit besides postscript points, barcode positionning
doesn't work correctly. There is an error in the calculation: the unit
factor must be applied to the individual card part only and not to the
full page position.

This patch moves the unit part of the calculation to the right place.

To test :
1. Create a working patron card setup, using postscript points:
    card template, layout and card batch. Use barcode and at least
    one other element (text or images) in the layout.
    => Some tips for testing:
        - activate guides for the layout
        - use a template and a batch containing more than one card; the
        displacement will be different for each card and depend on the
        barcode position relative to the bottom left of the entire page.
2. Change units from postscript points to any other unit.
    => At least for the layout, but changing it in the template will
    scale the page as well.
4. Export the card batch.
3. Note the guides are scaled to fit the new unit and the lower left
corner of text and images are still correctly placed relative to the
guides, but the barcode is not.
    => In some cases, the barcode even seem to not print at all since
    it's new coordinates are out of screen.
4. Apply patch.
5. Generate the batch again.
6. Note the barcode now appears exactly where it should.

Signed-off-by: George Veranis <gveranis@dataly.gr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28263: DBRev 21.06.00.040
Jonathan Druart [Tue, 2 Nov 2021 15:49:37 +0000 (16:49 +0100)]
Bug 28263: DBRev 21.06.00.040

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28263: (QA follow-up) Use new atomicupdate code style
Joonas Kylmälä [Sat, 30 Oct 2021 20:19:39 +0000 (20:19 +0000)]
Bug 28263: (QA follow-up) Use new atomicupdate code style

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28263: Fix too_many auto renewal message
Lucas Gass [Thu, 29 Apr 2021 14:36:03 +0000 (14:36 +0000)]
Bug 28263: Fix too_many auto renewal message

To test:
1. Make an item eligible for auto_renewal.
2. Set circ rule so only 1 auto_renewal is allowd.
3. Run auto_renew once, get a successful message.
4. Run it again and get the too_many error "You have reached the maximum number of checkouts possible."
5. This has nothing to do with the number of checkouts
6. Apply patch and updatedatabase.
7. Do 1-4 again.
8. Message is now "You have reached the maximum number of renewals possible."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29356: Pickup location dropdowns should perform 'contains' searches
Tomas Cohen Arazi [Thu, 28 Oct 2021 18:32:04 +0000 (15:32 -0300)]
Bug 29356: Pickup location dropdowns should perform 'contains' searches

When placing a hold, the dropdowns for selecting a pickup library automatically right-truncate, so one can type "cen" and find Centerville.

On the Libraries page in Admin, however, the search box both left- and
right-truncates, so one can type "en" and find Centerville.

This patch makes the search perform 'contains' searches.

To test:
1. Try placing a hold. Make sure your rules allow Centerville to be a
   valid pickup location.
2. Search 'cen'
=> SUCCESS: Centerville shows
3. Search 'en
=> FAIL: Centerville doesn't show
4. Apply this patch and reload
5. Repeat 2
=> SUCCESS: Works!
6. Repeat 3
=> SUCCSS: Centerville shows!
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29355: Make pickup location dropdowns RESTdefaultPageSize agnostic
Tomas Cohen Arazi [Thu, 28 Oct 2021 18:03:18 +0000 (15:03 -0300)]
Bug 29355: Make pickup location dropdowns RESTdefaultPageSize agnostic

This patch makes the select2 dropdowns for pickup locations not be
limited to the RESTdefaultPageSize syspref limit.

To test:
1. Have less than 20 libraries in your system as valid pickup locations
2. Place a hold via the staff client
=> SUCCESS: See that all your libraries appear in the pickup location dropdowns at the bib and item level
3. Update RESTdefaultPageSize, set the value to something lower than your count of pickup libraries
4. place another hold
=> FAIL: Your pickup location list gets cut off and only shows as many locations as RESTdefaultPageSize allows
5. Apply this patch
6. Repeat 4
=> SUCCESS: All your pickup locations show
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29351: Add missing cn_source parameter to reports parameter menu
Owen [Thu, 28 Oct 2021 14:15:12 +0000 (14:15 +0000)]
Bug 29351: Add missing cn_source parameter to reports parameter menu

This patch adds an option to insert "Source of classification or
shelving scheme" as a runtime parameter in SQL reports. The ability to
use cn_source as a parameter seems to have always been part of this
feature but wasn't documented.

To test, apply the patch and go to Reports -> Create from SQL.

 - Click the "Insert runtime parameter" button and select
   "Classification source."
 - Customize the parameter label if you wish and click "Insert
   parameter."
 - The parameter should be inserted like this:

   <<Source of classification or shelving scheme|cn_source>>

 - Use it to create a valid SQL report, for example:

   SELECT * FROM items WHERE cn_source = <<Source of classification or
   shelving scheme|cn_source>> LIMIT 10

 - Confirm that upon running the report you are prompted to select a
   classification source.
 - Confirm that the report runs correctly.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29352: Runtime parameter labels should not be said to be optional
Owen [Thu, 28 Oct 2021 14:46:00 +0000 (14:46 +0000)]
Bug 29352: Runtime parameter labels should not be said to be optional

This patch alters the form shown when using the "Insert runtime
parameter" button in SQL reports. It makes the label field required and
removes "optional" from the field hint.

To test, apply the patch and go to Reports -> Create from SQL.

 - Click the "Insert runtime parameter" button and select "Authorized
   value."
 - Clear the "parameter label" field and click "Insert parameter."
 - The form should display an error asking you to fill in the label
   field.
 - Test that the category field is also required.
 - Close the modal and select a different runtime parameter.
 - Test again that the label field is required.
 - Test that the form submits correctly when the label field is
   populated.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29328: Add missing list parameter to reports parameter menu
Owen [Thu, 28 Oct 2021 15:45:21 +0000 (15:45 +0000)]
Bug 29328: Add missing list parameter to reports parameter menu

This patch adds an option to insert "list" as a runtime parameter in SQL
reports (As added by Bug 27380).

To test, apply the patch and go to Reports -> Create from SQL.

- Click the "Insert runtime parameter" button and select
  "List."
- Customize the parameter label if you wish and click "Insert
  parameter."
- The parameter should be inserted like this:

  <<List of values|list>>

- Use it to create a valid SQL report, for example:

  SELECT * FROM borrowers WHERE categorycode IN  <<List of values|list>>
  LIMIT 10

- Confirm that upon running the report you are shown a textarea. Enter
  two or more values in the textarea, each on a separate line.
- Confirm that the report runs correctly. The SQL above would show you
  this when you click "Show SQL code":

  SELECT * FROM borrowers WHERE categorycode IN  ('A','S')  LIMIT 10

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29242: Flatpickr - Should autocomplete be turned off?
Owen Leonard [Thu, 14 Oct 2021 17:56:23 +0000 (17:56 +0000)]
Bug 29242: Flatpickr - Should autocomplete be turned off?

This patch adds a step to Flatpickr initialization to add an
autocomplete attribute set to "off" so that browsers' built-in
autocomplete menus do not obscure the calendar.

To test you must be using a browser which has form history enabled.

Locate a form that includes a Flatpickr input field, e.g.  Reports
-> Catalog statistics.

Fill the date fields and submit the form. Go back to the form and click
one of the form fields you previously filled out (once in Chrome, twice
in Firefox). The browser should not show its native form history
dropdown.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28901: Compiled CSS
Jonathan Druart [Tue, 2 Nov 2021 14:57:01 +0000 (15:57 +0100)]
Bug 28901: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28901: showCart incorrectly calculates position if content above navbar
Owen Leonard [Mon, 20 Sep 2021 14:57:23 +0000 (14:57 +0000)]
Bug 28901: showCart incorrectly calculates position if content above navbar

This patch makes changes to the OPAC Cart's CSS and JS so that the cart
pop-up message display more consistently. The CSS is changed to use
position "fixed" instead of "absolute." This allows the message to
display without recalculating the position every time, and keeps the
appearance we expect.

The z-index of the message is also increase to prevent it from being
hidden behind a floating toolbar.

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

 - Perform a catalog search in the OPAC which will return multiple
   results.
 - In the list of search results, click the "Add to cart" link next to
   several search results. Each time you should see a message appear in
   the upper left corner of the screen, "The item has been added to the
   cart."
 - The position of the messages should be consistent no matter how far
   down the page you scroll.
 - Test again after adding content to the OpacHeader region. One way to
   do this is to add the following to the OpacUserJS preference:

   $(document).ready(function(){
     $("#wrapper").prepend('<img src="https://generative-placeholders.glitch.me/image?width=900&height=200&style=triangles&gap=30">');
   });

 - Test at various browser widths, from a phone-sized screen width up to
   wide desktop-sized.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28910: Correct eslint errors in OPAC basket.js
Owen Leonard [Fri, 17 Sep 2021 13:25:10 +0000 (13:25 +0000)]
Bug 28910: Correct eslint errors in OPAC basket.js

This patch corrects eslint errors in the OPAC copy of basket.js:
Indentation inconsistencies, undeclared variables, unused functions,
etc.

To test, apply the patch and test the "Cart" functionality in the
OPAC:

- In the OPAC, add an item to the cart.
- A popup message should appear telling you the item has been added.
- The "Add to cart" link should update to read "In your cart."
- The count if cart items in the header should be updated.
- The "In your cart (remove)" link should work correctly.
- Test this process from both the search results and
  detail pages.
- Open the cart.
- The cart should open correctly.
- In the cart, test all the controls:
  - More details
  - Send
  - Download
  - Empty and close
  - Hide window
  - Print
  - Select all / clear all
  - With checked items:
    - Remove
    - Add to list
    - Place hold
    - Tag

The following unused functions were removed: readCookieValue,
AllAreChecked, SelectAll, and quit. A search of the Koha codebase should
return no results from the opac-tmpl directory.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28926: Update cpanfile for Mojolicious::Plugin::OpenAPI v2.16
Mason James [Tue, 31 Aug 2021 04:05:05 +0000 (16:05 +1200)]
Bug 28926: Update cpanfile for Mojolicious::Plugin::OpenAPI v2.16

to test...
 - apply patch
 - build package
 - confirm in about.pl that minimum versions are updated

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29319: Use Business::ISBN to check ISBNs on addbooks.pl/cataloging search
Lucas Gass [Mon, 25 Oct 2021 22:52:22 +0000 (22:52 +0000)]
Bug 29319: Use Business::ISBN to check ISBNs on addbooks.pl/cataloging search

To test:
1. Go to cataloging search and enter something like "7th Heaven".
2. Get an error when searching, Koha thinks you entered an ISBN
3. Apply patch
4. Try the same search, it should be a proper title search now
5. Find some stuff in the catalog with ISBN numbers in them.
6. The search should properly return ISBN13/ISBN10 searches, without with out the '-'.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29350: Don't need to escape the 'delete' TT methods
Jonathan Druart [Thu, 28 Oct 2021 13:27:00 +0000 (15:27 +0200)]
Bug 29350: Don't need to escape the 'delete' TT methods

Will be needed by bug 22605.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 29075: 'OPAC info' removed in branches.pl
Jérémy Breuillard [Wed, 27 Oct 2021 13:24:43 +0000 (13:24 +0000)]
Bug 29075: 'OPAC info' removed in branches.pl

In Administration › Libraries, we see content of OPAC info as escaped HTML.
This content may be long and seeing HTML tags is strange.

We should not show it in this table.
Or maybe create a modal preview of it (not escaped HTML).

To test :
1) Home > Administration > Libraries
2) In 'Address' column notice the 'OPAC info' field (if this one is
filled) with visible HTML tags
3) Apply patch
4) Repeat 1) and 'OPAC info' field should be gone

Signed-off-by: Owen <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 years agoBug 28913: Note cronjob on automatic return settings in itemtypes
Andrew Fuerste-Henry [Fri, 27 Aug 2021 16:27:53 +0000 (16:27 +0000)]
Bug 28913: Note cronjob on automatic return settings in itemtypes

To test:
1 - go to itemtype config in Admin
2 - confirm it doesn't mention the automatic_return cron
3 - apply patch and restart
4 - confirm note now says "This feature requires the misc/cronjobs/automatic_checkin.pl cronjob. Ask your system administrator to schedule it."

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>