Martin Renvoize [Fri, 6 Nov 2020 14:42:42 +0000 (14:42 +0000)]
Bug 24786: (QA follow-up) Ensure tests pass with existing data
The tests for Koha::Template::Plugin::Registers assumed that no
registers were pre-set in the database. This patch updates the test to
ignore pre-existing data or take it into account in totals.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 14:04:49 +0000 (14:04 +0000)]
Bug 24786: (QA follow-up) Reset beenSubmitted on validation failure
When the form submision fails due to validation errors we need to also
reset the preventFormDoubleSubmit state to allow for a second submission
with corrected form fields.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 11:51:30 +0000 (11:51 +0000)]
Bug 24786: (QA follow-up) Do not use 'hidden' attribute
The hidden attribute for loading an element hidden is known to have
issues and inconsistencies accross browsers.
This patch instead updates the relevent input options to use an inline
style of 'display: none' to hide the elements on page load and then
.show, .hide for subsquent changes linked to the library branch picker
change.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 6 Nov 2020 10:55:13 +0000 (10:55 +0000)]
Bug 24786: (QA follow-up) Hide archived registers
This patch hides archived registers from the list when useing the
Registers template plugin. It also includes a check for
UseCashRegisters so that if the preference is disabled after some
registers have been defined then the plugin will no longer return the
list regardless.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 15 Oct 2020 12:41:16 +0000 (13:41 +0100)]
Bug 24786: (QA follow-up) Add validation to paycollect
This patch adds conditional validation to the cash register field on
paycollect such that if 'CASH' is selected as the payment type and cash
registers are enabled, then a cash register will be required.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 2 Oct 2020 09:19:14 +0000 (10:19 +0100)]
Bug 24786: Add validation to point of sale
The Point of Sale page relied upon serverside validation prior to this
patch; As such with the introduction of the ability to select '--None--'
at the session register level (to require the librarian to pick their
register for every transaction) we could result in a server error page.
This patch introduced clientside validation to add checks for both the
'collected' and 'registerid' form fields.
Test plan:
1/ Select a branch with cash registers available
2/ Select the '--None--' option for the session cash register
3/ Navigate to the point of sale page
4/ Attempt to make a sale without having picked your cash register
5/ Note that the submission was prevented and the fiedl is highlighted
as required in red.
6/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 11 Aug 2020 13:24:19 +0000 (14:24 +0100)]
Bug 24786: Default to 'branch default' on auth.
If no branch is selected (i.e. 'My library') then we should default to
'branch default' if one is defined for the users library at login.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 4 Aug 2020 12:27:06 +0000 (13:27 +0100)]
Bug 24786: (follow-up) Cache the register_name in the session
This leads to one DB hit less per page load in the staff client when
cash registers are enabled.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 09:52:49 +0000 (10:52 +0100)]
Bug 24786: Update borroaccount to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the refund or payout action.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 09:30:09 +0000 (10:30 +0100)]
Bug 24786: Update paycollect to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the payment.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 12:08:18 +0000 (13:08 +0100)]
Bug 24786: Update point of sale to use session register
This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the sale.
Test plan
1/ Enable cash registers via the 'UseCashRegisters' system preference
2/ Enable point of sale via the 'EnablePointOfSale' system preference
3/ Navigate to the point of sale page
4/ Note that if you are logged in at a branch with no cash registers yet
defined, then an alert should appear
5/ Note that when you are logged in at a branch with cash regsiters
defined, but without a cash register associated with your session then
the cash 'Cash register' select box is populated with '-- None --' and
you are required to select a register prior to submission
6/ Note that upon selection, the '-- None --' option is disabled
7/ Note that when you have a register associated with your session then
the 'Cash register' select box is pre-populated with that register.
8/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 21 Jul 2020 12:37:16 +0000 (13:37 +0100)]
Bug 24786: Allow selection of cash register at login
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Mon, 20 Jul 2020 15:14:17 +0000 (16:14 +0100)]
Bug 24786: Allow setting a register for the session
This patch adds the ability to set a register for the current session
from the 'set library' page.
Upon entering the page, the current selection will be displayed.
Changing the branch will trigger the register select list to update to
display only those registers associated with the updated branch and will
automatically select either 'no register' or the 'branch default'
register. The user can then override that selection to choose a
different register for the session.
Test plan
1/ Enable cash registers with the 'UseCashRegisters' system preference
2/ Select the 'Set library' option from the top right menu
3/ Note that you can now select a cash register from the subsequent page
4/ Change the branch and note that the cash register selection is
updated to reflect the change
5/ Note that the 'branch default' register is auto-selected upon branch
selection if one has been defined, otherwise '-- None --' is selected
6/ You can then alter the selection before submitting the form
7/ Once submitted note that you are returned to the page you were on
prior to attempting to change the library and register
8/ Note the present of the register name next to the library name at the
top of the screen.
9/ Signoff
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Sun, 29 Mar 2020 12:56:20 +0000 (14:56 +0200)]
Bug 25067: Move PO file manipulation code into gulp tasks
misc/translator/translate was doing three different things:
- extract translatable strings
- create or update PO files
- install translated templates
This patch separates responsibilities by moving the string extraction
code into several 'xgettext-like' scripts and adds gulp tasks to
automate string extraction and PO files update
This has several benefits:
- gulp runs tasks in parallel, so it's a lot faster (updating all PO
files is at least 10 times faster with my 4-cores CPU)
- there is no need for $KOHA_CONF to be defined
LangInstaller.pm relied on $KOHA_CONF to get the different paths
needed. I'm not sure why, since string extraction and PO update should
work on source files, not installed files
- string extraction code can be more easily tested
This patch also brings a couple of fixes and improvements:
- TT string extraction (strings wrapped in [% t(...) %]) was done with
Template::Parser and PPI, which was extremely slow, and had some
problems (see bug 24797).
This is now done with Locale::XGettext::TT2 (new dependency) which is
a lot faster, and fixes bug 24797
- Fix header in 4 PO files
For backward compatibility, 'create' and 'update' commands of
misc/translator/translate can still be used and will execute the
corresponding gulp task
Test plan:
1. Run `yarn install` and install Locale::XGettext::TT2
2. Run `gulp po:update`
3. Verify the contents of updated PO files
4. Run `cd misc/translator && ./translate install <lang>`
5. Verify that all (templates, sysprefs, xslt, installer files) is
correctly translated
6. Run `gulp po:create --lang <lang>` and verify that it created all PO
files for that language
7. Run `prove t/misc/translator`
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Need to install yarn & gulp, no errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 3 Nov 2020 18:00:57 +0000 (18:00 +0000)]
Bug 26727: (follow-up) More markup corrections
This patch makes more markup changes to the templates previously
modified in order to try to arrive at some agreeable solutions.
- In the value_builder EXAMPLE template, the <p> is unnecessary and is
removed. Also removed is the script "type" attribute and obsolete
CDATA markers.
- In the article request template an unnecessary <p> is removed.
- In the merge patrons template the submit button is now in a <fieldset
class="action"> as is consistent with other forms.
- In the MARC modifications template I've added <div>s around each
"line" in the form to add the line break, along with some CSS to add
margins.
- The submit button is now inside a <fieldset class="action"> and the
"Cancel" link now has the "cancel" class.
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>
Katrin Fischer [Sun, 18 Oct 2020 16:30:24 +0000 (16:30 +0000)]
Bug 26727: Fix <p/> appearing in the templates
The self-closing p is not valid in HTML5:
Error: Self-closing syntax (/>) used on a non-void HTML element.
Ignoring the slash and treating as a start tag.
To test:
1)
- Activate Article requests
- Search for a record to place an article request on in staff
- Look up the patron
- Verify the article request form looks ok
2)
- Search for a list of patrons
- Check 2 patrons and merge them using the button above the list
- Verify the distance between the button and the table looks ok
3)
- Create a new MARC modification template
- Create a new action
- Verify the distances between the first and second line of form
elements looks ok
4)
- Place a hold in staff
- Click on the Suspend link in the holds table (not below)
- Verify the modal looks ok
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>
Kyle M Hall [Wed, 29 Apr 2020 11:22:26 +0000 (07:22 -0400)]
Bug 14708: Don't allow merging of other patron records into Anonymous Patron
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 15 Apr 2020 17:48:09 +0000 (13:48 -0400)]
Bug 14708: Don't allow merging of Anonymous Patron into other patron records
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 15 Apr 2020 17:31:59 +0000 (13:31 -0400)]
Bug 14708: Skip AnonymousPatron in GetBorrowersToExpunge
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 15 Apr 2020 16:48:02 +0000 (12:48 -0400)]
Bug 14708: Prevent deletion of Anonymous Patron at Koha::Patron::delete
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 27 Feb 2019 17:00:03 +0000 (12:00 -0500)]
Bug 14708: Enforce restriction in delete_patrons.pl
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 27 Feb 2019 11:59:08 +0000 (06:59 -0500)]
Bug 14708: The patron set as the anonymous patron should not be deletable.
Right now it's possible to delete the anonymous patron at any time. When this happens the system will break just as if anonymouspatron was unset but patrons still have an "always anonymize" privacy setting.
This issue occurs more frequently than one would expect.
We should make it so that the patron set in AnonymousPatron is not deletable.
Test Plan:
1) Apply this patch
2) Set a patron to by AnonymousPatron
3) Attempt to delete that patron from the members toolbar
4) Note the error message!
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 30 Apr 2020 17:35:48 +0000 (13:35 -0400)]
Bug 25334: Add generic 'phone' message transport type
As bug 25333 changed the 'phone' transport type to 'talkingtech', we can
now re-add 'phone' as a transport type again, and allow it to behave and
support the same notices as the email transport type.
Test Plan;
1) Apply this patch
2) Run updatedatabase
3) Restart all the things!
4) Disable TalkingTechItivaPhoneNotificationi if enabled
5) Enable new PhoneNotification system preference
6) Go to a patron's messaging preferences, not you can select the
'phone' option for all the same notices as the 'email' option
7) Enable the phone option for all the message types
8) Browser to the Notices and slips editor
9) Add a phone notice version for each notice you wish to test
10) Test some notices ( CHECKIN, CHECKOUT, etc )
11) Notices should show in the patron's messages as 'phone' notices
Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Tue, 2 Jun 2020 07:27:02 +0000 (11:27 +0400)]
Bug 25650: Add location and itype descriptions in ILS-DI GetRecords
Test plan:
1. Create a record with an item, and set the item's shelving location
and itemtype.
2. Go to
http://<OPAC>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber>
3. Check that there is <itype_description> and <location_description>
and that their value is correct.
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 2 Nov 2020 18:13:04 +0000 (18:13 +0000)]
Bug 26148: OpenLibrary "Preview" link target is unclear to patrons
This patch makes changes to the display of the Open Library "read" links
in the OPAC search results and detail page. The link is now grouped with
other details about the record ("Publisher," "Location(s)," etc. On the
detail page, the "Preview" link will no longer appear under the cover
image.
The label is changed to "Found in Open Library," and the link now opens
the Open Library reader in a new window.
The patch also changes the Open Library button image links so that they
use https and makes it so that the "Found in Open Library" information
is hidden until the availability information has loaded.
To test, apply the patch and enable the OpenLibrarySearch system
preference.
- Perform a search in the OPAC which will return results found in Open
Library, e.g. "poetry" in the sample data.
- Confirm that the "Read now" images from Open Library appear on some
search results.
- View the detail page for one of these titles.
- Confirm that the "Read now" button appears in the same format on the
detail 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>
Martin Renvoize [Fri, 7 Aug 2020 09:15:20 +0000 (10:15 +0100)]
Bug 26172: Add cashup summary view modal
This patch adds a cashup summary modal to the register details page.
Test plan
1/ Enable Cash Registers and Point of Sale
2/ Enable some debit_types as 'Sale items'
3/ Perform a series of transactions
4/ Perform a 'Cashup' on the register
5/ Note the new '(Summary)' link next to the last cashup on the register
page.
6/ Click the link and confirm the modal contains the pertinent
information
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 26584: Remove unused C4::Acquisition::CloseBasket function
This patch makes code use the new Koha::Acquisition::Basket->close
method and makes CloseBasket obsolete.
It then removes it, and adapts the few places in which it was used.
1. Apply this patch
2. Run:
$ kshell
k$ git diff origin/master --name-only | grep -e '\.t$' | xargs prove
=> SUCCESS: Tests pass!
3. Try playing with baskets, closing them
=> SUCCESS: All works as expected!
4. Sign off :-D
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 adds two methods to Koha::Acquisition::Basket:
- 'closed': that tells if the basket is closed
- 'close': that closes the basket
It inherits the behaviour from CloseBasket (as it actually makes sense).
It improves CloseBasket by wrapping the action inside a transaction. It
uses the $orders->update call with no_trigger as there's no trigger to
trigger and the update can be done on a single DB call.
A new exceptions file is added for basket-related exceptions. The only
specific exception that gets added is
Koha::Exceptions::Acquisition::Basket::AlreadyClosed
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 5 Nov 2020 08:12:12 +0000 (09:12 +0100)]
Bug 26935: Don't use basket for claimacquisition and claimissues
Incorrect basketid is sent for claimacquisition and claimissues.
The basket info are not used in the default template of these notices, but if it
is used, a wrong basket may be passed to generate the notice.
This has been caught by a test failure after bug 26745.
# Failed test 'SendAlerts - claimissue'
# at t/db_dependent/Letters.t line 642.
C4::Letters::_substitute_tables(): DBI Exception: DBD::mysql::st execute failed: called with 2 bind variables when 1 are needed [for Statement "SELECT * FROM aqbasket WHERE basketno = ?" with ParamValues: 0=53] at /kohadevbox/koha/C4/Letters.pm line 679
This is a quick patch to fix the failing test, but more work would needed.
We are removing the basket info from those 2 notices and keeping it only
for orderacquisition.
Technically: the $externalid is coming from the parameter list of
SendAlerts, but it is a basketno only for orderacquisition. We must not
pass it for other notices.
Test plan:
Confirm that the failing test is now passing and that the changes make
sense.
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>
Kyle M Hall [Tue, 3 Nov 2020 13:31:39 +0000 (08:31 -0500)]
Bug 26908: Restore ability to view and select EDI plugins for a vendor account
Test Plan:
1) Install an EDI plugin
2) Browse to edi_accounts.pl, create or edit an account
3) Note the plugins pulldown is missing
4) Apply this patch
5) Restart all the things!
6) Reload the page
7) Note the pulldown is back!
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 [Tue, 3 Nov 2020 15:45:33 +0000 (16:45 +0100)]
Bug 26911: (bug 18936 follow-up) Remove invalid data before copying the circ rules
UPDATE: changed queries to not touch * values
To test:
1 - Checkout 19.11.x and reset_all
2 - Add a new patron category, itemtype, and branch to your system
3 - Create issuing rules using thise 3 values, and others
4 - Delete the new category, itemtype and branch
5 - Checkout master
6 - Restart_all
7 - updatedatabase
8 - you get errors
9 - repeat 1-5
10 - apply patch
11 - restart_all
12 - updatedatabase
13 - no errors!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> 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 [Wed, 4 Nov 2020 08:04:19 +0000 (09:04 +0100)]
Bug 26915: Fix FinePaymentAutoPopup behaviour
The behaviour of the syspref FinePaymentAutoPopup is broken, the popup
explodes with
Can't call method "unblessed" on an undefined value at /home/vagrant/kohaclone/members/printfeercpt.pl line 64
It has been broken by
commit a2449a81be55aa5b3710ca2c6df7884513f89540
Bug 23051: (follow-up) Add renewal feedback and move code to subroutines and test
which modified the return value of Koha::Account->pay (from $payment_id
to a hashref)
Test plan:
- To test activate FinePaymentAutoPopup
- Create a manual fee
- Write it off using the write off button on the account line (not below table)
=> Without the patch you get the error
=> With the patch applied the popup is correctly displayed
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>
Joonas Kylmälä [Wed, 4 Nov 2020 15:05:28 +0000 (17:05 +0200)]
Bug 26132: (follow-up) Fix broken code in TooMany function
The $checkouts variable was not defined in the PatronLibrary case at
all and in the else case the SQL join was totally missing.
To test:
1) Without this patch notice prove
t/db_dependent/Circulation/TooMany.t fails
2) With this patch notice prove
t/db_dependent/Circulation/TooMany.t succeeds
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Joonas Kylmälä [Wed, 4 Nov 2020 15:00:02 +0000 (17:00 +0200)]
Bug 26132: (follow-up) Add test to show errors in max issues amount calculation
If you set default branch limits for issue quantity circulation
rules you will get errors when calling TooMany function.
To reproduce the error:
1) Apply this patch
2) Run prove t/db_dependent/Circulation/TooMany.t and notice the
following error:
No method count found for Koha::Checkouts DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'item.homebranch' in 'where clause' [...]
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ivan Masár [Thu, 17 Oct 2019 11:49:16 +0000 (13:49 +0200)]
Bug 23823: (follow-up) minor visual fix
Do not allow a line break between the bookmark icon and syspref name.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 11 Oct 2019 02:18:41 +0000 (02:18 +0000)]
Bug 23823: (follow-up) Get rid of some tabs in favor of spaces
In the paragraph touched by this patch, there were some
whitespace issues. This patch does some tab to space
replacement and reindentation to make the code more readable.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Ivan Masár <helix84@centrum.sk> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ivan Masár [Wed, 16 Oct 2019 11:17:37 +0000 (13:17 +0200)]
Bug 23823: Allow system preferences to be bookmarked
Test plan:
1) Log in to Staff UI with superlibrarian permissions
2) Go to System Preferences /cgi-bin/koha/admin/preferences.pl
3) Next to each preference, there should now be a bookmark icon
4) The bookmark icon links to a search for the exact preference name
5) The link can be bookmarked for quick reference to the specific
preference
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 19 Oct 2020 14:36:34 +0000 (14:36 +0000)]
Bug 26729: Add focus class to vendor name field in vendor add form
This patch adds the "focus" class to the vendor name field in the form
for adding or editing a vendor in acquisitions.
To test, apply the patch and go to Acquisitions -> New vendor.
On page load the cursor focus should automatically be on the vendor name
field. The same should true when editing an existing vendor.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> 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>
Martin Renvoize [Tue, 20 Oct 2020 08:43:22 +0000 (09:43 +0100)]
Bug 26745: Add TT support to 'title' in notices
This patch adds support for using TT syntax in the title element of the
notices system.
Test plan
1/ Edit an easily triggerable email notice such that the title contains
some template toolkit markup.
Example: Edit the 'CHECKOUT' notice to include [% today %] in the
title field.
2/ Trigger the notice (For 'CHECKOUT' that means checking an item out to
a user (Preferably with 'email' selected in their advanced messaging
preferences for the notice)
3/ Either, navigate to the 'Notices' tab for the user, or run the
message queue and inspect the subject line of the recieved email.
4/ Prior to the patch the TT syntax would remain 'as is'.. i.e
'[% today %]'.
5/ After the patch, the TT syntax should have been properly replaced.
6/ Signoff
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Wed, 28 Oct 2020 04:22:54 +0000 (04:22 +0000)]
Bug 26804: Add modal content preview
This patch turns the 'News' column into a preview button. That preview button displays a modal with content of that rows news item.
To test:
1. Apply patch
2. Add some HTML to a News Item. I am using a bunch of lorem ipsum HTML and this image set to 1000px. '<img src="https://koha-community.org/files/2013/09/cropped-kohabanner3.jpg" width="1000" />'.
3. Make sure and have some content with a lot of width and some content with a lot of height.
4. Test the Preview content button
5. Make sure you can scroll through long modals and across modals that are wide
6. Try at different screen sizes and with different combonations of News items
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>
Owen Leonard [Mon, 2 Nov 2020 13:43:27 +0000 (13:43 +0000)]
Bug 26886: Correct style of alert-error class in the OPAC
This patch makes a minor change to the OPAC SCSS so that instances of
"alert-error" classes are styled the same as messages with the Bootstrap
4 "alert-warning" class. This change is simpler than making multiple
changes to scripts and templates.
To test, apply the patch and try to view a single news item in the OPAC
which doesn't exist:
/cgi-bin/koha/opac-main.pl?news_id=XXX
- You should see a warning message with a pale yellow background, "This
news item does not exist."
- Submit a suggestion, and then submit another suggestion with the
same title.
- You should see a warning message, "The suggestion has not been
added. A suggestion with this title already exists."
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 27 Oct 2020 11:26:53 +0000 (11:26 +0000)]
Bug 24567: Don't strip spaces along with dangling colons
This updates the regex used for removing colons to capture those with space on either side, and remove the colon
while preserving the space
To test:
1 - Have Koha using ES
2 - Search for:
ti:chess AND chess
3 - You should get a result in sample data, otherwise replace 'chess' with a title in your catalogue
4 - Search for:
ti:chess AND kw:chess
5 - No result
6 - Enable DumpTemplateVarsIntranet and DumpSearchQueryTemplate
7 - Repeate search and check page source
8 - search_query has:
title:chess ANDchess
9 - Apply patch
10 - Repeat
11 - Seaerch works!
12 - query is now:
title:chess AND chess
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Bug 24567: (follow-up) Use dollar sign to refer to captures
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 19 Oct 2020 13:36:04 +0000 (13:36 +0000)]
Bug 26736: Compare values of reports log entries
This patch adds the ability to compare the log entries for reports
in the system log. The user can select two entries in the log search
results and view a diff of the two versions.
To test, apply the patch and check that the ReportsLog system
preference is enabled. If it isn't, enable it and make some changes to
saved SQL reports so that you have log entries to test with.
This is a trivial patch that simply adds "REPORTS" type log entries to
the list of modules which can be selected for comparison. The full test
plan is basically the same as that for Bug 26207:
- Perform a search for log entries in the "Reports" module.
- In the results, each entry for a report update should have a
"Compare" checkbox."
- Check one of the checkboxes.
- The table should now be filtered by the report title. This
facilitates meaningful selections for comparison.
- You should see a message displayed onscreen, "Showing results
for...[report name]"
- The "Check none" link in the toolbar above the table should now be
enabled.
- If youy click the "Compare selected" link in the toolbar at this
stage you should get a message, "You must select two entries to
compare."
- If you uncheck the checkbox the table should return to an unfiltered
state.
- Check two checkboxes.
- The "Compare selected" link in the toolbar should now be enabled.
- Next to each of the checkboxes you checked should be a "View
comparison" link.
- Clicking either of the "View comparison" links or the "Compare
selected" link should trigger a modal with the diff view of the two
reports log entries.
- Try to select a third checkbox. You should get a message, "You can
select a maximum of two checkboxes." The box should remain unchecked.
- Test that unchecking both checkboxes manually clears the table filter.
- Test that the "Check none" link works to uncheck checked boxes and
clear the table filter.
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>
Owen Leonard [Thu, 15 Oct 2020 13:01:50 +0000 (13:01 +0000)]
Bug 26439: (QA follow-up) Correct MSG instances in cart.js
To test, add some items to the cart in the staff interface and open the
cart window. Test the "Selected items" links (Remove, add to list,
etc.) without checking any checkboxes. You should get an alert, "No item
was selected."
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 11 Sep 2020 19:17:10 +0000 (19:17 +0000)]
Bug 26439: Move cart-related strings out of js_includes.inc and into basket.js
This patch moves strings defined for translation in js_includes.inc
into basket.js for translation using the new double-underscore
i81n function.
To test, apply the patch and perform a catalog search in the staff
client.
- Click the Cart link in the header menu. A pop-up should appear saying
"Your cart is currently empty."
- On the search results page, click the "Add to cart" link next to any
search result. The text should change to "In your cart."
- Click the "Remove" link. The text should change to "Add to cart."
- Check the box next to a title in the search results and click the "Add
to cart" button in the search results toolbar. A message should
appear, "1 item(s) added to your cart."
- Click the "Add to cart" button again. You should see the message "No
item was added to your cart (already in your cart)!"
- Uncheck all check boxes on the search results page and click "Add to
cart." You should see "No item was selected."
- Add more items to your cart so that it contains more than one item.
- Click the "Cart" link to open it.
- Click the "Empty and close" button. You should be asked to confirm,
"Are you sure you want to empty your cart?"
TESTING TRANSLATABILITY
- Update a translation, e.g. fr-FR:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, e.g.
misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
koha-tmpl/intranet-tmpl/prog/js/basket.js for
translation, e.g.:
msgid "Your cart is currently empty"
msgstr ""
- Edit the "msgstr" string however you want (it's just for
testing).
- Install the updated translation:
> perl translate install fr-FR
- Switch to your newly translated language in the staff client
and repeat the test plan above. The translated strings should
appear.
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>
Katrin Fischer [Thu, 24 Sep 2020 22:24:29 +0000 (00:24 +0200)]
Bug 19351: Add items.copynumber to the checkouts table
This adds the items.copynumber to the checkouts table in the
patron account in the staff interface.
To test:
- Apply patch
- Check out some items with and without copy number in the item
to any patron
- In the checkouts table on the Checkouts and Details tabs:
- Verify that a new column shows 'copy no' shows after 'call no'
- Verify the information displays correctly
- Verify that the column configuration settings for the new column works
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>
Katrin Fischer [Thu, 17 Sep 2020 11:52:10 +0000 (11:52 +0000)]
Bug 15780: Add inventory number to checkout list on summary print
This will add the inventory number to the list of checkouts that
can be printed using the 'Print summary' feature from the patron
account in staff.
To test:
- Apply patch
- Make sure you have some items with and without inventory number set
- Check them out to any patron
- Go to Print > Print summary
- Verify the inventory number column is showing up and the numbers
show with their items.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Mon, 21 Sep 2020 12:21:23 +0000 (12:21 +0000)]
Bug 21882: Show price information in acqusitions tab on staff detail page
This adds a new 'Price' column to the acqusition details tab.
To test:
- Apply patch
- Add one or more orders for a record.
- Before closing the basket: go to the detail page in the catalog
- Verify that the price estimated/budgetet price now shows in a new column
- Add actual cost to the basket or close the basket and receive the item
- Verify the column now shows the updated actual cost
- Verfy the tooltip on the table heading works
- Verify the column configuration for the new column works as well
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 [Tue, 29 Sep 2020 11:12:31 +0000 (11:12 +0000)]
Bug 26572: Add autocomplete to librarian field in log viewer
This patch adds patron autocomplete to the librarian field in the log
viewer search form.
Also changed: Some HTML markup errors in the template have been
corrected: Labels with invalid corresponding ids or with no valid id.
To test, apply the patch and go to Tools -> Log Viewer.
Type a name or cardnumber into the "Librarian" form field. This should
trigger an autocomplete dropdown.
Select a patron and confirm that the field is populated with the correct
borrowernumber.
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 21111: Add --exclude-indexes to koha-run-backups
This patch adds a trivial switch so koha-run-backups can pass the
--exclude-indexes option switch to koha-dump. This way if the sysadmin
doesn't want to backup the Zebra indexes, it can be controlled by
tweaking the cron definition.
To test:
1. Apply this patch
2. Run:
$ debian/scripts/koha-run-backups --days 2 --output /var/spool/koha
3. Notice the size of the backups:
$ ls -lh /var/spool/koha/kohadev
4. Try the new option switch:
$ debian/scripts/koha-run-backups \
--exclude-indexes \
--days 2 --output /var/spool/koha
5. Repeat 3
=> SUCCESS: Backups are smaller!
6. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: fix --exclude_indexes vs --exclude-indexes in koha-run-backups.xml
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sun, 13 Sep 2020 21:45:25 +0000 (21:45 +0000)]
Bug 15329: Add new column for budget to the late orders table
The table currently displays the fund, but as late orders can be
from a past budget with the same fund names, this can be confusing.
So adding the budget in addition to the fund will be helpful.
To test:
- Add a basket and an order, close the basket
- Go to the late oder page
- Make sure your order shows up there
- Apply the patch
- Reload the late orders page
- Verify a new column budget shows in the table
- Verify the table configuration settings work for the new column
- Run t/db_dependent/Koha/Acquisition/Fund.t
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>
To test:
- Catalog records with 770/772 in Koha, examples can be found in the LOC
documentation.
- When UseControlNumber is set to Use and $w is added, a link will be built using $w
- If there is no $w or UseControlNumber is Don't use, a link will be build using the title
- Verify that they display nicely in the OPAC and staff detail pages
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 [Wed, 14 Oct 2020 11:45:01 +0000 (12:45 +0100)]
Bug 24834: (follow-up) Improve breadcrumb
This patch updates the breadcrumb navigation to be consistent for View,
Edit and Run with the report name (and id in brackets) appropraitely
placed in the breadcrumb with a link back to the view and the 'Action'
clearly listed as the final part of the breadcrumb path.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 14 Oct 2020 07:49:50 +0000 (08:49 +0100)]
Bug 24834: (QA follow-up) Add missing filter
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Mon, 21 Sep 2020 12:46:48 +0000 (12:46 +0000)]
Bug 24834: Display report number on editing or running a report
The only place the report ID was shown when editing or running a
report was in the URL. With this patch, we also show it in the
heading, the breadcrumbs and the page title.
To test:
- Create a new SQL report.
- Save the report.
- Edit the report.
- Verify that the report id now shows in the breadcrumbs and page title.
- Run your report.
- Verify the report id shows in the page heading, title and breadcrumbs.
Signed-off-by: Michael A <madamyk@ckls.org> Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Sun, 11 Oct 2020 23:47:45 +0000 (23:47 +0000)]
Bug 26641: Optimize CatalogModuleRelink lookup
This patch moves the CatalogModuleRelink lookup outside the loop to
improve performance (especially for large databases), and includes a
tester friendly test plan.
Test plan:
0. Using koha-testing-docker
1. koha-shell -c "./misc/link_bibs_to_authorities.pl -l --test" kohadev
2. Note 436 bibs checked, 1315 headings linked, 676 headings unlinked
3. koha-shell -c "./misc/link_bibs_to_authorities.pl -l --test -g 700" kohadev
4. Note 436 bibs checked, 248 headings linked, 111 headings unlinked
5. Note output appear to all be names (rather than subjects or other authorities)
6. Note also that the 2nd run with -g 700 is almost 2x faster than without
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andreas Roussos [Fri, 9 Oct 2020 11:39:52 +0000 (13:39 +0200)]
Bug 26641: pass the MARC field as an argument to link_bibs_to_authorities.pl
When running link_bibs_to_authorities.pl, it could be useful to have
the ability to specify which MARC field the script should operate on.
For example, when you have a catalog where most links are in place,
and you don't want the script to process every MARC field but rather
limit it to a specific MARC field (e.g. 700) because you've observed
that there are many missing links for that particular MARC field.
This patch provides that enhancement.
Test plan:
1) Run the script as follows (preferably in a test DB):
time link_bibs_to_authorities.pl -v -l --test
... and notice how long it takes to complete.
2) Apply the patch.
3) Run the script again, this time providing the MARC field to work on:
time link_bibs_to_authorities.pl -v -l --test -g=700
... and, again, notice how long it takes to complete.
The 2nd run should run faster than the 1st one.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 1 Oct 2020 08:04:43 +0000 (09:04 +0100)]
Bug 21898: Add aqbasket to available tables for ACQORDER
This patch should allow <<aqbasket.$field>> replacements to work in both
email subject and email content fields for notices.
Test plan
1/ Add <<aqbasket.basketname>> into the ACQORDER notice (In the subject
line and content box)
2/ Trigger said notice to send (before applying the patch)
3/ Note that the replacements have not taken place..
<<aqbasket.basketname>> is present as is.
4/ Apply patch
5/ Trigger the notice again
6/ Note that the replacements are now made.
7/ Signoff
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: fix alignment in hashref, edit commit message to fix
letter code "AQORDER" vs "ACQORDER"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 17 Oct 2020 12:14:00 +0000 (14:14 +0200)]
Bug 26680: Acq - Wrap (rcvd) in a span and change text to received
The new span with the class order-received will allow to have
individual styling on the term to make it stand out more in the
list of order lines of a basket. The text change will ease translation.
To test:
- In acquisitions:
- Create a new basket
- Add at least 2 order lines
- Close the basket
- Receive a new shipment and one of your order lines
- Go back to your basket
- One line should now show "(rcvd)"
- Apply patch
- Reload the basket page
- Verify the text has changed and element now has a class in the
HTML source
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 17 Oct 2020 22:47:49 +0000 (22:47 +0000)]
Bug 26190: Allow to close a basket with only cancelled order lines
At the moment there are several cases, when closing a basket is not
possible:
- when there are no order lines in it
- when there are order lines with uncertain prices
- when the basket is marked as a standing order
The first case wasn't checked correctly as only pending/received
orders would be counted, but not cancelled orders.
To test:
- Create a basket
- Create an order line
- Verify the "close this basket" button shows
- Cancel the order line - the button disappears
- Apply the patch
- Verify the button appears and works now
- Create another basket - make sure you cannot close it
without order lines
- Create an order line with uncertain price checked
- you cannot close it
- Resolve the uncertain price - you can now close the basket.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 17 Oct 2020 12:04:33 +0000 (14:04 +0200)]
Bug 26718: Rename "reading history" to "checkout history"
This changes all occurences of reading history to the more
accurate term 'checokut history' as it was correctly pointed out
that 'reading' doesn't apply to all kind of items available
at the library (audio books, games, etc.)
To test:
- Verify that the term reding history has been replaced by checkout
history in:
- System preferences
- OPAC tab "your checkout history"
- OPAC tab "your privacy" (switch OpacPrivacy pref first)
- Staff permission for patron batch anonymization
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 7 Aug 2020 13:15:36 +0000 (13:15 +0000)]
Bug 26180: Add descending option to rebuild_elasticsearch.pl
While the ES index is incremental and provides results as it commits, we currently index from the oldest records to the newest.
This patch provides the option to go the other direction
To test:
1 - Have ES setup and running for Koha
2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b
3 - Note the biblios index from number 1 the end
4 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a
5 - Notice the same
6 - Apply patch
7 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b
8 - Still in ascending order
9 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b --desc
10 - Now records index in descending order
11 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a
12 - Still ascending
13 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a --desc
14 - Now descending
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: fix typo "inde" vs "index" and add commit body
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>