Jonathan Druart [Tue, 20 Jul 2021 15:44:20 +0000 (17:44 +0200)]
Bug 28445: Start form with empty library for batch mod
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 26 Jul 2021 16:30:33 +0000 (18:30 +0200)]
Bug 28445: Adjust code to handle regexs
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 26 Jul 2021 16:29:16 +0000 (18:29 +0200)]
Bug 28445: Use Koha::UI::Form::Builder::Item from batchmod as well
Now that it's reusable, let use it somewhere else!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 26 Jul 2021 16:26:32 +0000 (18:26 +0200)]
Bug 28445: Move controller code to Koha::UI::Form::Builder::Item
To ease reusability
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 26 Jul 2021 16:25:19 +0000 (18:25 +0200)]
Bug 28445: Isolate add item form to an include file
To ease reusability
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 20 Jul 2021 08:30:30 +0000 (10:30 +0200)]
Bug 28769: Remove tabloop from cataloguing plugins
There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.
Actually this tabloop variable is never used from cataloguing plugins, we should remove it.
Test plan:
Read the code and confirm the above.
You can also test a couple of plugins and confirm that they are still
working.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 30 Aug 2021 12:28:39 +0000 (12:28 +0000)]
Bug 28337: Use existing definition in ccl.properties and bib1.att
As the field is already dfined, we don't need to add anything here.
Bib1.att can use the existing number as well
To test, enable zebra debugging in koha-conf, adding 'request' to the list:
<zebra_loglevels>none,fatal,warn,request</zebra_loglevels>
Restart all the things
Repeat matching (redo matching with no rule, then with OCN rule)
Tail the zebra-output.log and note 1=Ohter-control-number is searched and match is found
Perform a search in the staff client for: other-control-number:expialodocious
Note in logs that 1=1211 is searched
Previous test plan did not mention copying ccl.properties and bib1.att to the package install,
so highlighted that things work without these changes
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 12 May 2021 17:49:36 +0000 (17:49 +0000)]
Bug 28337: Add System-control-number index to Zebra MARC21 files
To test:
1 - Apply patch
2 - Copy zebra files to destination:
cp /kohadevbox/koha/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml /etc/koha/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
cp /kohadevbox/koha/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl
3 - Reindex authorities
4 - Edit an authority and add 035$aExpialodocious
5 - Export the authority
6 - Create a new record matchign rule:
Matching rule code: OCN
Description: Other control number
Match threshhold: 1000
Record type: Authority record
Search-index: Other-control-number
Score: 1000
Tag: 035
Subfields: a
7 - Stage the record and use the new matchign rule
8 - Match found!
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>
Martin Renvoize [Wed, 19 May 2021 13:24:33 +0000 (14:24 +0100)]
Bug 28389: Add 'Details' link to refund type payout lines in POS
This patch adds a link to the account-details page for refund type
payout lines displaying on the register details page of cash management.
Test plan
1/ Enable 'UseCashRegisters'
2/ Add some transactions with at least one including a 'Refund'
3/ Look at the transaction history for the current register (Tools >
Cash management > Transaction history for X)
4/ Note the refund line does not contain a link to 'Details'
5/ Apply the patch
6/ The refund line should now have a 'Details' button on the right.
7/ Bonus points, perform a cashup and then search for older transactions
and check the 'Details' button appears in this table too.
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>
Marcel de Rooy [Tue, 12 Oct 2021 12:30:17 +0000 (12:30 +0000)]
Bug 29209: Credits for Saxion in Dutch translation
The Rijksmuseum sponsored translation for Dutch-The Netherlands for
many years. More recently Saxion did the bulk of that work.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Ronald Wijlens <r.j.wijlens@saxion.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Add new article request on OPAC or staff. Tick checkbox.
Verify if TOC is Yes on opac-user or staff patron details.
Check the list view on circ/article-requests.pl.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29093: Database revision for article_requests.toc_request
Test plan:
Run dbrev or new install.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 11 Oct 2021 08:34:00 +0000 (08:34 +0000)]
Bug 29199: Fix parameters of ListCallNumbers
[1] ItemBranch should have been passed with quotes.
[2] You cannot use $x as class name, you need to use xsl:attribute.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29111: Remove unused indicator modification code for items
The indicator value for 952 was hard coded in every case to " ". In
order to achieve that we can simply pass undef to TransformHtmlToXml()
and it will set the indicator values to " ".
To test:
1) Make sure the submission of (at least some) the modified files
still work, e.g. test that making a new item via
cataloguing/additem.pl works.
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29111: Remove dead code from acqui/addorderiso2709.pl
Test plan:
1) open acqui/addorderiso2709.pl in your code editor and make sure
nothing references $item in the if block where it was removed from
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Tue, 12 Oct 2021 18:49:48 +0000 (08:49 -1000)]
Bug 29213: Fix typo ol in member-alt-contact-style.inc
There is a typo in member-alt-contact-style.inc, tag ol is open twice for alternate contact.
Test plan :
1) Create new patron
2) Look at HTML structure in "Alternate contact" section
=> Without patch you see <ol> twice and </ol> once
=> With patch you see once <ol> and </ol>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29157: Date and Datetime attributes cannot be set NULL
This patch makes Koha::Object->attribute_from_api allow setting
attributes the undef value. The original implementation passed the value
directly to dt_from_string, which made the attribute be set the current
date.
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t \
t/db_dependent/api/v1/patrons.t
=> FAIL: Tests fail! Our code is buggy!
3. Apply this patch
4. Repeat 2
=> SUCCESS! Fix fixed this thing!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Eric Phetteplace <phette23@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch implements regression tests for the filed bug.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Eric Phetteplace <phette23@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 1 Oct 2021 11:25:20 +0000 (12:25 +0100)]
Bug 15812: (follow-up) Enable click cell to select
This patch adds handling to allow clicking anywhere in the table cell to
select/deselect the patron
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 1 Oct 2021 08:58:08 +0000 (09:58 +0100)]
Bug 15812: (follow-up) Tweaks to patron results display
Move the button into the actions column and make 'cardnumber' a link to
checkout, with a tooltip.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 24 Sep 2021 00:05:30 +0000 (00:05 +0000)]
Bug 15812: Use patron search in place of circ search
The 'Checkout' search hijacks some of the DataTables searching code used for 'Search patrons'
Rather than try to implement the search again on another page, we can simply send the user
to the patron search if the cardnumber is not found
Additionally, this patch adds a 'Check out' button to the patron search results to allow
going to checkotus directly
To test:
1 - Apply patch
2 - Perform a 'Checkout' search from the header
3 - Note that:
For a cardnumber, you are redirected directly to checkouts page for the borrower
For a search with one result, you are redirected directly to the checkout page for the borrower
For a search with many results, you are redirected to the patron search results
and there is a 'Checkout' button under the cardnumber
4 - Confirm circulation page works as expected (i.e. checkout to a patron)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 8 Sep 2021 23:30:11 +0000 (23:30 +0000)]
Bug 28978: Convert installer CSS to SCSS
This patch creates a new SCSS file, installer.scss, from which
installer.css will be compiled.
Most of the resulting CSS is unchanged, but some minor sections were
removed because they were obsolete. The jQueryUI-specific section isn't
fully converted to SCSS because it's going to go away with the addition
of Flatpickr.
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).
- Confirm that koha-tmpl/intranet-tmpl/prog/css/installer.css is
updated.
- Go through the complete web installation process, including
onboarding, to confirm that everything is styled as before.
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>
Bug 28956: Correct default tax rate on orderreceive
When there is more than one tax rate defined in system preferences, and
a vendor has a tax rate that is not 0%, then when you are receiving an
order in a basket for that vendor, the default tax rate should be the
correct non 0 rate. This should be seen in acqui/orderreceive.
To test:
1) Go to staff client
2) Go to Koha administration
3) Search for "tax rate" in system preferences
4) Add 0|0.15 into the preference
5) Create a vendor
6) Set vendor tax rate to 15%
7) Add a new basket to vendor
8) Add to basket
9) Add any sample order to basket - add actual cost
10) Close basket
11) Receive shipment
12) Make invoice
13) Click on Receive in the table
14) Should be on orderreceive.pl page
15) Observe tax rate default is 0%
16) Apply patch
17) Refresh page
18) Observe tax rate default is 15%
Sponsored-by: Catalyst IT Signed-off-by: Julien Sicot <julien.sicot@univ-rennes2.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 4 Oct 2021 19:18:04 +0000 (19:18 +0000)]
Bug 29162: Change template structure on OPAC library page so that a single library can easily be hidden
This patch adds markup to the OPAC library page so that CSS or JS can
more easily target elements of the page:
- Each library is wrapped in a div, e.g. <div id="section_CPL">
- Classes are added to the paragraphs containing phone, fax, URL, and
library description.
- An ID has been added to the menu of libraries in the sidebar so that
they can be targetted individually.
To test, apply the patch and go to Administration -> System prefernces.
- Add some testing CSS to the OPACUserCSS system preference, if
necessary replacing "CPL" with a branchcode in your system:
div#section_CPL,
li#menu_CPL {
font-size: 80%;
}
- In the OPAC, view the "Libraries" page.
- In the view of all libraries you should see your CSS reflected in the
section for that library.
- In the individual library view you should see the menu item for that
library affected by your custom CSS.
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>
Owen Leonard [Mon, 4 Oct 2021 16:33:25 +0000 (16:33 +0000)]
Bug 28963: Use Flatpickr on calendar page
This patch replaces the use of jQueryUI's datepicker widget on the
Calendar page.
In order to ease customization of the static calendar which shows the
current calendar, I've converted the calendar.css file to SCSS. This
allows us to define new SCSS variables to pass to the Flatpickr SCSS.
Also changed: Removed some unecessary comments in the template.
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 Tools -> Calendar.
- Confirm that entering holidays works correctly for all types: Single,
weekly, yearly, ranges, repeated ranges.
- Confirm that holidays are deleted as expected.
- Confirm that the colors of each type of holiday is correct.
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>
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>
Owen Leonard [Thu, 9 Sep 2021 18:32:20 +0000 (18:32 +0000)]
Bug 28988: Reindent calendar template
This patch performs general template cleanup to the calendar template:
Make indentation consistent and trim trailing whitespace.
To test, apply the patch and go to Tools -> Calendar.
The page should look correct and work correctly. If you view the diff
while ignoring whitespace the only changes should be where line breaks
were introduced.
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>
Owen Leonard [Tue, 5 Oct 2021 16:22:20 +0000 (16:22 +0000)]
Bug 29112: Module navigation sidebars in staff now show bullet points
Bug 27873 removed an image file which was still being referenced in the
staff interface CSS, intended to replace the default bullet point in
sidebar menus like Administration and Tools pages have.
This patch creates a new variable in the SCSS "mixins" file so that the
SVG image file created by Bug 27873 can be reused, and corrects the CSS
for the affected menus.
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 Tools -> Patron lists
- The sidebar menu should be styled with little arrows instead of
the default HTML bullets.
- Check the same on an Administration page, e.g. Administration ->
Libraries.
- Check that there hasn't been a regression on the checkout and patron
detail views:
- Check out to a patron who has one or more messages on their account,
e.g. overdues, return claims, holds waiting, notes, messages, etc.
- The display of these list items should be the same: An arrow bullet
point instead of the default.
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>
Owen Leonard [Thu, 7 Oct 2021 14:04:32 +0000 (14:04 +0000)]
Bug 28441: Terminology: Reserve notes should be Hold notes
This bug corrects the text "Reserve notes" to be "Hold notes" on the
holds to pull page.
To test, apply the patch and go to Circulation -> Holds to pull.
You should see in the table header a column labeled "Hold notes."
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>
Owen Leonard [Thu, 7 Oct 2021 15:44:03 +0000 (15:44 +0000)]
Bug 28579: Typo: No record have been imported because they all match an existing record in your catalog.
This patch corrects a grammatical error in text which might be shown
when adding records from a staged file to a basket. It corrects this:
"No record have been imported because they all match an existing
record in your catalog."
..to this:
"No records have been imported because they all match existing
records in your catalog."
To see the error in Koha, apply the patch and export some records from
Koha (Tools -> Export) and then re-import them using Tools -> Stage MARC
for import.
- Go to Acquisitions -> Vendor -> Basket -> Add to basket -> From a
staged file.
- Click the "Add to order" button corresponding to the file you just
uploaded.
- Select all records and define default accounting details.
- When you click "Save" you should see the error message.
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>
Owen Leonard [Thu, 7 Oct 2021 14:19:56 +0000 (14:19 +0000)]
Bug 28470: Typo: Are you sure you with to chart this report?
This patch corrects the text of a warning on the report results page,
from this:
_("Fetching full chart data for reports with many rows can cause
performance issues. Are you sure you with to chart this report?")
...to this:
_("Fetching full chart data for reports with many rows can cause
performance issues. Are you sure you want to chart this report?")
To test, apply the patch and go to Reports -> Use saved.
- Run a report which, unlimited, will return more than 1000 rows.
- Click the "Fetch all data for chart" button.
- You should be asked for confirmation. Check that the text is correct.
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>
Jonathan Druart [Tue, 5 Oct 2021 11:57:04 +0000 (13:57 +0200)]
Bug 29172: Make CustomCoverImagesURL compatible with control fields
Bug 22445 added CustomCoverImagesURL that deals with MARC fields, but
control fields were not supported.
Test plan:
Turn CustomCoverImages on
Fill CustomCoverImagesURL with https://covers.openlibrary.org/b/isbn/{006}-M.jpg
Add an isbn in 006 (0596001738 will work)
Go to the detail page of the bibliographic record and confirm that you
see a cover image.
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>
Joonas Kylmälä [Sun, 3 Oct 2021 11:51:22 +0000 (11:51 +0000)]
Bug 24698: QA fixes
This is a squashed patch of the following patches:
Bug 24698: (QA follow-up) Fix errors caused by more strict exports being introduced
The original patch "Bug 24698: Add plugin and template files for
unimarc authority leader" doesn't work without explictly importing the
methods from C4::Auth and C4::Output due to the default exports being
changed in those modules after the patch was made.
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Remove debug info being outputted to the template
This is only needed during development.
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Align variables with whitespace
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Remove dead code
These were left off from the copy&paste taken from
unimarc_field_100_authorities.pl
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Fix formatting and typos
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Remove passing of authnotrequired parameter
It should only be used when we want to override the default of auth
being required.
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Make plugin script executable
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Use spaces instead of tabs
This makes the QA script happy.
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Filter untrusted input to prevent XSS
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Don't specify select element's size if it is 1
This is to make the QA script happy, in order to not to break
Bootstrap CSS rules, see Bug 28066 for more info
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (QA follow-up) Don't specify script type explictly
It's makes the QA script complain because the option doesn't have any
effect nowadays:
https://www.w3.org/TR/2017/REC-html52-20171214/obsolete.html#warnings-for-obsolete-but-conforming-features Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 24698: (follow-up) remove HTML select option for Series
The IFLA authorities format specification defines only the letters a-l
as possible values for authority leader 000 character position 9 ("Type
of entity"). Therefore, the first option from the HTML select dropdown
menu (" - Series") must be removed.
Mentored-by: Andreas Roussos <a.roussos@dataly.gr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
George Veranis [Fri, 12 Mar 2021 11:51:57 +0000 (12:51 +0100)]
Bug 24698: Add plugin and template files for unimarc authority leader
In Unimarc installations when adding/editing an authority record there is no
Tag Editor for the leader field ( 000 ).
This patch fixes that.
Test plan:
1) Try to catalogue a new authoritry and check if on field 000 you can find
the Tag Editor.
2) Apply the patch.
3) In the authorities framework view the subfields of field 000 and select for
plugin option the value unimarc_leader_authorities.pl.
4) Restart memcached / plack if needed.
5) Repeat step 1 and notice if the Tag Editor is visible and click it to open
new window in order to manage the field contents and press OK.
6) Check the value of the generated leader.
Marcel de Rooy [Fri, 8 Oct 2021 06:30:13 +0000 (06:30 +0000)]
Bug 29138: (QA follow-up) Changes to UPDATE
Move the condition to the WHERE clause, using COALESCE to
prevent mysqlism (IFNULL) and strings for strict SQL.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested on NULL, 0, 1, 2, no, yes. (2 and yes become 0 too. Fine.)
Tested strict sql mode: no truncated incorrect DOUBLE value-error anymore.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29138: Use zero instead of no in LoadSearchHistoryToTheFirstLoggedUser
To test:
- apply patch
- set LoadSearchHistoryToTheFirstLoggedUser to 'Don't add'
- confirm via sql that value=0
- confirm on OPAC that search history is not loaded to account on login
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>
This patch adds a new method import to the commit_file.pl script.
To test:
1. Have MARC data staged
2. Run:
$ kshell
k$ perl misc/commit_file.pl --list-batches
=> FAIL: You get
Undefined subroutine &main::GetAllImportBatches called at misc/commit_file.pl line 68.
3. Apply this patch
4. Repeat 2
=> SUCCESS: You get the list of batches
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Nick Clemens [Thu, 7 Oct 2021 19:34:01 +0000 (19:34 +0000)]
Bug 29193: Specify paging as false in circ-patron-search-results.js
This patch removes paging from patron searches using circ-patron-search-results.js
To test:
1 - Browse to a record
2 - Click on the 'Holds' tab
3 - Search for 'a' in patrons
4 - Note you see only 20 results
5 - Sort by name and note that you see different results
6 - Apply patch
7 - Reload page and search
8 - Note you see all results
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>
Nick Clemens [Wed, 6 Oct 2021 11:57:19 +0000 (11:57 +0000)]
Bug 28748: Prepare pickup locations for overridden holds
The logic in request.pl only passes pickup locations if a hold is allowed,
they are not calculated when the hold is overridden.
This patch copies the pickup locations code into the override conditional,
adjusting to mark the item overridden
This also highlights an condition of override:
If a hold is allowed, but there are no valid pickup locations the override
is not allowed.
To test:
1 - Set a holds rule to allow on-shelf holds only if all unavailable
2 - Set AllowHoldPolicyOverride to 'Allow'
3 - Find a record with several items available
4 - Attempt to place a hold
5 - The items have a yellow triangle, but no pickup locations
6 - Place an item level hold
7 - Note the hold has no pickup location
8 - Cancel the hold
9 - Apply patch and restart all
10 - Attempt hold again
11 - Items still have yellow triangle, but there are dropdowns for pickup location
12 - Place an item level hold, verify a pickup location is set
13 - Cancel the hold
14 - Alter circ rule to allow on shelf holds
15 - Change 'Default checkout, hold and return policy' - 'Hold pickup library match' to "item's hold group"
16 - Ensure there is no group for the item
17 - Attempt to place hold
18 - Override is not allowed 'No valid pickup locations'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ere Maijala [Thu, 30 Sep 2021 19:53:15 +0000 (22:53 +0300)]
Bug 29135: Fix handling of deleted items in OAI-PMH provider
When the OAI-PMH provider was configured to include item information
in the returned records, deleting an item would cause the record to
be reported as deleted. The provider also did some useless checks when
determining the timestamp of a deleted record. These checks only had
a performance impact.
To test:
1) Create /var/lib/koha/kohadev/OAI.yaml with:
2) Set preference OAI-PMH to Enable
3) Set preference OAI-PMH:ConfFile to /var/lib/koha/kohadev/OAI.yaml
4) Delete an item from a record
5) View the page: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
6) Note the record is now listed as deleted
7) Run prove -v t/db_dependent/OAI/
Sponsored-by: The National Library of Finland Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 12 Oct 2021 07:10:58 +0000 (09:10 +0200)]
Bug 28734: Clear cache to prevent random failures
MSS is modified, we must clear the cache before and after
# Failed test 'Authorised value is correctly parsed to show description rather than code'
# at t/db_dependent/Koha/Biblio.t line 617.
# got: 'CODE'
# expected: 'Description should show'
# Failed test 'Authorised value is correctly parsed for OPAC to show description rather than code'
# at t/db_dependent/Koha/Biblio.t line 624.
# got: 'CODE'
# expected: 'Description should show OPAC'
# Looks like you failed 2 tests of 13
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 8 Oct 2021 09:10:22 +0000 (09:10 +0000)]
Bug 3142: (QA follow-up) Include notforloan itemtypes
As was done in the code already.
Note that we are ignoring effective itemtype now.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 8 Oct 2021 08:31:52 +0000 (08:31 +0000)]
Bug 3142: (QA follow-up) Cosmetic changes
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 5 Oct 2021 12:32:47 +0000 (14:32 +0200)]
Bug 3142: Add note about imprecision of filter_by_for_hold
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 5 Oct 2021 12:30:49 +0000 (14:30 +0200)]
Bug 3142: Add test for the circ rule
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 5 Oct 2021 12:17:22 +0000 (14:17 +0200)]
Bug 3142: Add tests
And fix a bug!
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 22 Jun 2021 13:49:45 +0000 (15:49 +0200)]
Bug 3142: Use filter_by_for_holds where holdability is calculated
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 22 Jun 2021 13:43:10 +0000 (15:43 +0200)]
Bug 3142: Add itype
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 22 Jun 2021 13:39:55 +0000 (15:39 +0200)]
Bug 3142: Exclude damaged items
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 22 Jun 2021 13:38:29 +0000 (15:38 +0200)]
Bug 3142: Add itemlost, withdrawn and notforloan
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29169: Fix wrong terminology when article request is not available
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 7 Oct 2021 09:56:22 +0000 (09:56 +0000)]
Bug 29182: (follow-up) Fix ArticleRequests.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29182: Make sure methods call the overloaded ->store
This patch addresses the issue of `request()` and `set_pending()`
calling $self->SUPER::store instead of the overloaded one.
This prevents created_on being set.
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/ArticleRequest.t
=> FAIL: created_on is not set on two methods
3. Apply this patch
4. Repeat 2
=> SUCCESS: created_on is now set!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 5 Oct 2021 12:12:34 +0000 (12:12 +0000)]
Bug 29131: Row striping breaks color coding on item circulation alerts
The CSS we use for table row "striping," which uses 'tbody
tr:nth-child(odd),' is often difficult to work with because it takes a
lot of increased specificity to override the default. Bootstrap
compounds this by adding its own similar CSS.
In order to overcome this I've added '!important' to the CSS embedded in
the item circulation alerts page. I normally would avoid '!important'
but since this CSS is only relevant to this page I think it's
appropriate.
This patch also adds [% FILTER collapse %] around the <style> block and
does some reindenting, so ignore whitespace when using diff to see the
changes clearly.
To test, apply the patch and go to Administration -> Item circulation
alerts.
- Check the "Legend" table. The first cells should be distinct colors:
red, pink, and green.
- In the "Checkout" table, table cells should be green by default.
Clicking in one of the cells should turn it red with the text
"Disabled for all."
- Use the "Select a library" dropdown to pick a library.
- Clicking in any green cell should turn the cell pink and add the text
"Disabled for XXX" where XXX is the branchcode.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 22 Sep 2021 11:49:14 +0000 (11:49 +0000)]
Bug 29062: Use primary key issued_id to fetch old_issues for letters
The code currently uses itemnumber to fetch old_issues for notices.
This doesn't seem to be used in any current notices except the CHECKINSLIP:
SELECTY letter.code,content FROM letter WHERE content LIKE 'old\\_%'\G
For issues we use itemnumber, however, issues has a constraint to limit issues for an itemnumber to 1
Old issues has no such constraint, we try to rectify this in the old code by adding 'ORDER BY returndate DESC LIMIT 1"
As the code is not used by default and buggy I think we can make a change to using 'issue_id' as the key and
announcing the change - it prevents leaky data
To test:
1. Check something out to patron A. Check it in.
2. Check something out to patron B. Check it in.
3. Check something out to patron C. Check it in and print the check-in slip. (Leave the checkin paghe open)
4. You will see the checkin repeat itself 3 times, one for each line in old_issues.
5. Apply patch and restart_all
6. Click the 'Print checkin slip' button again
7. You see a single checkin
8. Checkout a different item to patron A. Check it in and print the check-in slip
9. See the correct checkins
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 28 Sep 2021 15:16:20 +0000 (17:16 +0200)]
Bug 27622: Remove Remove nb-NO installer data
With installer data in YAML format and it's translations,
there are no need for localized installer files.
This patch removes nb-NO installer files.
1) Apply the patch
2) Translate to nb-NO
cd misc/translator
./translate update nb-NO
./translate install nb-NO
3) Do a clean install using nb-NO,
check no problems during install
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 6 Oct 2021 15:00:07 +0000 (17:00 +0200)]
Bug 18984: DB changes
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 21 Jan 2021 09:28:21 +0000 (10:28 +0100)]
Bug 18984: Remove NORMARC support
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 16 Jul 2021 08:40:46 +0000 (10:40 +0200)]
Bug 27101: Fix sample_notices.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 16 Jul 2021 08:39:45 +0000 (10:39 +0200)]
Bug 27101: Remove fr-CA installer data
With installer data in YAML format and it's translations,
there are no need for localized installer files.
This patch removes fr-CA installer files.
1) Apply the patch
2) Translate to fr-CA
cd misc/translator
./translate update fr-CA
./translate install fr-CA
3) Do a clean install using fr-CA,
check no problems during install
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 18 Feb 2021 16:37:37 +0000 (16:37 +0000)]
Bug 27725: Use JavaScript to set history state during patron search
This patch modifies the patron search page so that clicks on the "Browse
by last name" letters add an entry to the browser history, allowing the
user to click back and forth from results while preserving their search.
To test, apply the patch and go to Patrons in the staff interface.
- Click one of the "Browse by last name" letters.
- The table of search results should load the correct data.
- In the browser's location bar you should see a query string added to
the URL, e.g. /cgi-bin/koha/members/members-home.pl?firstletter=Q
- Click another letter.
- Click the back button. You should be returned to the search results
for your first letter choice.
- Clicking the forward button should work correctly as well.
- Other patron searches (header search, sidebar search) should continue
to work as expected.
EDIT: Clear single-letter querystring history item if only one result
was returned.
EDIT 2: Fixed handling of history state changes so that forward and back
buttons work correctly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 27725: (follow-up) Remove code for clearing search results
This patch removes code which cleared search results if there was no
first-letter search. It was unnecessary for the letter search
functionality and made all other searches fail.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 21 Jul 2021 13:56:22 +0000 (13:56 +0000)]
Bug 28730: Add option to format AH field (due date) in SIP checkout response
This patch adds a new option to sip accounts:
format_due_date
If set to 1 the AH field in checkouts will follow the dateFormat system preference and format as due dates (ignoring time portion if 23:59:59 or 11:59:59)
To test:
1 - checkout an item via SIP:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --item 3999900000001 --patron enda -m checkout
2 - Note the AH field is like "YYYYMMDD HHMMSS"
3 - Apply patch
4 - repeat SIP checkout - nothing has changed
5 - edit SIPConfig.xml and add format_due_date="1" to 'term1' account:
<login id="term1" password="term1" delimiter="|" error-detect="enabled" institution="CPL" encoding="ascii" checked_in_ok="1" format_due_date="1"/>
6 - restart all
7 - repeat the SIP checkout
8 - AH field now matches dateFormat system preference
9 - Change your dateFormat preference
10 - repeat the SIP checkout
11 - AH matches new format
Note: If you cannot renew and don't get an AH just check the item back in:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --item 3999900000001 --patron enda -m checkin
Signed-off-by: Winfred Thompkins <Winfred.thompkins@cedarhilltx.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 21 Jul 2021 19:15:27 +0000 (19:15 +0000)]
Bug 18631: Add option to specify logs to preserve or delete in cleanup_database.pl
This adds two new parameters:
--log_module
--preserve_log
These can be repeated to include or exclude specific modules from the cleanup
To test:
0 - Apply patch
1 - Enable cataloging log and borrowers log
2 - Make some changes to borrowers and records
3 - run cleanup databse with --logs 0 --preserve_log=MEMBERS --preserve_log=CATALOGUING
4 - nothing is removed
5 - run cleanup databse with --logs 0 --log_module=MEMBERS
6 - the borrower logs are removed, the record changes remain
7 - run cleanup database with --logs 0
8 - record changes are removed (all other logs too)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 5 Oct 2021 13:02:38 +0000 (13:02 +0000)]
Bug 29175: finishreceive: Replace , by ;
This certainly is one of my shortest fixes ever ;)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>