Martin Renvoize [Mon, 5 Jul 2021 13:16:30 +0000 (14:16 +0100)]
Bug 22435: (follow-up) Set CREATE offset for credits to positive
The history view of an accountline shows increases and decreases in the
amount outstanding from the perspective of the credit/debit line you are
inspecting.
Apply creates a negative offset amount which acts to 'reduce' both the
outstanding 'debt' for the debit line and the outstanding 'credit' for
the credit line. Starting with a negative offset for the credit thus
makes this nonsenical.
Void creates positive offset amounts which act to 'restore' both the
outstanding 'debt' for the debit line and the outstanding 'credit' for
the credit line.
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>
Martin Renvoize [Mon, 21 Jun 2021 16:08:33 +0000 (17:08 +0100)]
Bug 22435: (QA follow-up) Fix returned offsets in moredetail
This patch updates the offsets query for lost item returns displayed in
the catalogue/moredetail controller.
Test plan (Same as bug 19919)
Test plan:
1) Pay off a LOST item
2) Check for the associated display of 'Paidfor?:' on the itemdetails page
3) Writeoff a LOST item
4) Check that a 'Paidfor?:' is not displayed on the itemdetails page.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 18 Jun 2021 15:11:31 +0000 (15:11 +0000)]
Bug 22435: (QA follow-up) Fix test file and adjust test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 14 May 2021 15:42:44 +0000 (16:42 +0100)]
Bug 22435: Improve database update
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 14 May 2021 14:39:03 +0000 (15:39 +0100)]
Bug 22435: Update accountline-details page to show all history
The accountline-details page took a simplistic approach to displaying
the history of an accountline. This patch drops the now defunct
offset_type_description template block from it's respective include
files, and then updates the accountline-details template and controller
to show the full history of what's happend to the accountline passed.
This includes the creation, any increments/decrements (for fines), and
finally any offsets against the total (payments, cancellations, voids).
Test plan
1/ Create some credits and debits and apply them to each other in
various combinations.
2/ View the 'Details' page for some of the debit/credits
3/ Compare before patch and after for the Details page.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 14 May 2021 13:37:59 +0000 (14:37 +0100)]
Bug 22435: Update for bug 27049
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 14 May 2021 13:04:35 +0000 (14:04 +0100)]
Bug 22435: Fix _set_found_trigger
The _set_found_trigger utilised the 'Writeoff' offset type to
distinguish between the application of a writeoff and any other form of
offset application.
This patch updates the trigger to use the full link through from offset
to account credit line to get the credit type being offset.
Test plan
1/ Run t/db_dependent/Koha/Items.t and prove it fails before the patch,
but passes after applying this patch.
2/ Run t/db_dependent/Koha/Account/Offsets.t and prove it passes both
before and after applying this patch.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 18 Mar 2021 10:23:57 +0000 (10:23 +0000)]
Bug 22435: Fix CREATE offset amounts
Updateing the tests highlighted a mistake in the original code.. the
offsets for the cancel and reduce creation lines were incorrectly
signed.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 17 Mar 2021 17:48:23 +0000 (17:48 +0000)]
Bug 22435: Update unit tests
This patch updates the unit tests to reflect the changes we have made to
offset types. We do two things:
1) Clean up calls to 'apply' to drop passing offset_type
2) Update test code to look for APPLY and CREATE instead of specific
offset types.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 17 Mar 2021 14:11:20 +0000 (14:11 +0000)]
Bug 22435: ->apply() should always use 'APPLY' for offset_type
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 17 Mar 2021 17:48:04 +0000 (17:48 +0000)]
Bug 22435: Add 'APPLY' to account_offset_types
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 16 Mar 2021 17:18:39 +0000 (17:18 +0000)]
Bug 22435: Use 'CREATE' offset type in Koha::Account::Line
This patch updates the Koha::Account::Line methods that result in new account
lines to use the 'CREATE' offset type for the creation record.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 16 Mar 2021 17:12:07 +0000 (17:12 +0000)]
Bug 22435: Use 'CREATE' offset type in Koha::Account
This patch updates the Koha::Account methods for adding debits and
credits to use the 'CREATE' offset type for the creation record.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 16 Mar 2021 17:28:12 +0000 (17:28 +0000)]
Bug 22435: Update CREATE offset types
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Thu, 15 Jul 2021 22:32:40 +0000 (22:32 +0000)]
Bug 28142: Accessibility: OPAC cart/basket checkboxes are not labelled
This patch adds labels to the checkboxes on the "Your cart" page to
improve accessibility for users of screen readers. The labels are
hidden from display because the item titles provide enough visual
context.
Test Plan:
1. Go to the OPAC
2. Search for some items and add them to your cart
3. Inspect the page html and confirm the checkboxes are not labelled
4. Select the "More Details" page and confirm these labels are missing too
5. Apply the patch
6. Inspect the checkboxes on the "Brief display" and "more details" views
7. Confirm that the checkboxes have meaningful labels and that the visual
display of the pages has not changed.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: fix indentation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28391: Elasticsearch - Add 264b to publisher index mapping
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>
Hayley Mapley [Sun, 12 May 2019 22:10:03 +0000 (10:10 +1200)]
Bug 15067: Added translations of languages to those 5 languages
Estonian, Latvian, Lithuanian, Inuktitut and Inupiaq are added with
their translations to the Advanced Search languages.
Test Plan:
1. From homepage, go to Advanced search
2. Click on More options next to the Search button
3. Scroll down to the Limits section
4. Click on Language: No limit
5. Find Estonian, Latvian, Lithuanian, Inuktitut and Inupiaq at the
bottom of the dropdown.
6. They should all be there.
7. Estonian and Latvian are repeated, this need to be fixed.
8. They need to be put in alphabetical order.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
The five languages are present, sorted alphabetically, and are not
repeated.
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>
Gus [Thu, 21 Jan 2016 02:23:38 +0000 (02:23 +0000)]
Bug 15067: Add additional languages to advanced search language search
run update database script, look for new laguages under 'Language:' in Advanced search.
Languages that should be added are:
1. Estonian
2. Latvian
3. Lithuanian
4. Inuktitut
5. Inupiaq
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 25 Jan 2016 20:47:27 +0000 (20:47 +0000)]
Bug 15067: Follow up to fix sorting
It looks like C4::Languages:getLanguages relies on implicit database
order for languages. They appear to be sorted by subtag so this patch
adds that sorting to the database query to ensure the dropdown is
sorted.
Signed-off-by: Aleisha <aleishaamohia@hotmail.com> 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>
[1] Similar changes to template for Cataloging and Authorities
[2] Made a better distinction now between short title on button
and long title on menu and modal
[3] The short title parameter removes need for previewed var
[4] To keep related code closer, moved the dataPreview hidden code
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 28 Jul 2021 10:04:43 +0000 (12:04 +0200)]
Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results
For translated interface.
Using 'Order' (the button text) was not a good idea as the interface can
be translated :)
Signed-off-by: Mark Hofstetter <koha@trust-box.at> 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, 23 Jul 2021 17:56:39 +0000 (17:56 +0000)]
Bug 28754: Only adjust holds on specific biblio and don't go past end of array
Our query for lowest priority holds only needs to adjust holds on the biblio we are looking at
so I add biblionumber
Additionally we can simply find the end of the array and use that rather than 99998
so I set new_rank to scalar @priority
Lastly, we don't need to fetch the lowest priority holds if we are ignoring lowest priority
so I move it into the conditional
To test:
1 - Add holds with lowest priorty to 2 records in the catalog
2 - Add a hold on a third record
3 - Note errors in log like:
[2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649
4 - Apply patch and restart all the things
5 - Add a new hold on third record - no warns
6 - Make one of the holds on third record have lowestPriority (click rightmost arrow with line at bottom)
7 - Note no warns
8 - Adjust other holds on record and note no warns
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Thu, 22 Jul 2021 17:56:39 +0000 (17:56 +0000)]
Bug 28741: Fix use of resumption token params
TO test:
1 - Enable OAI-PMH server in Koha
2 - Set OAI-PMH:MaxCount to 5
3 - Define 6 sets in Admin->OAI sets configuration
Can setSpec and setName to 1,2,3....
4 - Browse to:
http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListSets
5 - Click 'Show more'
6 - Keep seeing the same 5 - note the page says 'Results fetched -4-0'
7 - Apply patch
8 - Restart all the things
9 - Reload the ListSets URL above
10 - Click 'Show more'
11 - See the 6th set and note no 'Show more'
12 - Set OAI-PMH:MaxCount to 1
13 - Go to the base ListSets url again
14 - Confirm you can 'Show more' until you reach the end
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 9 Jun 2021 12:59:27 +0000 (12:59 +0000)]
Bug 28533: Set subfields to 'undef' if whole field request in itemcallnumebr system preference
This patch undefines the CNsubfields variable when the whole field is requested
Note that the substr returns '' when no characters are found, so we test if the string eq ''
Testing 'truth' doesn't work because "0" is a valid option
To test:
1 - Edit a record, add an 082 field
082 0 0 ‡aalpha‡bbeta‡0delta
2 - Set itemcallnumber system preference to 082
3 - Attempt to add/edit items
4 - ISE
5 - Apply patch, restart all the things
6 - Add/edit items - no error
7 - Confirm the itemcallnumber field is populated with "alpha beta delta"
8 - Set itemcallnumber system preference to '0820'
9 - Add/edit items
10 - Confirm itemcallnumber is populated with 'delta'
Signed-off-by: Salman Ali <salman.ali@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 14 Apr 2021 18:19:40 +0000 (18:19 +0000)]
Bug 28057: Use the biblioitem's biblionumber for checking availability
The loop here gets items from the record, plus analytic items. Because of this
we need to check more than 1 record - we decide to do this via biblioitems.
We need to preserve that, but when checking ItemsAnyAvailableAndNotRestricted we
cannot assume that the biblionumber and biblioitemnumber are the same (they should be
but this may not be the best of all possible worlds)
I simply switch the call here
To test:
1 - Apply patch
2 - Test placing holds on single bibs and multiple bibs
3 - Confirm it works as expected
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 13 Jul 2021 10:54:59 +0000 (10:54 +0000)]
Bug 28704: Library MARCOrgCode field needs maxlength attribute
This patch adds a maxlength attribute to the "MARC organization code"
field in the form for adding and editing libraries. The maxlength, 16,
matches the limit of the table column.
To reproduce the problem, go to Administration -> Libraries.
- Add or edit a library
- Fill the "MARC organization code" field with a string longer than 16
characters, e.g. Decriminalization
- When you save the record you will see an error.
Apply the patch and add or edit a library.
- Confirm that you cannot enter more than 16 characters in the "MARC
organization code" field.
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>
To test:
1 - Find a bib with 1 item, place 3 bib-level holds on it (just to make
sure there's at least one title on your holds ratio page)
2 - Go to the holds ratio page in circulation
3 - mouse over the Holds Ratio column, see that the number there is a
link to http://[your koha]/cgi-bin/koha/circ/reserveratios.pl#, the
page you're already on
4 - apply patch, restart_all, reload page
5 - link now goes to the holds page for that title
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 22 Jul 2021 18:35:13 +0000 (18:35 +0000)]
Bug 28733: Correct position of desks link in admin menu
This patch moves the "Desks" link from the "Basic parameters" section to
the "Patrons and circulation" section, matching the category of the link
on the Administration home page.
To test, apply the patch and go to an administration page which includes
the left-hand navigation sidebar, e.g. Administration -> Libraries.
In the sidebar, the "Desks" link should be in the "Patrons and
circulation" section, under "Item circulation alterts," matching its
position on the Administration home page.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 28733: (follow-up) Add manage_libraries permission check
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 15 Jul 2021 13:00:14 +0000 (13:00 +0000)]
Bug 28689: Extra %s in alert message when saving an items
This patch removes an unnecessary %s in the text built to show when
there are errors in the cataloging add item form.
To reproduce, open the add item form in cataloging and click "Add item"
without filling in all mandatory fields. You should see an alert message
that contains, "- %s 1 mandatory fields empty (highlighted)"
To test, apply the patch and return to the add item form. Now when you
save an incomplete form the message should omit the %s:
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 25 Jun 2021 10:44:19 +0000 (12:44 +0200)]
Bug 28567: Fix 0 vs "" vs undef on the admin library form
There are two things here:
* Branches.pickup_location has a default = 1 in DB, we should not set to undef if 0
or it will be set to 1 when stored.
* The other fields are all text (varchar, mediumtext or longtext) and
can be NULL. They are correct set to NULL when a new library is created
but set to an empty string when the library is modified. That's not
consistent
Test plan:
0. Don't apply the patch
1. Create a new library, set pickup location to "No"
2. Save
=> Pickup location is set to YES
=> In DB notice that the different values you didn't fill in are set to
NULL
3. Edit the library
4. Save
=> In DB notice that the different values you didn't fill in are now set
to an empty string
5. Apply the patch, restart_all
6. Run the updatedatabase script
=> In DB all the empty string values are set to NULL
7. Repeat 1 to 4 and confirm that everything is now working as expected
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>
Test plan:
0. Don't apply this patch
1. % git checkout v21.05.01 # The error is not appearing in master right now
2. Add 2 warn statements before the 'The 2 orders are returned' tests to
display $order_1->ordernumber and $order_2->ordernumber
3. MariaDB CLI > ALTER TABLE aqorders AUTO_INCREMENT=3;
4. prove t/db_dependent/Koha/Acquisition/Orders.t
=> Fail with
# Structures begin differing at:
# $got->[0] = '10'
# $expected->[0] = '9'
5. Apply this patch, repeat 3. and 4.
=> The test passes now.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jason Boyer [Wed, 28 Jul 2021 14:01:25 +0000 (14:01 +0000)]
Bug 28749: Restore the database name to Koha dumps
The line to use the --databases flag with mysqldump by default was accidentally
removed from koha-dump when the --schema-only option was added. This makes all
backups act as if koha-dump is called with the --without-db-name flag, causing
koha-restore to fail to restore the database because it's neither CREATEd or USEd.
This patch restores that line
To test:
1 - sudo debian/scripts/koha-dump kohadev
2 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE
3 - Notice no output
4 - Apply patch
5 - sudo debian/scripts/koha-dump kohadev
6 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE
7 - You get the line:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `koha_kohadev` /*!40100 DEFAULT CHARACTER SET latin1 */;
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 28 Jul 2021 10:24:14 +0000 (12:24 +0200)]
Bug 28632: Prevent api/v1/patrons.t to fail on dates comparison
# Failed test 'Returned patron from update matches expected'
# at t/db_dependent/api/v1/patrons.t line 537.
# Structures begin differing at:
# $got->{updated_on} = '2021-07-27T13:33:53+00:00'
# $expected->{updated_on} = '2021-07-27T13:33:52+00:00'
# Looks like you failed 1 test of 42.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 29 Jul 2021 12:36:24 +0000 (14:36 +0200)]
Bug 17600: Fix POSIX imports
it fixes xgettext and (maybe) friends
[12:22:29] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -s -o /tmp/koha-Jaa9rf/Koha-marc-NORMARC.pot -f /tmp/koha-Jaa9rf/files
/tmp/koha-Jaa9rf/Koha-marc-NORMARC.pot at misc/translator/xgettext.pl line 387.
Use of uninitialized value in subroutine entry at misc/translator/xgettext.pl line 388.
Argument ">:encoding(utf-8)" isn't numeric in subroutine entry at misc/translator/xgettext.pl line 388.
Argument "/tmp/koha-Jaa9rf/Koha-marc-NORMARC.pot" isn't numeric in subroutine entry at misc/translator/xgettext.pl line 388.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 26 Jul 2021 14:47:18 +0000 (16:47 +0200)]
Bug 17600: Fix wrong import in Koha::I18N - LC_MESSAGES
$ perl -wc Koha/I18N.pm
Subroutine Koha::I18N::LC_MESSAGES redefined at Koha/I18N.pm line 36.
Prototype mismatch: sub Koha::I18N::LC_MESSAGES: none vs () at Koha/I18N.pm line 36.
Koha/I18N.pm syntax OK
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Tests were too complex with no gain. They even deleted the whole DB to
run (inside a transaction). I refactored to test the same thing, and
make it rely (mostly) on existing data.
_count behavior is tested implicitly by comparing with Koha::*->count.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/UsageStats.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass
4. 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>
This patch moves the big sysprefs list to a sub. Behavior shouldn't
change.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/UsageStats.t
=> SUCCESS: Things work as expected, no changes.
2. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> 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 [Wed, 19 May 2021 16:14:43 +0000 (16:14 +0000)]
Bug 28394: Improve style of patron category entry form
This patch makes some style and structure changes to the patron
cartegory entry form:
- Margin added to the enrollment period fieldset so that it aligns with
the rest of the form.
- Informational text inside the form wrapped in <div class="hint"> like
it is on other pages.
- Converted heading tag to legend tag in the messaging preferences
fieldset.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Go to Administration -> Patron categories -> New category and confirm
that the style updates look good.
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>
Owen Leonard [Wed, 12 May 2021 18:35:27 +0000 (18:35 +0000)]
Bug 28347: Add DataTables, additional information to patron attribute types management
This patch enhances the display of patron attribute information on the
attribute management page.
To test, apply the patch and go to Administration -> Patron attribute
types.
- If necessary, add multiple patron attributes so that there is data to
display. Include:
- Some which are mandatory
- Some which are linked to an authorized value category
- Some which share a class.
- The tables showing your attributes should each have DataTables
sorting and controls (except for column configuration, which isn't
added by this patch).
- Confirm that DataTable controls work correctly for each table.
- The table should include columns showing authorized value category
and whether the attribute is mandatory.
- If you are logged in as a user with permission to manage
authorized values, the data in the authorized value category
column should be linked to that category on the authorized values
page.
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>
Owen Leonard [Thu, 1 Apr 2021 21:14:37 +0000 (21:14 +0000)]
Bug 28073: Patron modifications should auto-open panel for referring patron record
This patch makes it possible to link directly to the correct panel on
the "Update patron records" page. The link on the checkout and patron
details screen has been updated to read "Patron has pending
modifications."
Also changed: Moved the "Patron's address in doubt" message so that it
is above the table of changed fields.
To test, apply the patch and if necessary submit patron modification
requests from multiple patrons via the OPAC.
- Open the checkout page for one of these patrons.
- If you are logged in as a user with permission to edit patron
records you should see a message, "Pending modifications: Review
pending modifications," which links to the pending modifications
page.
- Clicking the link should open the page for reviewing pending
patron modifications, and the correct panel should be
automatically expanded.
- If you are logged in as a user without permission to edit patrons
you should see the message "Pending modifications: Patron has
pending modifications," which isn't linked.
- The process should work exactly the same from the patron detail page.
- Following the "Pending modifications" link from the staff interface
home page or the patrons home page should work as before: The page
opens with the first panel expanded.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 23 Jul 2021 13:05:41 +0000 (13:05 +0000)]
Bug 27747: (QA follow-up) Make code consistent and add explicit brackets
The while statements were including the next statement, I add brackets to make it
more obvious
Also the highlighting was applying to [[borrowernumber|Borrow number]
I removed the break to match code above and only highlight when syntax complete and correct
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 22 Feb 2021 12:36:08 +0000 (12:36 +0000)]
Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders
This patch adds some additional configuration to CodeMirror so that
column placeholders have a distinct color in the CodeMirror SQL editor.
To test, apply the patch and create or edit an SQL report which contains
one or more column placeholders, e.g. [[itemnumber|Item number]],
[[borrowernumber|Borrower number]], etc.
Confirm that when editing the SQL, these placeholders should appear as
red text. Save your report and view it. The syntax highlighting should
be updated in this view too.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> 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>
Kyle M Hall [Tue, 12 May 2020 11:11:12 +0000 (07:11 -0400)]
Bug 25464: Add ability to specify client IP and SIP account used in SIP2 logging
Bug 15253 originally had the ability to specify the incoming IP address used for
a given log statement via SIP, as well as the SIP2 account that was in use at the time.
This data is very helpful for debugging purposes, and should be brought back.
Test Plan:
1) Apply this patch
2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n"
3) Restart SIP
4) Use the SIP cli tester to make some SIP requests
5) View the SIP2 log, note the account id and client ip address show in the log!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 24 Jun 2021 07:44:33 +0000 (09:44 +0200)]
Bug 28624: Remove Smart::Comments
It's not used in those files (there is no occurrence of ###), and it's
not installed anyway (it is by koha-testing-docker however).
We should remove those lines.
Test plan:
Confirm the above
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Thu, 10 Jun 2021 13:42:14 +0000 (15:42 +0200)]
Bug 28543: Clicking on 'New record' will use default framework
In biblio records cataloguing, clicking on 'New from z39.50/SRU' will run action with default framework.
Clicking on 'New record' should do the same.
Test plan :
1) Go to cataloguing home page
2) Check you see 'New record' with a sparator and then a caret
(like 'New from z39.50/SRU')
3) Click on button text
=> You go to record edition with default framework
4) Clik on caret
=> You see list of framworks
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 [Fri, 14 May 2021 14:02:57 +0000 (16:02 +0200)]
Bug 27850: Search link for 260 a and c in MARC21 XSLT OPAC display
In MARC21 XSLT OPAC display, 260$b is a search link on 'Provider'.
$a and $c also have a search field, we can create search links.
Test plan:
1) Create 2 records with same 260 : two $a, one $b, two $c
2) Use XSLT display in OPAC
2) Look at first record details page in OPAC
3) Click on a $a link => you see both records
4) Click on a $c link => you see both records
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>
Fridolin Somers [Wed, 3 Mar 2021 13:27:00 +0000 (14:27 +0100)]
Bug 27850: Search link for 260 a and c in MARC21 XSLT intranet display
In MARC21 XSLT intranet display, 260$b is a search link on 'Provider'.
$a and $c also have a search field, we can create search links.
Test plan:
1) Create 2 records with same 260 : two $a, one $b, two $c
2) Use XSLT display in staff inteface
2) Look at first record details page in staff interface
3) Click on a $a link => you see both records
4) Click on a $c link => you see both records
Signed-off-by: David Nind <david@davidnind.com> 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>
David Cook [Thu, 27 May 2021 03:34:30 +0000 (03:34 +0000)]
Bug 28469: Move "Skip to main content" to top of OPAC page
This patch moves the "Skip to main content" button out of the nav
element and to the top of the <body> element, so that it's the first
(potentially) viewable element on the page.
This means you can inject content above the navbar, which has
a relative position, and it won't disrupt the display of the
"Skip to main content" button.
To test:
1) Apply patch
2) Same test plan as Bug 22807:
Go to any page in the OPAC and hit the tab key. The "Skip to main
content" link should appear. Tabbing away from it should cause the link
to hide. Hitting the ENTER key when the link is highlighted should cause
the page to scroll to the main content.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28677: Update wording on ExpireReservesOnHolidays
To test:
1: look at ExpireReservesOnHolidays syspref description
2: apply patch, restart
3: look at wording again, see that it now clarifies that it only pertains to systems using ExpireReservesMaxPickUpDelay and includes the word "calendar"
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>
Martin Renvoize [Wed, 30 Jun 2021 11:37:59 +0000 (12:37 +0100)]
Bug 28640: Expose EDI Status on basket details page
This patch adds the edi_order relationship method to
Koha::Acquisition::Basket to return the most recently attached
edi_message of type 'ORDER' for the basket.
NOTE: EDI currently returns raw DBIC results. I have opted to maintain
that approach here, but would like to work on upgradeing the
Koha::EDIFACT::Order class to be a subclass of Koha::Object at a later
date.
We then use this new relationship in acqui/basket to display the EDI
status for such baskets.
Test plan
1/ Setup a vendor with EDI Ordering enabled
2/ Add a new basket for the vendor.
3/ Note the new 'EDI status' field displays and reads 'Not ordered'
4/ Close the basker
5/ The 'EDI status' should continue to display 'Not ordered'
6/ Re-open the basket
7/ Close the basket via 'Create EDIFACT order'
8/ Navigate back to the now closed basket
9/ Note the 'EDI status' field now displays 'Pending' and the transfer
date.
10/ Progress the EDI order by running the edi_cron.pl script
11/ The EDI status field should now reflect that the message has been
sent.
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 30 Jun 2021 13:26:02 +0000 (14:26 +0100)]
Bug 28640: Unit tests for edi_order relation
Test plan
1/ Run t/db_dependent/Koha/Acquisition/Basket.t
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Mon, 1 Feb 2021 13:14:45 +0000 (13:14 +0000)]
Bug 27583: Proposed terminology changes
This patch impliments some terminology changes and clarifications for
the cash management system
Test plan
1/ Apply the patches
2/ Enable 'UseCashRegisters'
3/ Navigate around the cash management system (via the Tools menu)
4/ Enable 'EnablePointOfSale'
5/ Navigate around the cash management system (via the Point of sale
module)
6/ Comment on what you think about the changes
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Wed, 23 Jun 2021 11:59:21 +0000 (11:59 +0000)]
Bug 28620: Remove trailing space when logging with log4perl
Trivial change.
Do sed -i -r -e'/log4perl/ s/\s%n$/%n/' on the log4perl configs.
Test plan:
Update your own config.
Trigger some logging and check that logfile.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 6 Jul 2021 13:07:42 +0000 (13:07 +0000)]
Bug 28662: Not possible to log out of patron account in OPAC with JavaScript disabled
This patch adds a "Log out" link to the OPAC header which is hidden by
CSS when JavaScript is enabled.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Log in to the OPAC with JavaScript disabled in your browser.
- In the header next to the logged-in user's name there should be a
"Log out." link.
- Confirm that it logs the user out.
- Enable JavaScript and repeat the process to confirm that the new
logout link doesn't appear.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 28 May 2021 12:52:03 +0000 (12:52 +0000)]
Bug 28408: Add 'Last updated' column to suggestions table
We have specific meanings for the different dates in suggestions
Managed - means the status was changed or the suggestion edited, but doesn't change if item type updated
Modification - implies an edit of the subscript, not updated if status changed alone
Updated - this is the date field in the DB, which is actually a timestamp
The cronjob purge_suggestions.pl uses teh 'date' field
For a user, a suggestion can look old in the interface, but be considered recent by the script
To clear the confusion we should show the timestamp as well
To test:
1 - Add a suggestion
2 - In the DB, pretend you set it in the past:
UPDATE suggestions SET manageddate='2021-01-01', suggesteddate='2021-01-01', date='2021-01-01 12:12:12';
3 - Click 'Go' In Organize by: Status
4 - Note the suggestion looks old now
5 - Check the box, and click 'Update item types with:' -> Submit
6 - Prganize by status again
7 - No change?
8 - Check the DB:
SELECT date FROM suggestions;
9 - The field is updated
10 - Apply patch
11 - Organize by status again
12 - See the 'Last updated' ate set to today
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 12 May 2021 17:00:57 +0000 (17:00 +0000)]
Bug 28336: Add missing input for item_action
To test:
1 - Stage a marc file of authorities
2 - Manage the staged file
3 - Attempt to change the matching rule
4 - 500 Error, in intranet-error.log:
[Wed May 12 16:53:03.046652 2021] [cgi:error] [pid 52072] [client 172.19.0.1:50580] AH01215: C4::ImportBatch::SetImportBatchItemAction(): DBI Exception: DBD::mysql::st execute failed: Column 'item_action' cannot be null [for Statement "UPDATE import_batches SET item_action = ? WHERE import_batch_id = ?" with ParamValues: 0=undef, 1="1"] at /kohadevbox/koha/tools/manage-marc-import.pl line 160: /kohadevbox/koha/tools/manage-marc-import.pl, referer: http://localhost:8081/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=1
5 - Apply patch
6 - Reload page and change matching rule
7 - Success!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 5 Mar 2021 17:32:28 +0000 (17:32 +0000)]
Bug 27885: Populate biblionumbers parameter using biblionumbers array
Currently we send $biblionumbers as the parameter, but this is just apassthrough form when a list of biblios is selected for placing a hold
If passed a single biblionumber we push it into @biblionumbers and use that for building the biblio loop
This patch uses @biblionumbers to avoid sending a blank variable in the URL
To test:
1 - On the staff client click 'place hold' for an individual record
2 - Use the form to find a patron
3 - Note the url is:
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
4 - Apply patch
5 - Repeat
6 - The url is now like:
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
(but with whatever biblionumber you chose)
7 - Perform a search and select multiple biblios and confirm you can place holds as before
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
JD Amended patch: Add missing space
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>