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>
- [% PROCESS options_for_libraries libraries => Branches.all() %]
+ [%# FIXME Should not we filter the libraries displayed? %]
+ [% PROCESS options_for_libraries libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
The change in the pl is wrong as it should pass C4::Context->userenv->{branch},
but prior to this commit it seems that we didn't select the logged in
library anyway.
Looks like we should remove this code but preserve the current behavior and select "All libraries".
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>
Nick Clemens [Thu, 17 Jun 2021 12:36:01 +0000 (12:36 +0000)]
Bug 22801: (follow-up) Use date-of-publication directly
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> 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>
This patch uses %index_field_convert to perform 'yr' limit.
Test plan:
1) Apply patch
2) Use Elasticsearch searchengine
3) Go to advanced search with 'More options'
4) Perform a search with a year limit (value or range)
5) Check results are correct
Signed-off-by: David Nind <david@davidnind.com> 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>
Bug 28747: Clarify working on RestrictionBlockRenewal
To test, apply patch, restart services and reload page, confirm that now the syspref says "from the staff interface."
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 28585: (follow-up) Tests for q= supporting date/date-time parameters
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Bug 28585: Use the datetime_parser for handling API dates
This patchset takes the GET /patrons route as a sample usage for filtering
on date and date-time (including timestamp) fields.
It then makes Koha::Object->attributes_from_api use the DB storage
datetime parser for format the parameters correctly.
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: It doesn't find the patron when filtering by date
3. Apply this patch
4. Repeat 2
=> SUCCESS: It works now!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
This patch adds tests for filtering GET calls with date/date-time
parameters. Tests fail because the feature is not working
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Owen Leonard [Mon, 12 Jul 2021 13:29:27 +0000 (13:29 +0000)]
Bug 28679: Unable to click "Log in to your account" when GoogleOpenIDConnect is enabled
This patch corrects the login link in the OPAC when GoogleOpenIDConnect
is enabled. It removes modal-related markup which was causing the link
to fail.
To test, apply the patch and enable the GoogleOpenIDConnect system
preference.
- In the OPAC, click the "Log in to your account" link in the header.
You should be redirected to a Google authentication form.
- Disable the GoogleOpenIDConnect preference. The login link in the OPAC
should trigger a modal login form.
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>
Owen Leonard [Wed, 30 Jun 2021 15:42:50 +0000 (15:42 +0000)]
Bug 28631: Holds History title link returns "not found" error
This patch corrects a broken path in the OPAC holds history page.
This patch also corrects the breadcrumb markup which didn't conform to
the new Bootstrap 4 pattern.
To test, apply the patch and log into the OPAC as a patron who has past
or current holds.
- View the "your holds history" page.
- Click a title link in the table of holds. It should take you to the
correct bibliographic detail page.
- Check the breadcrumbs of the page. They should look consistent with
breadcrumb navigation on other pages in the OPAC.
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 23 Jul 2021 09:46:33 +0000 (11:46 +0200)]
Bug 28745: (bug 28158 follow-up) Restore the items table once the job is done
Caused by bug 28158, the batch item modifications tool does not longer
display the table with the items that have been modified on the result screen.
There is no more fork and so no more completedJobID var.
We must process the items THEN build the items' info.
Test plan:
Use the batch item modification tools to modify some items.
Confirm that with this patch the table with the modified items is
displayed on the last screen.
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>
Jonathan Druart [Tue, 6 Jul 2021 12:48:51 +0000 (14:48 +0200)]
Bug 28660: (bug 21325 follow-up) Fix auto self check
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as expected.
The need for an additional check of pref WebBasedSelfCheck is
merely theoretical.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
TO test:
1 - Write a report
2 - Click the svc link in the saved reports list
3 - ISE
4 - Make report public
5 - Click the svc link in saved reports list
6 - ISE
7 - Apply patch
8 - Comfirm opac/public link works
9 - Make report not public
10 - Confirm the internal svc link works
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 9 Nov 2016 12:06:44 +0000 (12:06 +0000)]
Bug 17600: Standardize our EXPORT_OK
On bug 17591 we discovered that there was something weird going on with
the way we export and use subroutines/modules.
This patch tries to standardize our EXPORT to use EXPORT_OK only.
That way we will need to explicitely define the subroutine we want to
use from a module.
This patch is a squashed version of:
Bug 17600: After export.pl
Bug 17600: After perlimport
Bug 17600: Manual changes
Bug 17600: Other manual changes after second perlimports run
Bug 17600: Fix tests
And a lot of other manual changes.
export.pl is a dirty script that can be found on bug 17600.
The ideas of this patch are to:
* use EXPORT_OK instead of EXPORT
* perltidy the EXPORT_OK list
* remove '&' before the subroutine names
* remove some uneeded use statements
* explicitely import the subroutines we need within the controllers or
modules
Note that the private subroutines (starting with _) should not be
exported (and not used from outside of the module except from tests).
EXPORT vs EXPORT_OK (from
https://www.thegeekstuff.com/2010/06/perl-exporter-examples/)
"""
Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members.
@EXPORT and @EXPORT_OK are the two main variables used during export operation.
@EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace.
@EXPORT_OK does export of symbols on demand basis.
"""
If this patch caused a conflict with a patch you wrote prior to its
push:
* Make sure you are not reintroducing a "use" statement that has been
removed
* "$subroutine" is not exported by the C4::$MODULE module
means that you need to add the subroutine to the @EXPORT_OK list
* Bareword "$subroutine" not allowed while "strict subs"
means that you didn't imported the subroutine from the module:
- use $MODULE qw( $subroutine list );
You can also use the fully qualified namespace: C4::$MODULE::$subroutine
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There's no POD. This patch adds it. I wrote it as part of bug 28615 but
then it took another direction, so submitting here.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 20 Apr 2021 14:24:29 +0000 (14:24 +0000)]
Bug 28177: Add date column and column configuration to uploads
This patch adds a "Date added" column to the table showing uploaded
files. Column configuration is added to the table, and the date column
is hidden by default.
To test, apply the patch and restart all.
- Go to Tools -> Upload.
- If necessary, upload multiple files with the same category.
- Use the "Search uploads by category" form to find those uploads.
- In the table of uploads, confirm that table settings and other
DataTable controls work correctly, including the option to show the
"Date added" column.
- Go to Administration -> Table settings -> Tools -> upload.
- Change the settings for the uploads table.
- Return to Uploads and confirm that your changes are reflected in the
display of the uploads table.
Signed-off-by: Salman Ali <salman.ali@inLibro.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, 22 Jun 2021 19:09:23 +0000 (19:09 +0000)]
Bug 28175: (follow-up) Preselect correct category after search
This patch modifies the script and template so that if the user submits
a search by category, that category will be preselected on the search
results page.
Also added is an empty "Choose" option so that a search category isn't
selected by default.
To test, apply the patch and view the uploads page.
- In the category search form, a "Choose" option should be selected.
Submitting the form without selecting a category should not work.
- Search using one of your existing categories. On the search results
page the category you selected should remain selected.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 23 Apr 2021 16:05:40 +0000 (16:05 +0000)]
Bug 28175: (follow-up) Adapt layout when there are no upload categories
This patch adds some logic to the uploads template so that if there are
no upload categories there isn't an empty space on the page where the
"Search by category" form would be.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 20 Apr 2021 12:13:28 +0000 (12:13 +0000)]
Bug 28175: Usability improvements to uploads page
This patch makes a variety of changes to the uploads page in order to
improve usability:
- Add a toolbar with an "Upload" button so that it can be accessed from
the upload results or search results views
- On views other than the "main" view, add search forms to the sidebar
- The search form markup has been modified somewhat in order to make
it work well in both the sidebar and the main body of the page.
- Show the upload category description instead of the code
- Link the upload category in search results to a search for that
category
The "enctype" attribute has been removed from the search forms because
it is unnecessary and causes form resubmission errors in some browsers
(Firefox at least).
To test, apply the patch and make sure you have at least one entry under
Authorized values for the category UPLOAD.
- Go to Tools -> Upload.
- Upload a file, adding a category as you do so.
- On the upload results page, test that the "Upload file" button
returns you to the main upload page.
- On the upload results or search results view, confirm that the "Search
uploads by category" and "Search uploads by name" forms work
correctly.
- When viewing upload or search results, confirm that the category
discription is shown instead of the code. Confirm that the category is
a link to a search for other files in that category.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 1 Apr 2021 13:29:29 +0000 (13:29 +0000)]
Bug 27873: Improve message consistency: checkout and patron detail pages
This patch creates a new include for showing circulation and
patron-related messages on both the checkout page and the patron detail
page. This allows the two pages to be consistent with each other.
The patch also makes some minor CSS adjustments, including the addition
of an SVG to replace an old GIF, arrow-bullet.gif.
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).
- View both the checkout and patron details page for patrons in the
staff interface, confirming that the information is displayed in the
same way, including:
- Pending modifications
- Pending expiration
- Expired
- Address in doubt
- Card lost
- Restricted (indefinite and with expiration)
- Outstanding overdues
- Outstanding return claims
- Patron age incorrect for their category
- Outstanding charges
- Account credit
- Waiting holds (at logged-in library or other library)
- Circulation note (from borrowers.borrowernotes)
- Messages (added at logged-in library or other library)
EDIT: Fixed merge error.
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, 15 Jan 2021 19:15:06 +0000 (19:15 +0000)]
Bug 27445: OPAC header tweaks for non-JavaScript users
This patch makes some minor changes to the header menu in the OPAC
visible only to users with JavaScript support.
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).
- View the OPAC with JS disabled in your browser.
- The "Cart" button should not be visible.
- The "List," "Log in," and "Search history" links should be styled
blue like other links.
- Log in to the OPAC and confirm that the "Welcome <name>" link is also
styled like other links.
- Enable JavaScript and verify that the links appear and function just
as they did before the patch.
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 [Wed, 19 May 2021 10:19:33 +0000 (10:19 +0000)]
Bug 28384: Add 'no_items' option to TransformMarcToKoha
This patch adds a new option 'no_items' and uses it in the C4::Search::searchResults
routine. We don't use the item info fetched here, so skipping those lines saves us time.
Additionally, I fix an incorrect FIXME comment, and pass the ISBN returned by the routine above
into GetNormalizedISBN to save another lookup
TO test:
1 - Enable AmazonCoverImages system preference
2 - Search staff client with a term that returns books with covers
3 - Apply patch
4 - prove -v t/db_dependent/Biblio/TransformMarcToKoha.t
5 - Confirm searching works
6 - Confirm Amazon images display (normalized_isbn is used for these)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Amended, replacing a tab character.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Thu, 18 Mar 2021 13:52:37 +0000 (13:52 +0000)]
Bug 27985: Add option to send a record to batch modification from details page
This patch adds an option to modify a single record using a marc modification
template to the 'Edit' menu on the details page
To test:
1 - Apply patch
2 - Browse to details page on the staff client
3 - Be a user with permission to edit records and use batch record modification
4 - Verify the option 'Modify record using template' appears in list
5 - Click it
6 - You should be sent to batch record modification screen
7 - If you have no templates there will be a link prompting you to create on, do that
8 - If oyu already had one, or created on above you shoudl now be able to select a template
9 - Apply the template
10 - Browse to the record again
11 - Confirm changes were applied correctly
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>