Bug 28872: make AcquisitionLog, NewsLog, NoticesLog use 1/0 for their values
To test:
1 - edit AcquisitionLog, NewsLog, NoticesLog to change their values
2 - in About Koha, see the errors noted above
3 - apply patch, restart services
4 - re-edit AcquisitionLog, NewsLog, NoticesLog to change their values again
5 - reload About, see errors are cleared
6 - confirm that actions are logged as expected when logs are on, not logged when logs are off
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Thu, 19 Aug 2021 06:35:26 +0000 (20:35 -1000)]
Bug 28819: Fix advanced search button on mainpage.pl incorrectly links to item search
The previous follow-up changed the link for the Advanced search button on mainpage.pl.
Test plan :
1) Go to intranet main page
2) Click on big button "Advanced search"
=> Without patch you go to item search /cgi-bin/koha/catalogue/itemsearch.pl
=> With patch you go to advanced search /cgi-bin/koha/catalogue/search.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 22 Jan 2021 17:15:57 +0000 (17:15 +0000)]
Bug 27522: (follow-up) Add copy of image to carredart icons in the OPAC
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Victoria Faafia [Wed, 20 Jan 2021 12:22:28 +0000 (12:22 +0000)]
Bug 27522: Adding new itemtype info image to carredart
Test Plan
1. Go to Administration>Item Types>Modify Item Type
2. Under carredart you should see an info item type
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
ava li [Thu, 21 Jan 2021 06:44:28 +0000 (06:44 +0000)]
Bug 27521: Add new item type headset image for carredart
TEST PLAN:
1) Go to administration
2) Go to item types
3) Click edit on one of the item types
4) Go to the category "carredart"
5) Check that there is a small headset icon
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Victoria Faafia [Wed, 20 Jan 2021 10:43:54 +0000 (10:43 +0000)]
Bug 27520: Adding new itemtype images to carredart
This patch adds 3 new itemtype images to carredart: boardgame(domino), zoom-in and zoom-out
Test Plan
1. Go to Administration>item types>Modify item type
2. Click on the carredart tab that under choose an icon
3. Check that a these 3 icons have been added
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
ava li [Thu, 21 Jan 2021 02:17:24 +0000 (02:17 +0000)]
Bug 27505: Add new item type controller image for carredart
TEST PLAN:
1) Go to administration
2) Go to item types
3) Click edit on one of the item types
4) Go to the category "carredart"
5) Check that there is a small controller icon
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 19 May 2021 13:55:01 +0000 (14:55 +0100)]
Bug 28390: Move timestamp into grouping row
This patch moves the timestamp that was getting repeated for each
transaction breakdown row into the group header row.
Test plan
1/ Add a series of transactions to to a register (via Point of Sale
or/and Borrower Accounts)
2/ View the transactions (and past transactions tables) on the Register
details page
3/ Apply the patch and compare the display
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 13 May 2021 10:54:07 +0000 (11:54 +0100)]
Bug 28346: Add classes to account action buttons
This patch adds identifiable classes to each action button that may be
displayed next to an accountline on the borrower account page.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Mon, 16 Aug 2021 21:23:47 +0000 (21:23 +0000)]
Bug 28868: Add back mastheadsearch class name
In masthead.inc there is a wrapper for the main search bar called #opac-main-search. Prior to Bug 20168 that warpper had a class name of 'mastheadsearch'.
Historically CSS/JS customization of the main search bar was done via the mastheadsearch class.
Test plan:
1. Inscept the element on the OPAC main page and see the element with an ID of 'opac-main-search'.
2. Apply patch
3. Inscept that same element and you should now also see a class of 'mastheadsearch'.
4. Nothing visually should be different with the patch applied.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Mon, 7 Jun 2021 22:17:46 +0000 (22:17 +0000)]
Bug 28525: Dont let TinyMCE do code cleanup
If you look at Bug 24764 and Bug 26942 we adjusted the TinyMCE for the News tool so it will not do some types of automatic code clean up.
The TinyMCE editor for system preferences which can be enabled by 'UseWYSIWYGinSystemPreferences' has the same problems.
We should make the configurations the same.
To Test:
1. Turn on 'UseWYSIWYGinSystemPreferences'
2. Go to a system preference like 'RestrictedPageContent'
3. Try entering something like '<i class="fa fa-facebook-official" aria-hidden="true">TEST</i>' in the Source Code window
4. It gets cleaned up by the editor
5. Try something like '<a href="https://www.test.com" referrerpolicy=""no-referrer-when-downgrade">TEST</a>'
6. It's cleaned up by the editor.
7. Try something like '<link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet">'
8. Cleaned up by editor.
9. Apply patch
10. Try step 3, 5, and 7 again.
11. It should not be changed by the editor
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Tue, 10 Aug 2021 21:47:26 +0000 (11:47 -1000)]
Bug 28839: Better texts in stage MARC for import
Tool stage MARC for import is /cgi-bin/koha/tools/stage-marc-import.pl.
Its form contains texts in legends, labels, hints.
I feel like :
Labels are sometimes too long, showing them on multilines, like "Modify record using the following template". Long texts should be in legend or hint.
Legend are sometimes contains redundant text, like "Stage records into the reservoir".
Section beginning with "Comments about this file" is missing a legend, it looks like it is part of the upper section for profile.
Also lengends should be driving the user, that is why optional parts
contains a legend with "?".
Test plan :
Compare texts in page without and with patch
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 28839: (QA follow-up) Fix tabs/indentation in code paragraph
QA tools complained about a tab char. Cleaned up the template paragraph
it pointed out, removing tabs and correcting indentation.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28861: Item type column always hidden in OPAC holds history
This patch fixes the 'Requested item type' column not showing for holds
history in OPAC.
It was due to a template variable not being set. When solved, it become
clear that an import was missing for a template plugin.
To test:
1. Enable AllowHoldItemTypeSelection
2. Add a couple item-type constrained holds
3. See them in the holds history page
=> SUCCESS: Item type column shows
4. Enable OPACHoldsHistory
5. Look for them in the OPAC
=> FAIL: The item type column doesn't show
6. Apply this patch
7. Repeat 5
=> SUCCESS: The column shows! The item type is described!
8. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Nick Clemens [Wed, 28 Jul 2021 13:32:24 +0000 (13:32 +0000)]
Bug 28776: Warns from GetItemsInfo when biblio marked as serial
GetItemsInfo sorts the items using serial fields if the biblio is
defined as a serial
The fields may not be defined. We can add a fallback to blank in this case
To test:
1 - Mark a record with items as serial in the marc (942$s)
2 - At least one of the items should have no enumchron defined
3 - Load the detail page
4 - Warns in logs:
[WARN] Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/C4/Items.pm line 811.
5 - Apply patch and restart all
6 - Reload the details page
7 - No more warns
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Tue, 17 Aug 2021 20:19:29 +0000 (10:19 -1000)]
Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t
In test suite db_dependent/Koha/Patrons.t actually shows :
1..10
ok 1 - Patron with no dateofbirth is always valid for any category
ok 2 - Today=2020-02-28, dob=2015-03-01, is 5, should be valid=0
ok 3 - Today=2020-02-28, dob=2015-02-27, is 5, should be valid=1
ok 4 - Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0
ok 5 - Today=2020-02-28, dob=2015-02-28, is 7, should be valid=1
ok 6 - Today=2020-02-28, dob=2009-02-27, is 11, should be valid=0
ok 7 - Today=2020-02-28, dob=2016-08-27, is 3, should be valid=0
ok 8 - Today=2020-02-28, dob=2009-03-01, is 11, should be valid=1
ok 9 - Today=2020-02-28, dob=2007-08-27, is 12, should be valid=0
ok 10 - Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1
Some ages are incorrect :
1) dob=2009-03-01, is 11
=> it is age 10
so valid=1 in category 5 to 10
2) dob=2015-03-01, is 5
=> it is age 4
so valid=0 in category 5 to 10
3) dob=2015-02-28, is 7
=> this date of birth is already tested
I suppose here dob is wrong, age wanted is 7 in the middle of age restrictions.
so dob=2013-02-28
This patch fixes ages.
Also adds the category code 'AGE_5_10' in messages to display age limits
Test plan :
Run prove -v t/db_dependent/Koha/Patrons.t without and with patch
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>
Fridolin Somers [Tue, 3 Aug 2021 08:57:10 +0000 (22:57 -1000)]
Bug 28802: Untranslatable strings in browser.js
File koha-tmpl/intranet-tmpl/js/browser.js is not parsed by translation
process, which uses koha-tmpl/intranet-tmpl/prog/js/**/*.js
We must move it to prog/js.
Test plan :
1) Perform a search on staff interface
2) Click on a result
3) Check you see records browser
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
Apply patch, look up AllFinesNeedOverride, confirm it now says that checkouts will be blocked via the web-based selfcheck and SIP.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 18 Aug 2021 10:57:51 +0000 (12:57 +0200)]
Bug 25078: Explicitely return from DB revs to avoid warnings
% perl -wc installer/data/mysql/atomicupdate/skeleton.pl
Useless use of anonymous hash ({}) in void context at installer/data/mysql/atomicupdate/skeleton.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 2 Aug 2021 09:06:57 +0000 (11:06 +0200)]
Bug 25078: Keep atomic updates in "atomicupdate" dir
The atomicupdate directory will contain all the atomic update files (old
and new version).
That will ease job for the RM and RMaints, no file (except skeletons)
must be in this directory before push.
This patch also fixes an inconsistency we had: the atomic update was run
before the other db revs on the UI but after when the CLI script was
used.
Now we make sure that the CLI does not deal with the atomic update files
when called from the installer (UI)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Thu, 8 Jul 2021 14:01:41 +0000 (16:01 +0200)]
Bug 25078: Fix encoding issue with db_revs output
From `perldoc -f open`:
The scalars for in-memory files are treated as octet strings: unless the
file is being opened with truncation the scalar may not contain any code
points over 0xFF.
So $out need to be decoded first in order to be used in other Perl
strings
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 23 Jun 2021 11:16:11 +0000 (12:16 +0100)]
Bug 25078: (follow-up) Update 'NewVersion' for output_version changes
This patch updates the NewVersion compatability method to add arrayref
description handling to split it into description + report.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Mon, 14 Jun 2021 16:44:06 +0000 (18:44 +0200)]
Bug 25078: Separate update "report" from its description
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 15 Jun 2021 09:38:51 +0000 (11:38 +0200)]
Bug 25078: Re-introduce NewVersion
This is ugly, we re-add the code we removed in the previous patch.
We need to continue supporting "old" versions.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 29 Jan 2021 11:50:27 +0000 (12:50 +0100)]
Bug 25078: Put db revs into different files to handle them better
This patch suggests to stop using updatedatabase.pl to add new DB revs.
Each DB rev will be in a separate pl files (installer/data/mysql/db_revs).
The switch should ideally be done from 21.06.00.000.
Each DBrev is executed in a try block and a transaction. If something
went wrong, the whole DB rev is rolled back.
Why do /var/log/koha/kohadev/updatedatabase_*.log (not -error) contain
Status: 500
Content-type: text/html
<h1>Software error:</h1>
etc.
Test plan:
- git checkout c4b4db21d25 (master on 2021-07-08)
- Set the version syspref to 21.0500000:
> update systempreferences set value="21.0500000" where variable="version";
- Apply "Bug 25078: [DO NOT PUSH] DB revs for testing" (restart_all)
- Read the different DBrevs created as examples
- Make sure the different use cases are covered
- execute the updatedatabase script (CLI)
- Set the version syspref to 21.0500000
- Update the DB from the UI
- Set the version syspref to 21.0500000
- execute the updatedatabase script with the --force parameter (for
testing purpose)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 21 Oct 2020 11:15:50 +0000 (11:15 +0000)]
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links
This patch adds "aria-disabled" attributes to disabled links in the
Cart, and adds JS to change the value from "true" to "false" when the
links are enabled. The goal is to make the interface more informative to
users of screen readers.
To test, apply the patch and add some items to the Cart in the OPAC.
- Inspect the markup of controls like "Remove", "Place hold," etc. Each
should look disabled (grey) and has the correct aria-disabled
attribute value.
- Select one or more checkboxes. The links should be come active, and
the aria-disabled attribute shoulk now be "false."
- Deselect all checkboxes. The links should now be disabled.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The circulation search autocomplete (e.g. from circulation.pl search
header) was corrected in the previous patch to include library name
instead of branchcode. This patch makes the same correction for patron
search autocomplete (e.g. from members-home.pl search header).
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 6 Aug 2021 13:48:42 +0000 (13:48 +0000)]
Bug 10902: (QA follow-up) Show library name instead of code
This patch modifies the patron search autocomplete so that library name
is shown instead of library code.
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, 30 Mar 2021 16:21:06 +0000 (16:21 +0000)]
Bug 10902: Highlight patrons from logged-in library in patron searches
This patch alters a few different patron search interfaces so that
patrons from the currently-logged-in library are highlighted in a way
that differentiates them from other patrons.
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).
- In Administration -> System preferences, make sure the
PatronAutoComplete preference is enabled.
- In the "Check out" tab in the header, type a partial patron name which
will return multiple results and wait for the autocomplete menu to
appear..
- Patrons in the autocomplete results should show the branchcode, and
patrons from the currently-logged-in library should be highlighted
in green.
- Submit your partial name in the "check out" tab.
- In the search results the branch name of patrons from the
currently-logged-in library should be similarly highlighted.
- Go to patrons browse for patrons. These results should be highlighted
as in the previous steps.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> 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 [Fri, 13 Aug 2021 17:00:37 +0000 (17:00 +0000)]
Bug 28819: (follow-up) Use stacked icons for different searches
This patch modifies the staff interface home page so that the "Advanced
search" and "Item search" links are differentated using stacked Font
Awesome icons.
To test, apply the patch and view the staff interface home page. The
icons associated with advanced and item searches should be different:
- The Advanced search link should have a magnifying glass icon on top of
a grey book icon.
- The Item search link should have a magnifying glass icon on top of a
grey list icon.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Mon, 9 Aug 2021 16:39:55 +0000 (16:39 +0000)]
Bug 28819: Add item search to intranet-main.tt
To test:
1. Apply patch
2. Go to staff main page ( intranet-main.tt )
3. Now you should see an 'Item search' button and icon.
Signed-off-by: kelly mcelligott <kelly@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 26 Jul 2021 16:31:43 +0000 (18:31 +0200)]
Bug 28765: Remove sub find_value from batchMod.pl
It has never been used and should be removed
Test plan:
Search for "find_value" in the file and confirm that there is no more
occurrence
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 16 Jul 2021 07:13:34 +0000 (09:13 +0200)]
Bug 24387: DBIC schema changes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 9 Jul 2021 13:26:24 +0000 (15:26 +0200)]
Bug 24387: Fix location options when editing HTML custom
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 6 Jul 2021 15:28:19 +0000 (17:28 +0200)]
Bug 24387: Rename "News" with "Additional contents"
One big patch for one big move.
The "News" feature (opac_news) has been hijacked to handle some system
preferences (bug 26050). The goal was to take profit of the UI (editor)
and the ability to translate the value.
Disclaimer: This patch is NOT offering the best implementation but, as
we still don't have bug 24975, it cannot be done now. And no, we don't
want to wait for it to move forward here. This patch is going into the
right direction anyway.
This enhancement is going to rename the "News" with a more genertic
"Additional contents". We have two different "categories" of content:
"news" and "html customizations".
What does it bring?
- A split on the UI for disambigate the two types of content (news and
syspref/html customizations)
- A simplification of the edit form: all languages will be translatable
on the same view (like the "notice templates")
- Ground will be prepared for different types of content (if needed later)
- Staff news can be translated
How was the "News" area working before this patch?
The opac_news DB table contained a (very inconsistent) 'lang' column.
The different values were:
- '' => news to display at the OPAC and staff interfaces
- 'koha' => news for staff only
- 'slip' => news for slip notices
- $lang => news for OPAC only, translated in $lang ('en', 'es-ES', etc.)
- "$location_$lang" => A syspref moved to this "news" area. The syspref
is $location, and is translated in $lang. Eg. OpacLoginInstructions_en,
OpacLoginInstructions_fr-FR, opacheader_es-ES
This patch is improving the DB structure with the following changes:
- renaming 'opac_news' with 'additional_contents'
- new 'category' column
=> 'news' or 'html_customizations'
- new 'location' column
=> For 'news': 'staff_and_opac', 'staff_only', 'slip'
=> For 'html_customizations': the old syspref name (eg. 'OpacLoginInstructions').
- new 'code' column (see later for more info)
- the 'lang' column will only contain the language code ('en', 'es-ES',
etc.). BUT a 'default' entry will ALWAYS exist for fallback behaviour.
We are getting closer to the 'notice template' table structure because
we want to match its UI. The 'code' column will bring us the ability to
group the different 'additional_contents' rows. The code for a given
news will be the same, but the (lang, title, content) will differ.
Examples:
News 1 will have, for each of the translated versions
(category, code, location, branchcode)
('news', 'News1', $location, $branchcode||undef)
And the 3 following columns will differ:
(title, content, lang)
('title for news 1', 'content for news 1', 'default')
('titulo para 1', 'contenido para 1', 'es-ES')
Note that the "category" is not strictely necessary, but it seems better
to have the ability to split the different content by category/type
easily.
Additional changes:
- Syspref 'NewsToolEditor' is renamed 'AdditionalContentsEditor'
- Koha::NewItem => Koha::AdditionalContent
- Koha::News => Koha::AdditionalContents
- Script and template renamed from koha-news to additional-contents
- Foreign keys have been renamed
- Subpermission edit_news has been renamed edit_additional_contents
- The UI can now be accessed via a "News" or "HTML customizations" link
from the tools module. The related contents will then be displayed (both
categories are now split)
Changes not done here:
- Primary key 'idnew' could be renamed 'id'
Limitations of the upgrade:
News cannot be grouped by a unique code for existing translations.
=> A given news will be now displayed several times on the translated
interface
Any ideas to improve the upgrade behaviour?
We will have to add a warning in the release notes to tell libraries to
review their news.
Test plan:
0. Don't apply the patches
1. Translate the interfaces in some languages
. Create some news for staff and OPAC
. Create some content for different entry of HTML customizations
Note that you are forced to define a 'default'.
Also note that you are only forced to fill the title (not the content).
This is certainly problematic (see FIXME in the code) as sometime only
the content is displayed.
. Play with the interface (edit, delete, filter)
. Go to the different places the news are displayed, and confirm they
are displayed correctly (staff home, opac home, opac rss)
. Create 1+ news for 'slip', check an item out and 'print slip' (from
the circulation page). You must see the news.
. Go to the different places you are expecting the HTML customizations
to be present and confirm that you see them.
. Switch the lang of the interface and confirm that you now see the
content in the translated version
. Generate the templates in another language, don't translate the
content
. Use this language for the interface and confirm that the 'default'
version is displauyed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 18 Jun 2021 14:13:17 +0000 (16:13 +0200)]
Bug 12561: Add warning on about page
If a default xslt file has been removed or if the one filled in one of
the syspref does not exist.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 18 Jun 2021 14:05:34 +0000 (16:05 +0200)]
Bug 12561: Change prototype of XSLTParse4Display
Use a hash for better readability and reusability.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 18 Jun 2021 13:27:40 +0000 (15:27 +0200)]
Bug 12561: Remove non-XSLT views
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 18 Jun 2021 12:55:25 +0000 (14:55 +0200)]
Bug 12561: Remove HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich
This is the only remaining non-XSLT only feature. We should remove the
non-XSLT views that have been deprecated for a while now, and remove
this feature.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
This patch adds 050 $a to the mapping for the lc-call-number index.
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
I'm not sure how to search specifically for an LC call number.
You can confirm that 050 $a is displayed in the Search engine configuration page.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28381: Elasticsearch - Add 710 and 711 to default mappings for author index (MARC21)
This patch adds fields 710$a and 711$a to the default author mappings for elasticsearch indexing.
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
3) Search for an author name found only in 710 using the Author index
in advanced search
4) Repeat search for an author name in 711
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>
Bug 28380: Elasticsearch - correct 024aa in mappings (MARC21)
This patch corrects a typo in the mappings.yaml file
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
3) Search for a standard number found in 024$a using the Standard number index
in the advanced search
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>
Bug 28379: Elasticsearch - Add 710 to author-name-corporate index (MARC21)
This patch adds 710 to the default author-name-corporate index mappings for
elasticsearch.
To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex
3) Search for an author name found only in 710 using the Author (Corporate name) index
in advanced search
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>
Bug 28339: Elasticsearch - Add 8XX to default title-series index mappings (MARC21)
This patch adds series added entries titles (800 $t, 810 $t, 811 $t, and 830 $a) in the
default title-series index mappings.
To test:
1) Apply patch
2) Reindex using rebuildelasticsearch.pl -r
If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration and click "Reset mappings" and confirm
2b) Then reindex
3) Search for a series title found only in and added entry field
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>
Bug 28719: Change somes links in the serials page to avoid them leading to nothing
To test:
1- Search for a serial
2- Pick one
3- Go to 'Serial collection' on the left
4- An issue should be selected if you're expected a new issue
5- delete it using 'Delete selected issues'
6- Confirm deletion
7- If you're supposed to receive more issues the next one should now be there
8- Now edit the serial ('Edit serials')
9- See that the link leads to nothing
10- Apply patch and redo steps 1 to 8
11- See that the link now leads to something
Signed-off-by: kelly <kelly@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28842: A summary to the /items/:item_id/pickup_locations route
This patch simply adds a summary to the route. This will be picked by
the API docs.
It also removes the 'pickup_locations' tag, as we did in bug 28461.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28848: Make sure the 'swagger' attribute is a string
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Janusz Kaczmarek [Sun, 21 Dec 2014 08:31:47 +0000 (09:31 +0100)]
Bug 26852: subfield $e missing in X11 definition of MARC21 headings
This patch adds $e to 111 and 611, but removes it from 100 and 110 as it's
used for the relator term there and should not be copied. Same for 111$j.
Test plan:
1. Have a biblio record with, for example, 711 field with a $e subfield.
2. Have two auth records: one with 111 field reflecting the 711 field and second similar but without $e subfield
3. Have LinkerModule set to Default
4. Run link_bibs_to_authorities.pl
5. 711 should remain unlinked since there were two record found by the Default Linker and no one was chosen.
6. Apply the patch.
7. Run link_bibs_to_authorities.pl
8. 711 should be linked now.
Repeat testing in similar fashion for authorities:
9. 100/110 $e
10. 111 $j
NB zebra index definition is OK:
kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
in etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
Signed-off-by: Sara Brown <sbrown@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Mon, 9 Aug 2021 20:07:53 +0000 (10:07 -1000)]
Bug 28834: Correct wording biblios/authorities in tools home
In tools home, we actually see 2 wordings : biblios/bibliographic authorities/authority
Looks like bibliographic is more correct.
Test plan :
1) Apply patch and look at words in tools home /cgi-bin/koha/tools/tools-home.pl
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 30 Jul 2021 14:39:39 +0000 (14:39 +0000)]
Bug 28779: (QA follow-up) More specific message and soem cleanup
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> 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>
Bug 28779: Skip processing of non-existent biblios
Just checking with a regex that whether an input looks like a biblionumber
is not enough, we need to also verify there is a biblio really existing
in the database and skip processing of hold request for non-existent
biblionumbers.
To test:
1) Go to page /cgi-bin/koha/reserve/request.pl?biblionumbers=XXXXX
where XXXXX is non-existent biblionumber, notice internal server error
2) Apply patch
3) Repeat step 1 and notice we cannot place a hold
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> 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>
Owen Leonard [Fri, 6 Aug 2021 16:49:50 +0000 (16:49 +0000)]
Bug 28825: Can't edit local cover image for item from details page
This patch corrects the markup for local cover images attached to items.
The correction allows correct display of an "edit" link when the user
clicks an item's cover image and views it in the lightbox-style modal.
To test, apply the patch and make sure the "LocalCoverImages" system
preference is enabled.
- View the details of a bibliographic record in the catalog which has
items attached..
- In the table of holdings, click Edit -> Upload image.
- Upload an image for the item and return to the bibliographic detail
page.
- Your image should now be displayed in the holdings table.
- Click the image to view it.
- In the footer of the modal there is an edit link: "Local cover image
(edit). Before this patch the edit link would lead to a missing page.
After applying the patch the link should take you to the "Image view"
where you have the option of deleting the image or uploading another
one.
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 [Mon, 19 Apr 2021 11:49:25 +0000 (11:49 +0000)]
Bug 27847: Don't obscure page when checkin modal is non-blocking
This patch changes the series of events striggered when a non-blocking
modal dialog is displayed during checkin. If the "TransfersBlockCirc"
preference is set to "Don't block," the user can continue to check in
even though a transfer dialog has appeared. This patch hides the modal's
"backdrop" element so that the modal doesn't look like one which blocks
further action.
There is no Bootstrap backdrop option which both hides the backdrop and
makes it non-blocking, so we have to use the default non-blocking option
and "manually" hide the backdrop.
The "show.bs.modal" event must be added in order to make the
necessary change before the modal is displayed. This prevents the
darkened backdrop from appearing and then being hidden.
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).
- Set the "TransfersBlockCirc" preference to "Don't block."
- Check in an item which belongs to another library.
- A modal dialog should be displayed: "Please return this item to XXX"
- The page "behind" the modal should not be darkened, and the cursor
focus should remain in the check-in field.
- Checking in an item which as a hold should still trigger the
"blocking" behavior: The modal must be dismissed by clicking one of
its buttons (not the backdrop) and the page behind the modal should be
darkend.
- Test with "TransfersBlockCirc" set to "Block." Checking in an item
belonging to another library should trigger the "blocking" modal
behavior.
- Test that other checkins still work correctly.
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 [Mon, 9 Aug 2021 13:41:45 +0000 (13:41 +0000)]
Bug 28764: (QA follow-up) Add comment, remove two defined's
If we no longer offer the sortfield with :asc actively, we should
probably write it somewhere too.
Replaced a few defined tests by empty test. No need to split empty
string or zero etc.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 30 Jul 2021 10:54:47 +0000 (10:54 +0000)]
Bug 28764: Alter sort dropdown to use direction parameter
This code is odd -we build a select in the template, then turn it into a list of links using javascript
This patch adds a direction data element and uses it while building the links
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 27 Jul 2021 11:27:21 +0000 (11:27 +0000)]
Bug 28764: Parse direction parameter in public list view
This patch adds a check for a 'direction' paramter in list sorting.
It maintains the existing syntax for sorting 'sortfield=field:direction'
but adds support for the form used in paginations and more commonly thtoughout
Koha' sortfield=field&direction=direction'
To test:
1 - Create a public list
2 - Add enough items to generate two pages (40 worked for me)
3 - View the list and enforce sorting by date added descending:
sortfield=dateadded:desc
4 - Note the titles shown
5 - Click to second page using the pagination bar
6 - Note the same titles are shown, in a reversed order
7 - Apply patch
8 - repeat 305
9 - Second page is sorted correctly!
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 5 Aug 2021 09:17:29 +0000 (10:17 +0100)]
Bug 28813: Rename delivery_note to failure_code
We now use the codes from the half implimented error_code in place of
the plain text that was being added to the delivery_note field. As part
of that we rename the field to failure_code to clarify it's intended
content.
Test plan
1/ Confirm t/db_dependent/Letters.t passes
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>
Martin Renvoize [Thu, 5 Aug 2021 09:16:24 +0000 (10:16 +0100)]
Bug 28813: Update unit tests
This patch updates the unit tests to check for failure_code instead of
delivery_note and catches a missing case.
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>
Martin Renvoize [Thu, 5 Aug 2021 09:15:58 +0000 (10:15 +0100)]
Bug 28813: DBIC Schema Update
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>
Martin Renvoize [Thu, 5 Aug 2021 09:14:49 +0000 (10:14 +0100)]
Bug 28813: Update database field name
Update the database field name from 'delivery_note' to 'failure_code' to
more accurately denote it's use.
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>
Fridolin Somers [Tue, 10 Aug 2021 09:14:03 +0000 (23:14 -1000)]
Bug 28835: Fix ability to pass list contents to batch record modification
Bug 12759 added the ability to pass list contents to batch record
modification/deletion tools.
Patch Bug 22417 [Restore the 'add to list' feature] removed the fetch
of lists in batch_record_modification.pl I don't understand why.
It still exists in batch_delete_records.pl.
Note that this is needed when first form is displayed.
Test plan :
1) Create a private and a public list of records
2) Open Tools > Batch record modification
3) Check you can use the lists
4) Open Tools > Batch record deletion
5) Check you can use the lists
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>
Nick Clemens [Mon, 9 Aug 2021 12:09:13 +0000 (12:09 +0000)]
Bug 28828: Fix unimarc_field_4XX.tt and marc21_linking_section.tt value builders
Find closest ul for value builders.
Since Bug 22399 changes in biblio editor, value builder unimarc_field_4XX.tt JavaScript
code does not do its job anymore.
This is because a div is added and this call is now wrong:
var subfields = whichfield.parentNode.parentNode.getElementsByTagName('input');
Test plan 1:
1) Use a UNIMARC DB
2) Define value builder unimarc_field_4XX on 463$t
3) Create a record B1 with 200$a, 200$f
4) Create a new record B2
5) Click on value builder in 463$t
6) Search for record B1
7) Click on "Choose"
=> Without patch only 463$t is filled with a value
=> With patch 463 $t, $a, $0 and $9 are filled with a value
Test plan 2:
1) Use a MARC_21 DB
2) Define plugin marc21_linking_section.pl on 773$t
3) Make sure 773$t and other subfields are visible in intranet/editor
4) Create a new record in basic cataloging editor
5) Click on value builder in 773$t
6) Search fro a record
7) Click on "Choose"
=> Without patch fields are not fileld
=> With patch subfields are correctly filled
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Wed, 16 Jun 2021 09:17:19 +0000 (11:17 +0200)]
Bug 28569: In opac-suggestions.pl preselect user library
In OPAC new purchase suggestion opac-suggestions.pl for library combobox :
actually first value is selected, user library should be selected.
Test plan :
1) Create a new library named 'ZZZ top'
2) Set this library on a user U1
2) Loggin at OPAC with user U1
3) Create a new suggestion
=> Check library 'ZZZ top' is preselected
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 28727: Show edit item link when user has edit items permission
To test:
1: log in as a user with edit_items but not edit_catalogue
2: confirm you do not get an Edit Item link on moredetail.pl
3: apply patch, restart, reload
4: confirm link now shows
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>
Jonathan Druart [Wed, 4 Aug 2021 06:59:40 +0000 (08:59 +0200)]
Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports
Since bug 25026 DBMS errors are raised, but the report module is not
dealing correctly with the errors.
If an error occurred in execute_query, next queries will fail as well,
we should skip them.
Test plan:
1. Create report from SQL queries, containing errors (invalid syntax, etc.)
'SELECT id FROM borrowers' can do it
2. Execute the query
=> Without this patch you get a 500
=> With this patch applied you see that the error raised at DBMS level
is propagated to the UI
3. Confirm that there is no regression on valid queries
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>