Jonathan Druart [Mon, 27 Apr 2020 09:55:15 +0000 (11:55 +0200)]
Bug 23081: Adjust tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 23081: atomicupdate for change to existing installs
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 23081: set default to 0 for items.issues and deleteditems.issues
To test:
- save and run this sql query in reports: select sum(if(issues is null,1,0)),sum(if(issues=0,1,0)) from items
- you should see a lot of nulls and no zeros
- apply patch
- updatedatabase
- re-run your query and see that your nulls have changed to zeros
- create a new item
- rerun your query and see your new item is counted in the zeros, not the nulls
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Joseph Sikowitz [Sat, 18 Apr 2020 20:06:05 +0000 (16:06 -0400)]
Bug 24750: Instructor Search Results
Adds regex to the split() of the passed parameters to improve searching.
Test plan
1. Go to Course Reserves module.
2. Press New course button.
3. Make active the instructor search box.
4. Start typing the last name of a patron that exists in your database.
5. At the end of the last name type ", " and try to add a first name.
6. The search should fail.
7. Apply the patch.
8. Follow steps 1-5 again.
9. You should now be able to search using the following methods
9a. surname, firstname
9b. firstname surname
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Lucas Gass [Tue, 21 Apr 2020 21:33:03 +0000 (21:33 +0000)]
Bug 25233: Staff XSLT material type label "Book" should be "Text"
This patch makes the staff client XSLT stylesheets consistent with the
ones for the OPAC, it also makes consitent the use of 'Text' when the leader6 = 't'
TO TEST:
1. Have a record with leader06 = 'a' and leader07 = 'c' 'd' or 'm'.
2. Check the staff client results and details page. See that the
material type label says "Book"
3. Check the OPAC client results and details page. See that the
materila type label says "Text"
4. Apply patch.
5. See that both staff client and OPAC results/details all now say
"Text"
6. Set the leader6 = 't' and make sure that is says 'Text' on both the
staff client and OPAC
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 24 Apr 2020 14:24:07 +0000 (14:24 +0000)]
Bug 25276: Correct hover style of list share button in the OPAC
This patch adds missing "btn" classes to the OPAC share button so that
its style is consistent with similar controls.
The patch also makes some general changes to the OPAC CSS to make sure
link color and hover color are applied with enough specificity. This
corrects the hover color of the share button but should not change any
other existing style.
To test you should have the OpacAllowSharingPrivateLists preference
enabled.
- Rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Log in to the OPAC as a user with one or more private lists.
- Go to Lists -> Your lists.
- In the list of lists there should be a "Share" link for each list.
Hovering your mouse pointer over the link should change the style in
the same way the "Edit" link does.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Tue, 21 Apr 2020 20:11:17 +0000 (20:11 +0000)]
Bug 24957: OpenLibrarySearch shouldnt display if nothing is returned
TO TEST:
1. Turn on OpenLibrarySearch
2. Do an OPAC search that returns results that have results with Open Library results and some that do not.
3. Notice results that return nothing simpliy say "Open Library:" with nothing afterwards.
4. Some results return a png from OpenLibrary or "Not found"
5. Apply patch and look at records again.
6. The results that return nothing for OpenLibrary API should now to hidden.
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 12 Apr 2020 03:19:03 +0000 (03:19 +0000)]
Bug 21927: Acq - Add blank values in pull downs of mandatory item subfields
This is the same fix as on bug 14662, which fixed the behaviour in
cataloguing, but for the item form in acquisitions.
The code assumes that if a subfield is marked as mandatory, there
should be no empty entry in the pull downs.
This assumption is not correct, as it leads to the first entry of the
pull down being preselected if there is no default set. As the field
can never be 'unset', there will never be a 'required' warning.
Furthermore, it might be counterproductive to use mandatory fields,
as it might be easily forgotten to change the preselected value and
those mistakes will be hard to find.
Correct behaviour would be to preselect the empty value when there is
no default. This means on saving the item an error message is triggered
and the cataloger is forced to set the value.
To test:
- This is best tested with an ACQ framework, but default can be used
when no ACQ framework was created.
- In your MARC bibliographic framework:
- In 952 make itemtype, classification source and some other pull downs
like location or collection mandatory and set them to visibel if needed
- Create a new basket with 'items created while ordering'
- Add a new order, an existing record with 942$c set will work best
- Add items for your order line
- Verify that the first value of each pull down is preselected,
there is no way to trigger the 'required' error
- Apply patch
- Add a new order line
- Verify that classification source is preselected according to the
DefaultClassificationSource system preference (try unsetting it later)
- Verify all mandatory fields can be set to empty
- Verify that you can't save before correctly setting them
- Change your frameworks and set a default for itemtype (Ex: BK) and
another mandatory and non-mandatory field of your choice
- Add a new order line and item and verify the defaults are selected
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 24 Apr 2020 11:49:21 +0000 (11:49 +0000)]
Bug 25274: Don't initialize DataTable if table isn't present
This patch modifies the OPAC basket JavaScript so that a check is added
for the existence of the "itemst" table. This avoids an error if the
"More details" view is selected and hte "itemst" table isn't present.
To reproduce the error, add some items to the OPAC cart and open the
cart window. Open the JavaScript console in your browser and click the
"More details" link. You'll see an error.
To test, apply the patch and perform the same test as above. The error
should not be present. Test that table sorting in the "brief" view words
correctly.
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 14 Apr 2020 11:52:17 +0000 (11:52 +0000)]
Bug 25118: Return claims has some translation issues
This patch adds the right function calls to checkouts.js so that English
strings can be picked up by the translator. The resolution message has
been reformatted so that it can be clear without including "on" and
"by" in the middle of the string.
To test you should have a patron with at least one return claim. Open
the checkout page for that patron and open the "Claims" tab. Test the
process of editing, deleting, and resolving claims.
TESTING TRANSLATABILITY
- Update a translation:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the staff
client: misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from checkouts.js for translation, e.g.:
#: koha-tmpl/intranet-tmpl/prog/js/checkouts.js:920
msgid "Double click to edit"
msgstr ""
- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:
> perl translate install fr-FR
Switch to the udpated translation and test the functionality under the
"Claims" tab again to confirm that your translated strings appear.
Note that "untranslatable string" failures reported by the QA script are
false positives.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 25257: Preserve prolog on translated XML files
This patch fix the missing xml prolog in translated
files, XML or TT.
Is fixed teaching C4::TTParse not to ignore <?..?> constructs,
then teaching xgettext.pl to ignore those strings. Net result is
that they are copied in the translated file.
To test:
1) Update & install your preferred language,
(cd misc/translator/; perl translate update xx-YY; perl translate install xx-YY )
2) Compare the first lines (head -2) of:
koha-tmpl/opac-tmpl/bootstrap/en/xslt/compact.xsl
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt
koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl
and
koha-tmpl/opac-tmpl/bootstrap/xx-YY/xslt/compact.xsl
koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-opensearch.tt
koha-tmpl/intranet-tmpl/prog/xx-YY/xslt/plainMARC.xsl
Check the missing prolog
3) Install this patch, repeat 1 and 2, now the prolog is present
on translated files.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 25224: Show large print format in search results XSLT
To test:
1: find a bib with 008 type Book
(Leader position 6 = 'a' and leader position 7 = 'm' -- use bib number 1 in master data)
2: set 008 position 23 to 'd' for large print
3: check your book record in opac and intranet search results, note that your change is not reflected in the "format" note in line with material type
4: find a bib with 008 type Continuing Resource
(Leader position 6 = 'a' and leader position 7 = 's' -- use bib number 44 in master data)
5: set 008 position 23 to 'd' for large print
6: check your continuing resource record in opac and intranet search results, note that your change is not reflected in the "format" note in line with material type
7: apply patch, restart_all
8: reload search results from steps 3 and 6, confirm they now say "format: large print"
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Mon, 20 Apr 2020 09:13:40 +0000 (11:13 +0200)]
Bug 25186: Fix accordion sections height in columns configuration page
The height for each section was the height of the highest section.
Now the height is set to the length of the section.
Test plan:
Go to Administration > Column configuration
Open the sections and confirm that the height fits its content.
QA: note that I guess "autoHeight: false" was meant to achieve that,
but it does not exist in the API of the plugin.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Sat, 11 Apr 2020 10:36:36 +0000 (10:36 +0000)]
Bug 24768: Add 'Return claims' to column configuration for checkouts tables
The checkouts tables on the checkouts and details tabs in the staff
patron account support column confiugration, but the new column
"Return claims" was missing.
This patch adds the column to the column configuration.
To test:
- Make sure to test with a patron having return claims and without
- Verify cou can toggle the visibility of the return claims column
from top of the tables in the checkouts and details tabs
- Go to administrastion > column configuration
- Change the settings for the issues tables in the Patrons and
Circulation sections
- Verify the changes have been applied to the tables as configured
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Phil Ringnalda [Sun, 19 Apr 2020 02:37:49 +0000 (02:37 +0000)]
Bug 20501: Don't cut strings when unhighlighting in intranet search results
When you click Unhighlight on the search results of a search in the staff client
when the search terms contain the same word twice, like "ma ma", the highlighted
words disappear, and don't reappear if you click Highlight.
This patch makes the same change to the intranet copy of jquery.highlight-3.js that
bug 5844 made to the OPAC copy.
Test plan:
1) Without this patch, search in the intranet for ma ma and verify you have at least
two matching records.
2) Notice that the Ma in Material type: Book is highlighted.
3) Click Unhighlight, and notice that it has become terial type: Book
4) Apply this patch, repeat the search with a shift+reload to reload the .js
5) Click Unhighlight, and verify that Material type: Book remains Material
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Mon, 20 Apr 2020 18:41:37 +0000 (18:41 +0000)]
Bug 25223: Make join of aqbasket and aqorders explicit
This is simply a SQL change that makes things a bit easier to read
and also prevents too much data being returned in a large system
To test:
1 - Have some orders in your system in the ordered status
2 - Click the 'Ordered' amount for your budget from Acquisitions home
3 - Note the view of orders, possibly screen shot
4 - Apply patch
5 - Restart all the things
6 - Reload the ordered page
7 - Confirm nothing has changed
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Martin Renvoize [Mon, 20 Apr 2020 07:37:10 +0000 (08:37 +0100)]
Bug 25123: (QA follow-up) Re-used variable name
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Mon, 13 Apr 2020 11:38:28 +0000 (11:38 +0000)]
Bug 25123: Count the current fine when reducing for maxFine
If maxFine is set, we total the patrons outstanding fines when making an adjustment, however, we neglect to count the amount of a currently updating fine when doing so.
To test:
1 - Set maxFine to 5
2 - Create an overdue amount of 4.99 for a patron
3 - Set an itemtype to have a fine of $.10 per day
4 - Checkout an item of that type to a patron and backdate the due date so it is overdue
5 - Run fines.pl with -v
6 - Note the fine is reduced from $.10 (or a multiple) to .01
7 - Run it again, a second cent is added
8 - Repeat and note it keeps happening until the amount of the fine is reached, exceeding the maxFine setting
9 - Apply patch
10 - Note the fine is now reduced to 0 and nothing is added to account
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Mon, 13 Apr 2020 11:38:23 +0000 (11:38 +0000)]
Bug 25123: Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Sun, 12 Apr 2020 22:06:05 +0000 (22:06 +0000)]
Bug 14369: Only show 'Create labels' link on staged records import when status is imported
The label creator won't be able to add a batch for items, if they are
not imported into the database (missing itemnumber). This patch hides
the link, when the status is not imported, to avoid the error situation.
To test:
- Export a record with items from your Koha installation
- Delete items and record from Koha
- Stage the record with the items - the "Create labels" link should be showing
- Try to create the labels - note error
- Apply patch
- Retry - the link should no longer show
- Import the records - the link should show now
- Create labels again - a new batch should have been created
- Verify the link on the batch # leads to the batch in the labels module
Bonus: Moves the message from the .pl file to the template to make
it translatable.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Wed, 8 Apr 2020 10:11:38 +0000 (10:11 +0000)]
Bug 20484: Allow configuration of ES before switching to ES
To test:
1 - Set SearchEngine syspref to Zebra
2 - Be a user with permission to manage search engine configuration (manage_search_engine_config)
3 - Confirm you do not see 'Search engine configuration' on Admin main page
4 - Apply patch
5 - Confirm you see it with '(Elasticsearch)' appended
6 - Be a user without above permission
7 - Confirm you cannot see the 'Search engine configuration'
8 - Confirm you cannot access directly:
/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Mon, 13 Apr 2020 21:45:22 +0000 (21:45 +0000)]
Bug 13557: Add hint for on-site checkouts to list of current checkouts in OPAC
In the list of checkouts it's currently not possible for the
patront or tell the difference between normal checkouts (item
is at home with them) and on-site checouts (items remained at
the library). This patch adds a hint to the list of checkouts to
allow differentiating these kinds of checkouts.
To test:
- In your patron account, have multiple checkouts, some on-site,
some others, overdue items, etc.
- Go to: OPAC > your summary > Checked out
- Verify that there is no hint for the on-site checkouts
- Apply patch
- Check again, there should now be a note
The note also has a class, so would be easy to be hidden
or formatted differently: class="onsite_checkout".
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Tue, 14 Apr 2020 13:14:37 +0000 (13:14 +0000)]
Bug 21211: Add patron toolbar to suggestions, discharges and ill requests tabs
When paging through the patron account in staff, using the tabs on
the right, you notice that some pages are missing the patron toolbar
on top and that the headings, where they exist, vary in size.
This patch adds the patron toolbar to 3 more tabs and changes headings
to h1 to be consistent with older tabs. It has also been suggested on
another tab that this is preferrable for screen readers.
Note: Modification log was left out for now, as this is also used in tools.
To test:
- Activate ILL (ILLModule pref)
- Activate discharges (UseDischarge pref)
- Go to any patron account, tab through the tabs...
- Verify that discharge, purchase suggestions and ill requests are
missing the toolbar
- Apply patch
- Verify that the toolbar now appears on these pages and works
correctly
- Also veriy that the headings are now consistently h1 on all pages
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Tue, 14 Apr 2020 16:57:38 +0000 (16:57 +0000)]
Bug 18680: Add an empty entry by default to sort1/sort2 values in patron account
When using sort1/sort2 with authorised values to create a pull down
list, there will be no empty entry unless one is manually added to
the authorised values list.
This is not a good default behaviour, as it can easily
cause errors on patron creation. Without the empty entry, the first
alphabetic value is pre-selected and will be saved if not explicitly
changed. It also doesn't allow to mark sort1/sort2 as mandatory,
as the value is always 'set', the required message won't be triggered.
This adds an empty parameter to av-build-dropbox.inc to allow selectively
adding this empty entry without causing side-effects in other places
this include is used.
To test:
- Create authorised values for either Bsort1 or Bsort2 authorised
value category
- Create a new patron:
- you should see a pull down list on one and an input field for the other
- for the pull down list, there will be no empty entry and the first
alphabetic value will be preselected
- Make your sort1 and sort2 mandatory using BorrowerMandatoryField
- Verify there is still on empty entry
- Apply patch
- Repeat tests and verify that the behaviour is as expected
- There should now be an empty entry
- When the field is marked mandatory and empty is left, the required
warning will be shown.
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Mon, 13 Apr 2020 01:46:25 +0000 (03:46 +0200)]
Bug 10561: Rephrase DisplayOPACiconsXSLT and DisplayIconsXSLT slightly
As the pref removes the whole 'line' of information, this tries to makes
the behaviour a little clearer by adding a 'and descriptions' to the pref
text. It now reads:
[Show|Don't show] the format, audience, and material type icons and
descriptions in XSLT MARC21 results and detail pages in ...
To test:
- Check both preference descriptions in the staff client
- Verify the text reads correctly and this helps things
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Owen Leonard [Sun, 29 Mar 2020 00:19:39 +0000 (00:19 +0000)]
Bug 25016: Coce should not return a 1-pixel Amazon cover image
This patch adds an onload function to the JavaScript which loads images
from Coce. In the case where the image is 1 x 1 pixel the image should
be removed.
To test you should have Coce enabled and Amazon.com included in the list
of sources.
- Apply the patch and view the bibliographic details page under a
variety of conditions:
- A title which has a matching Amazon image:
- The image should load as expected.
- A title which doesn't have a matching Amazon image
- The image should not be found in the source at all after the page
has loaded.
- Test with local cover images enabled
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Owen Leonard [Fri, 17 Apr 2020 11:40:36 +0000 (11:40 +0000)]
Bug 25176: Fix style of checkout form
This patch makes a small CSS change in order to fix a display problem
with the checkout form where the form's width doesn't match that of the
"last checked out" message.
To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Check an item out to a patron. Confirm that the green-bordered "Checked
out" message under the checkout form matches the width of the form.
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 11 Mar 2020 11:56:41 +0000 (12:56 +0100)]
Bug 24800: Add tests
Signed-off-by: Clemens Elmlinger <clemens.elmlinger@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 11 Mar 2020 12:01:52 +0000 (13:01 +0100)]
Bug 24800: Handle inexistent return date on self checking
See bug 24800 comment 0 for a description of the problem.
We do not want the SIP server to crash if it receives a checkin request
with a return date that is not given.
The option this patch chose is to parse it only if provided.
Signed-off-by: Clemens Elmlinger <clemens.elmlinger@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Several changes related to AddressFormat are wrong:
- [% IF Koha.Preference( 'AddressFormat' ) %]
- [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
- [% ELSE %]
- [% INCLUDE 'member-main-address-style-us.inc' %]
- [% END %]
+ [% SWITCH Koha.Preference( 'AddressFormat' ) %]
+ [% CASE 'de' %]
+ [% INCLUDE 'member-main-address-style-de.inc' %]
+ [% CASE # us %]
+ [% INCLUDE 'member-main-address-style-us.inc' %]
+ [% END %]
Test plan:
Create a patron with all the address fields filled
Play with the 3 option values of AddressFormat, and confirm that the address is displayed correctly
on the patron's view, and in the patron module (top left)
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Thu, 26 Mar 2020 11:05:32 +0000 (11:05 +0000)]
Bug 24840: [19.11.x] Replace DateTime->now with dt_from_string
We should use Koha::DateUtils instead of Date::Time directly
This patch simplay replaces calls to now() with a call to dt_from_string()
which does effectively the same thing.
Probably reading the code and verifying changes is sufficient but...
To test:
1 - confirm the files all compile
2 - confirm all tests pass
3 - confirm Koha still works
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 24840: Catch some further cases of DateTime->now
This patch corrects a few additional cases where DateTime->now is called
directly instead of via Koha::DateUtils.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Mon, 10 Feb 2020 18:18:45 +0000 (18:18 +0000)]
Bug 24620: [19.11.x] Close existing transfer when hold set to waiting (squashed)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 24620: Close existing transfers when setting item to waiting
This patch adds a clause in ModReserveAffect to check if there
are existing transfers and close them when setting a hold to waiting
To test:
1 - Set AutomaticItemReturn to Do
2 - Checkin an item from Library B at Library A
3 - Confirm item is in transfer (check the details page)
4 - Place a item level hold for pickup at library A
5 - Checkin the item at Library A
6 - Confirm the hold
7 - View the details page
8 - Note the item is in transit and waiting
9 - Apply patch
10 - Delete hold and repeat
11 - Confirm that transfer is closed when hold marked waiting
Signed-off-by: Sally <sally.healey@cheshirewestandchester.gov.uk> Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 24620: Fix test, remove replaced code, use dt_from_string
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Kyle M Hall [Tue, 30 Jan 2018 16:10:07 +0000 (11:10 -0500)]
Bug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action logs
C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl.
Test Plan:
1) Apply this patch
2) Enable CronjobLog
3) Run automatic_item_modification_by_age.pl succesfully
4) Note the run is noted in the action logs
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
To test:
1. Do not apply any patch
2. Set PatronSelfRegistrationVerifyByEmail preference to require
3. Fill self registration form in opac and submit
CHECK => OPAC dies with a nasty message, that says Field 'changed_fields' doesn't have a default value
4. Apply this patch and updatedatabase
5. Repeat step 3
SUCCESS => Registry process continues as expected
6. Sign off
Sponsored-by: Orex Digital Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Owen Leonard [Sat, 28 Mar 2020 17:42:50 +0000 (17:42 +0000)]
Bug 25007: (follow-up) Fix the way image check alters layout
A question in the bug report asks: Why is is necessary to change the
Bootstrap class to col-xs-12? The JavaScript which checks for the
existence of an Amazon cover image is designed to remove the Amazon
cover's container if there is none. Changing the class of
cover image column is gone.
However, the check is incorrect because it doesn't account for Local
Covers. There might be both a 1 x 1 pixel Amazon image and a local cover
image, so the layout shouldn't be changed unless there are no images
present.
To test, apply the patch and view the bibliographic details page of
various titles including:
- Amazon cover present, no local cover
- No Amazon cover, local cover image present
- Both Amazon and local cover image
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Lucas Gass [Fri, 27 Mar 2020 20:40:30 +0000 (20:40 +0000)]
Bug 25007: Check for normaalized ISBN when building Amazon link
TO RECREATE:
-Have Amazon images turned on and local images too.
-Have a record with a local cover image
-Make sure the record has no ISBN in 020 field.
-Load detail page of that record and see that the local cover images is
not on the right hand side like it should be but forced underneath
'catalogue_detail_biblio' in an odd spot.
-Apply patch and reload page
-The image should be back in its normal spot
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Mon, 13 Apr 2020 02:32:56 +0000 (04:32 +0200)]
Bug 22468: Standardize on labelling ccode table columns as Collections
We now display the descriptions everywhere, so we should drop the
'code' from labels.
This changes text in a lot of playes in Koha, including:
- The relatives checkouts table when displayed for the guarantor
- The new order and order receive forms in acquisitoins (item creation)
- The description of CCODE in the authorised values table
- The column description on results in item search
- The branch tranfers page
- Course reserves: add reserve items (one and in batch)
- Patron account > statistics tab
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Sat, 11 Apr 2020 13:40:39 +0000 (13:40 +0000)]
Bug 25120: Make accounting the default tab when opening the pref editor
The default/active tab when opening the sys pref editor used
to be 'Acquisitions' as the first tab, but should now be the new
first 'Accounting'
To test:
- Go to Administration > System preferences
- Verify the Aquisition tab is second and preselected
- Apply patch
- Repeat
- Verify now Accounting is selected
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Fridolin Somers [Wed, 11 Mar 2020 14:39:18 +0000 (17:39 +0300)]
Bug 21865: allow test arg alone
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Fridolin Somers [Mon, 19 Nov 2018 14:45:49 +0000 (15:45 +0100)]
Bug 21865: add confirm to remove_unused_authorities.pl script
Like in most scripts in misc, add confirm argument
to ensure script is not run without knowing what it does.
Test plan:
1) Run misc/migration_tools/remove_unused_authorities.pl -h
2) You see help line for confirm
3) Run misc/migration_tools/remove_unused_authorities.pl
4) You see help and script does nothing
5) Run misc/migration_tools/remove_unused_authorities.pl -c
6) Script runs like wanted
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Fridolin Somers [Mon, 19 Nov 2018 14:19:46 +0000 (15:19 +0100)]
Bug 21865: ES compatiblity of remove_unused_authorities.pl
The script misc/migration_tools/remove_unused_authorities.pl directly checks if Zebra search is OK.
This patch changes so that this test is only if Zebra is the search engine.
It also adds a test on the search off any authority number indexed (index 'an').
With Zebra its : an,alwaysmatches=''
With ES its : an:*
This test ensure that biblios records are indexed and that not all autorities will be deleted.
Test plan:
1) On a catalog create a new authority
2) Use Zebra in systempreference SearchEngine
3) Stop Zebra server
4) Run misc/migration_tools/remove_unused_authorities.pl -c
5) The script does nothing and says :
Zebra server seems not to be available. This script needs Zebra runs.
6) Restart Zebra server
7) Delete biblio index base
8) Run misc/migration_tools/remove_unused_authorities.pl -c
9) The script does nothing and says :
Searching authority number in biblio records seems not to be available : an,alwaysmatches=''
10) Use ElasticSearch in systempreference SearchEngine
11) Delete biblio index base
12) Run misc/migration_tools/remove_unused_authorities.pl -c
13) The script does nothing and says :
Searching authority number in biblio records seems not to be available : an:*
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
remove_unused_authorities.pl script can be improved.
This patch changes changes verbosity so than test mode can be used
to know the autorities that are used and those that can be deleted.
It also writes a line in output if limited authority type(s).
This patch also removes the unused vars $thresholdmin and $thresholdmax.
It also changes the query to use SQL with parameters for authority types.
Test plan :
1) On a catalog create a new authority
2) Be sure catalog is well indexed
3) Run misc/migration_tools/remove_unused_authorities.pl -t
4) You will see the line :
*** Testing only, authorities will not be deleted. ***
5) You will see lines of :
authid=x type=y : used X time(s)
6) You will see the line for the authority created in 1) :
authid=x type=y : can be deleted
7) You will see at the end :
x authorities parsed
y can be deleted because unused
z unchanged because used
8) Run misc/migration_tools/remove_unused_authorities.pl
9) You don't see the line :
*** Testing only, authorities will not be deleted. ***
10) You will see lines of :
authid=x type=y : used X time(s)
11) You will see the line for the authority created in 1) :
authid=x type=y : deleted
12) You will see at the end :
x authorities parsed
y deleted because unused
z unchanged because used
13) Run misc/migration_tools/remove_unused_authorities.pl --auth NP --auth CO
14) You see the line :
Restricted to authority type(s) : NP,CO.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
David Roberts [Sat, 4 Apr 2020 23:13:00 +0000 (23:13 +0000)]
Bug 25053: Clarify the description of syspref PatronSelfRegistrationExpireTemporaryAccountsDelay
This patch changes the wording of this system preference.
To test:
1) Check the current wording of this system preference.
2) Install the patch.
3) Check that the wording of this system preference has changed to "Delete patrons still in the category indicated by PatronSelfRegistrationDefaultCategory X days after account creation."
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Kyle M Hall [Thu, 30 Jan 2020 15:29:05 +0000 (10:29 -0500)]
Bug 24547: Add more action logs for holds
It seems like ModReserveFill and ModReserveAffect should both produce action logs for holds.
Test Plan:
1) Apply this patch
2) Place a hold
3) Check in the item to trap the hold
4) Check out the item to fill the hold
5) Check the action logs for that reserve id
6) Note the new logs!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Tue, 31 Mar 2020 14:39:12 +0000 (16:39 +0200)]
Bug 25027: Use localStorage instead of sessionStorage for results browser
Staff side, when a search a done and a result clicked, a browser appears
on the left, to navigate between the different results.
We use sessionStorage to know the list of biblionumber from the result.
As sessionStorage is only for the current tab, we do some ugly things,
to catch the click events, then open the new tab, attach it to the
current window, and put the focus back on the result list.
We really should not do that, and let the user decide what they want to
do with their clicks!
To do so, let use the correct storage, localStorage, and have the
results shared between the windows.
We may need to clear that at some point, isn't it?
Test plan:
Launch a search, click result (left or middle), confirm you see the
browser and that the window/tab opened like any other websites
(depending on your web browser settings).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
David Roberts [Mon, 13 Apr 2020 01:22:07 +0000 (01:22 +0000)]
Bug 20370: Misleading comment for bcrypt - #encrypt it; Instead it should be #hash it
This patch changes the wording of the comment
To test:
1) Check the wording of Line 67 of Koha/AuthUtils.pm
2) Apply the patch
3) Check that the wording has changed from "Encrypt it" to "Hash it"
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Liz Rea [Thu, 9 Apr 2020 15:50:04 +0000 (15:50 +0000)]
Bug 24993: fix increment
Aparently ((i++)) isn't portable, changed for an admittedly uglier
but functional increment.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 8 Apr 2020 09:57:06 +0000 (11:57 +0200)]
Bug 24993: Make sure we are not going to loop indefinitely
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Thu, 2 Apr 2020 10:36:16 +0000 (12:36 +0200)]
Bug 24993: Make sure SIP server is stopped before restarting it
Sometimes doing koha-sip --restart instance happens too fast and
the SIP server is not started.
To test:
- have SIP enabled and running for your instance
- issue a restart, make sure it restarts
sudo koha-sip --restart inst
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 25008: Overload Koha::RecordProcessor->options to update filters
This patch overloads the 'options' accessor generated by Class:Accessor.
It does so the passed options are used to refresh the loaded filters.
Tests are added for this overloaded method as well.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/RecordProcessor.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This patch highlights a behaviour of Koha::RecordProcessor that is
unexpected: if you change the original options using ->options, the
loaded filters don't pick the change. That's because the filter objects
are loaded on ->new, and they are never updated.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/RecordProcessor.t
=> FAIL: Test prove ->options doesn't update the filters!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Lucas Gass [Thu, 26 Mar 2020 22:46:26 +0000 (22:46 +0000)]
Bug 24764: TinyMCE shouldnt do automatic code cleanup when editing HTML in News Feature
TEST PLAN:
1. Make a new news item and use the TinyMCE editor, click on the <> icon to go to the Source code editor
2. Add some HTML like <i class="fa fa-facebook-official" aria-hidden="true">TEST</i> and save it.
3. Go back in and notice that TinyMCE has changed it to: <p><em class="fa fa-facebook-official">TEST</em></p>
4. It should not auto clean up and also it should not autowrap with <p> tag.
5. Apply patch patch, and repeat step 2. Save again.
6. It should not have automatiicly changed any HTML or added any <p> wrapper.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Marcel de Rooy [Thu, 19 Mar 2020 13:39:14 +0000 (14:39 +0100)]
Bug 24903: Add tests for _handle_seqno
Trivial tests.
Test plan:
Run t/Serials/ModSerialStatus.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Marcel de Rooy [Thu, 19 Mar 2020 13:20:38 +0000 (14:20 +0100)]
Bug 24903: Special characters like parentheses in numbering pattern cause duplication in recievedlist
Test plan:
Use serial with a numbering pattern with parentheses like "2018 (No. 1)".
Mark serial issue as arrived, check receivedlist on summary.
Edit issue again, check if not duplicated on receivedlist.
Mark issue as missing or not available, check missinglist.
Mark missing issue as not missing, check list again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Tue, 7 Apr 2020 11:25:09 +0000 (13:25 +0200)]
Bug 25038: Fix tabs on the OPAC reading history view
OPAC reading history table has three tabs for different checkout types: All, Checkouts, On-site checkouts.
However, all of your checkouts are visible every tab regardless of checkout type.
Test plan:
1. Enable OnSiteCheckouts system preference
2. Perform two checkouts: one normal checkout, one on-site checkout
3. Go to OPAC /cgi-bin/koha/opac-readingrecord.pl
4. Observe your checkouts all are visible in first tab
5. Select second tab and notice that the table is now filtered
6. Same with third tab
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Kyle M Hall [Fri, 10 Apr 2020 10:43:51 +0000 (06:43 -0400)]
Bug 24966: Add unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 24966: (QA follow-up) Fix return value of hold_patron_bcode
It is used in list context, but we need a scalar value.
Can be fixed by adding scalar's, or returning empty string as here.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Martin Renvoize [Fri, 3 Apr 2020 10:16:39 +0000 (11:16 +0100)]
Bug 25040: monkeypatch Schema::Loader for recent MariaDB
Recent versions of MariaDB changed the output of 'DESCRIBE' for
timestamp columns with defaults from `CURRENT_TIMESTAMP` to
`current_timestamp()`. As such the code inside
DBIx::Class::Schema::Loader which catches such cases and outputs
`\"current_timestamp"` as a sensible cross platform default is missed
and this leads of inconsistent class files and bugs with out default
lookup code in Koha::Objects.
This patch serves as a backport of the code I have submitted upstream
such that out developers can continue to use update_dbix_class_files.pl
to build their schema classes from the database and regardless of their
db server version get a consistently correct output.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Fri, 3 Apr 2020 12:14:27 +0000 (12:14 +0000)]
Bug 25050: Adjust marc_records_to_documents to search entire mapping array
There was an assumption in the ES code that match-heading mappings will appear in
a specified portion of the mappings array.
Certain mappings setups will not meet this assumption.
We need to move our searching up one level
The key seems to be having a mapping for a complete field, say 150, in both the
match-heading and another field as well as having mappings for ungrouped fields like
150a 150ab etc.
The unit test coverage should be sufficient for testing
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Fri, 3 Apr 2020 12:12:49 +0000 (12:12 +0000)]
Bug 25050: Unit tests
This patch simplay alters the data we use for the tests, doing so causes them to fail
To test:
1 - Apply only this patch
2 - prove -v t/Koha/SearchEngine/Elasticsearch.t
3 - It fails!
4 - Apply next patch
5 - It passes!
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Aleisha Amohia [Mon, 16 Mar 2020 22:09:51 +0000 (22:09 +0000)]
Bug 24266: (alternate patch) Only use defined borrowernumbers in reconcile_balances.pl cron
I believe the error is triggered when borrowernumbers are left empty in
the accountlines table. Not sure why this would happen, but it appears
to be what causes the problem.
Do not apply the first patch if testing this patch.
To test:
1) sudo koha-mysql INSTANCENAME
2) Create a test borrower, add any payment etc to create an accountline,
then delete this borrower
3) ensure the AccountAutoReconcile syspref is disabled
4) Go to another borrower's accounting tab
5) Create a manual credit or debit. Confirm this shows in the 'Make a
payment' tab as an amount that COULD be applied, but isn't automatically
applied
6) in your terminal, run the reconcile_balances.pl script
7) Confirm the error does not show in the logs and the balance for
the borrower is correctly reconciled.
Sponsored-by: Horowhenua District Council Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Kyle M Hall [Thu, 9 Apr 2020 12:24:44 +0000 (08:24 -0400)]
Bug 25095: Remove warn left in FeePayment.pm
It appears that a debugging statement was accidentally left in FeePayment.pm by bug 5605.
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Kyle M Hall [Thu, 25 Apr 2019 19:50:35 +0000 (15:50 -0400)]
Bug 22778: Suggestions with no "suggester" can cause errors
If one tries to modify a suggestion that has no suggester you will get the following error:
Can't call method "lang" on an undefined value at /usr/share/koha/lib/C4/Suggestions.pm line 506
Koha assumes that every suggestion has a borrowernumber in suggestedby
Test Plan:
1) Create a suggestion with an unpopulated suggestedby
2) Attempt to modify that suggestion
3) Note the error
4) Apply this patch
5) Restart all teh things
6) Attempt to modify that suggestion
7) No error!
Signed-off-by: David Roberts <david@koha-ptfs.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23514: Split Call Numbers for all layout types
This patch ensures call numbers are properly split for layout types
other than 'BAR'.
Test plan:
1. Go to Label Creator and choose/create a Label Layout with "Choose
layout type: Biblio"
2. make sure you have at least "itemcallnumber" in Bibliographic data to
print/Data fields
3. check "Split call numbers" box and save the layout (ie testlayout)
4. create a label batch, using items that have a call number (ie
DC611.B848 H84 1997). LCC is used here, but you may try with Dewey as
well.
5. export selected batch using any template and the layout you created
in previous step to a PDF
6. Call numbers are splitted (as expected) in the resulting PDF file
7. edit the layout you created in the previous step (ie testlayout) and
change the "Choose layout type:" to either Biblio/Barcode (BIBBAR) or
Barcode/Biblio (BARBIB)
8. export the same batch using the same template and layout as before
9. Call numbers are NOT splitted at all
After patch is applied, call numbers splitting functions are applied
even in Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) layout types.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 25081: Fix creation of new item for a received issue
The Bug 23435 introduced the idea of multiple copies added while
receiving a new issue. Unfortunately, under some circumstances, it
causes no items being added at all. It occurs stochastically, only
under some conditions. But it is quite likely to happen while receiving
a supplemental issue.
The reason fot hist is that, in serials-edit.pl, line ca 292 and infra,
@num_copies is treated in the same way as @tags, while it should be
treated similarly to @bibnums. It will be obvious after examining the
content of parameters tag, subfield, field_value, ..., number_of_copies.
In other words, for every edited issue number_of_copies is a scalar.
Nota bene:
a) beter to initialize $countdistinct with zero;
b) note that in master, now, before applying the patch,
$itemhash{$item}->{'num_copies'} is treated once as a scalar
and in the next line--as an array:
$itemhash{$item}->{'num_copies'} //= 1;
for (my $copy = 0; $copy < $itemhash{$item}->{'num_copies'}[$index];){
TEST PLAN
=========
1. Have a subscription with the option "Create an item
record when receiving this serial" active and try to receive a
supplemental issue. Control that a new item under the biblio record
(usually) will not be created.
2. Apply the patch.
3. Repeat p. 1 -- a new item should be created.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 8 Apr 2020 09:28:31 +0000 (11:28 +0200)]
Bug 25046: Add test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Andreas Roussos [Thu, 2 Apr 2020 17:14:57 +0000 (19:14 +0200)]
Bug 25046: Include borrowers.othernames in SELECT statement
In C4/Utils/DataTables/Members.pm, the SELECT statement that fetches
patron data from the database does not include borrowers.othernames
in the field list. As a consequence, when the output is in the form
of a DataTable, the Template Toolkit files that refer to .othernames
(such as the patron-title.inc include) won't display the information
from the 'Other name' input field if that field has been filled in.
This patch fixes that.
Test plan:
0) Have a few patrons with some data in the 'Other name' field.
1) Perform a generic search in Home > Patrons to ensure you will get
a DataTable with results.
2) Observe that the 'Name' column does not include 'Other name' info.
3) Apply the patch, and restart Plack if necessary.
4) Repeat your search: this time you should see the information from
the 'Other name' field, it will be next to the patron's First name
and within parentheses.
Sponsored-by: Eugenides Foundation Library Signed-off-by: Devinim <nazli@devinim.com.tr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
David Roberts [Fri, 3 Apr 2020 15:23:01 +0000 (15:23 +0000)]
Bug 24940: Serials statistics wizard: order vendor list alphabetically
This patch changes the dropdown from being sorted by aqbookseller.id to
aqbookseller.name
To test:
1) Add at least 2 vendors:
- First: ZZZZ
- Second: AAAA
2) Add subscriptions for each of the vendors
3) Check the pull down in the serials statistics wizard and verify it
lists them as ZZZZ, AAAA
4) Apply the patch
5) Re-check the pull down in the wizard and check that the vendors are
now listed AAAA,ZZZZ
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 25019: Make the ViewPolicy filter initialization standard
This patch makes the ViewPolicy filter use the 'params' accessor instead
of relying of ->{options} which has no accessor. This will allow
interacting with the filter object be similar through all the filters in
the chain.
To test, we just need to verify no behaviour change takes place:
1. Run:
$ kshell
k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Marcel de Rooy [Fri, 4 May 2018 08:42:38 +0000 (10:42 +0200)]
Bug 20754: DB revision to remove double accepted shares
[Originally submitted for bug 11943, parked at 20754.]
[Attempt to revive it now.]
Although it is no problem to have them, we could do a cleanup.
This patch just removes duplicate rows from the table.
Note: I considered adding a unique index like:
ALTER TABLE virtualshelfshares ADD UNIQUE INDEX (shelfnumber, borrowernumber, invitekey);
But the possible NULL values in borrowernumber and/or invitekey require
additional code changes. So I left it alone.
Test plan:
[1] Create two records with same borrowernumber and shelfnumber in the shares
table, if not present already.
[2] Run updatedatabase.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Julian Maurice [Thu, 6 Feb 2020 15:15:43 +0000 (16:15 +0100)]
Bug 24604: Add 'Pay' button under Transactions tab in patron accounting
It does the same thing as the 'Pay' button under 'Make a payment' tab.
It is nothing more than a shortcut.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Bug 18227: (QA follow-up) Add fix to koha-common.postinst
Now koha-common.postinst has a way to patch log4perl configs on
instances, we should patch the Z3950 responder config accordingly,
before it is backported to 19.11 or the 20.05 release :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
No more wide characters in print when logging to a file with Koha::Logger.
Test with this string
"♯Turpo :"
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Katrin Fischer [Thu, 26 Mar 2020 21:30:06 +0000 (21:30 +0000)]
Bug 25010: Fix typo 'rewewal' in debit types
This fixes a typo in the debit type description of
RENT_DAILY_RENEW
1) Go to Administration > Debit types
2) Show all debit types
3) Check for the typo
4) Apply patch
5) Verify that the typo is gone
6) Check account_debit_types table for type:
SELECT * FROM account_debit_types;
7) Run database update
8) Repeat and verify typo is gone
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 1 Apr 2020 08:58:28 +0000 (10:58 +0200)]
Bug 25024: Do not escape $
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Tue, 31 Mar 2020 13:55:21 +0000 (13:55 +0000)]
Bug 25024: Make grep match full string
To test:
1 - Create or have a branch with code CPL
2 - Create two new branches 'ACPL' and 'CPLA'
3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA
4 - Set UseBranchTransferLimits to 'Enforce'
5 - Find a biblio with one item belonging to FPL
6 - On opac, attempt to place a hold
7 - Note that ACPL and CPLA don't show in dropdown, OK
8 - Note that CPL is disabled, NOT OK
9 - Apply patch
10 - Place hold
11 - CPL is now enabled
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Nick Clemens [Mon, 30 Mar 2020 15:16:36 +0000 (15:16 +0000)]
Bug 23601: Prevent default for auxclick
The issue appears to be that the default action is not prevented for middle click because it registers
an 'auxclick' event as opposed to a 'click' event
To test:
1 - Perform a search in staff client
2 - Shift-click and hold on a result
3 - Note a new tab opens
4 - Release the click, no change
5 - Middle click and hold on a result
6 - New tab opens
7 - Release, a second new tab opens
8 - Apply patch
9 - Reload page
10 - Middle click and hold
11 - New tab opens
12 - Release
13 - No new tab
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Mon, 6 Apr 2020 09:44:18 +0000 (11:44 +0200)]
Bug 24964: [19.11.x] Do not fetch all patrons for owner/users of funds
admin/add_user_search.pl sets 'patrons_with_acq_perm_only', to only
retrieve patrons with acq (order_manage) permissions.
The original bug was hidden in the existing code, but the behavior was
terrible.
To prevent patrons matching the permissions contrainst to be hidden, we
fetched ALL the patrons from the DB, then filtered them depending on
their permissions. This might have awful performance on DB with lot of
patrons.
So basically with this patch we are adding the pagination back to the
"owner/users for funds" feature, as the permission filtering is now done
at DB level.
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 25 Mar 2020 12:50:45 +0000 (13:50 +0100)]
Bug 24964: [19.11.x] Prevent random failures sorting by borrowernumber
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 25 Mar 2020 10:21:15 +0000 (11:21 +0100)]
Bug 24964: [19.11.x] Do not filter patrons after they have been fetched
The svc/members/search script is called in different places.
In some places (Set owner for a fund, add users to a fund, or set a
manager to a suggestion), we need patrons to be filtered depending on
the permissions they have.
For instance you can only set a fund's owner with a patron that has
acquisition.order_manage.
Currently we have fetching X (default 20) patrons, then filter them
depending on their permission.
Says you have 3 patrons that have the correct permissions but are not in
the 20 first patrons, if you do not define a search term, the search
result will be empty.
This is not ideal and we should filter when requesting the DB.
Test plan:
- Have more than 20 patrons, remove them their permissions
- Create 3 more:
1 superlibrarian
1 with the full acq permission
1 with acquisition.order_manage
- Create a fund and set a owner
- Search for patrons, without specifying a search term (to get them all)
=> Without this patch the new patrons you created are not displayed
=> With this patch they are!
Same test plan apply to set a manager to a suggestion (freshly pushed,
see bug 23590), with suggestions and suggestions.suggestions_manage
Note: The code has been written that way to rely on
C4::Auth::haspermission, but the SQL query is quite trivial and the gain
is important.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Jonathan Druart [Wed, 25 Mar 2020 10:20:20 +0000 (11:20 +0100)]
Bug 24964: [19.11.x] Add tests
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Martin Renvoize [Thu, 5 Dec 2019 17:42:50 +0000 (17:42 +0000)]
Bug 24183: Add before_send_messages hook
This patch adds a simple hook to the process_message_queue cronjob
to allow plugins to pre-process messages in the messaging queue before
they are sent.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>