Owen Leonard [Mon, 12 Apr 2021 11:44:58 +0000 (11:44 +0000)]
Bug 28132: Remove "this" from button descriptions on basket summary page
This patch modifies button text on the Acquisitions basket page to
remove the word "this."
To test, apply the patch, go to Acquisitions, and locate a vendor with
baskets.
- View an open basket.
- You should see in the button toolbar, "Delete basket," and "Close
basket."
- View a closed basket.
- You should see a "Reopen basket" button.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 2 Apr 2021 19:54:30 +0000 (19:54 +0000)]
Bug 28081: Make card number a label in patron search results
This patch modifies the output of the AJAX patron search results so that
the number in the card number column is wrapped in a <label> tag which
triggers the corresponding checkbox.
To test, apply the patch and go to the Patrons module.
- Perform a patron search which will return more than one result or
click on a letter to browse.
- In the search results, confirm that clicking any card number triggers
the corresponding checkbox.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 7 Apr 2021 16:27:31 +0000 (16:27 +0000)]
Bug 28112: Z39.50 does not populate form with all passed criteria
This patch adds output of some already-existing template variables in
the Z39.50 search form so that all parameters can be used to prepopulate
the form.
To test, apply the patch and go to Cataloging.
- Click the "New from Z39.50/SRU" button
- A window should pop up and the form should be empty.
- Confirm that searching works correctly.
- Perform the same test from a bibliographic detail page using the Edit
menu -> Replace record via Z39.50/SRU.
- Some fields in the search form should be prepopulated, e.g. ISBN,
title, author.
- Paste this link into your browser:
http://path.to.your.koha/cgi-bin/koha/cataloguing/z3950_search.pl?frameworkcode=&isbn=isbn&issn=issn&title=title&author=author&dewey=dewey&subject=subject&lccall=lccall&controlnumber=controlnumber&stdid=stdid&srchany=srchany&publicationyear=publicationyear
- The search form should appear with all fields prepopulated.
- Perform the same tests in Acquisitions with the option for adding to a
basket via an external search.
- The link for testing all parameters:
http://path.to.your.koha/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=4&basketno=3&isbn=isbn&issn=issn&title=title&author=author&dewey=dewey&subject=subject&lccall=lccall&controlnumber=controlnumber&stdid=stdid&srchany=srchany&publicationyear=publicationyear
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 12 Apr 2021 17:29:09 +0000 (17:29 +0000)]
Bug 28055: (follow-up) Revert changes to aoColumnDefs option name
This patch undoes changes to two lines in columns_settings.inc which
were triggering unwanted side-effects. There are several templates and
JavaScript files which use "aoColumnDefs" to pass options to columns
settings, and if we change this file without changing those at the same
time things will break.
When these lines are updated it must be done so at the same time as we
modify the templates which pass that same option.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 12 Apr 2021 13:22:50 +0000 (13:22 +0000)]
Bug 27069: (follow-up) Only display rules if one is set
Testing that the rule is != 'hold_allowed' is true for each itemtype where
the rule is not set. This means it appears that no holds are allowed
for any item type if no rules are set
To test:
1 - With a fresh testing DB or no holdallowed rule set, you can use SQl below to clear:
DELETE from circuation_rules WHERE rule_name='holdallowed';
2 - Load smart-rules.pl (Administration->Circulation and fines rules)
3 - Scroll to "Default holds policy by item type"
4 - Note all item types appear as 'No holds allowed'
5 - Apply patch
6 - Reload
7 - All clear
8 - Confirm adding rules displays correctly
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27839: (follow-up) Update docs for koha-worker
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 27839: Add tab-completion in bash for koha-worker
This patch simply adds tab-completion for this script.
To test:
1. Apply this patch
2. Run:
$ cp debian/koha-common.bash-completion /etc/bash_completion.d/koha-common
3. Open a new bash instance
4. Type 'koha-worker <tab>'
=> SUCCESS: All options are there
5. Play with Koha instances
=> SUCCESS: they show up, once chosen they are not offered anymore
6. 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>
Jonathan Druart [Thu, 27 Feb 2020 09:31:13 +0000 (10:31 +0100)]
Bug 24695: Move to Koha::Report->is_sql_valid
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Thu, 20 Feb 2020 09:31:08 +0000 (11:31 +0200)]
Bug 24695: Improve SQL report validation
The saved SQL report code validates the SQL in multiple places:
when saving, when updating, and when executing the query.
Move the validation code into Koha::Reports, and write tests for it.
Test plan:
1) Apply patch
2) Create a new valid SQL report, save it (success)
3) Create a new illegal SQL report, try to save (fails)
4) Update already saved SQL report by adding one of
the forbidden words, eg. delete or drop (saving will fail)
5) Edit a save_sql in the database, changing it to eg.
"drop borrowers", and try to execute it (fails)
6) Prove t/db_dependent/Koha/Reports.t
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no qa errors.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 24695: (QA follow-up) Fix number of tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 18 Nov 2020 13:21:05 +0000 (13:21 +0000)]
Bug 27049: Add /misc/cronjobs/writeoff_debts.pl
This patch adds a new misc/cronjobs/writeoff_debts.pl script to allow the bulk
waiver of debts from the system. The script accepts some filter parameters,
including the option to pass a line delimited file of accountline_ids, and will
apply a WRITEOFF account against them for the amount of the outstanding debt.
Test plan
1/ Add some debts to the system for various users.
2/ Output a line delimited report for accountlines for those debts.
3/ Run the script with the --file parameter and confirm those debts were
written off.
4/ Repeat steps 1-3 above but add in a step to partially pay some debts
prior to running the script.
5/ Repeat steps 1-3 above but pay of some of the debts prior to running
the script.
6/ Repeat steps 1-2 above, but instead of passing --file use a
combination of the other parameters to limit your list of debts to
writeoff.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 16 Jul 2020 08:42:20 +0000 (09:42 +0100)]
Bug 26734: Ratify account slip printing
This patch simplifies the members/print*.pl controller scripts to only
pass around the minimum required data for the templates.
Test plan
Slips should continue to print as they did prior to the patch
1/ Add a manual invoice and manual debit to a patrons account
2/ Print a slip for the manual invoice, compare to a printed slip prior
to the patch.
3/ Print a slip for the manual debit, compare to a printed slip prior to
the patch.
4/ Signoff.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Question mark is wonrgly placed when you want to delete a desk.
Test plan :
- Enable 'UseCirculationDesks'
- On Administration > Desks menu, create a new desk
- Try to delete it : note the question mark in inside the quotation
marks
- Apply patch and refresh page
- Question mark should now be after the last quotation mark
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 25 Mar 2021 14:29:06 +0000 (14:29 +0000)]
Bug 27726: Increase 'content' field size
This alternate patch increases the field size from a 255 character
varchar to a 65535 character text field. This allows for more detailed
problem reports to be submitted.
Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 12 Apr 2021 09:08:01 +0000 (11:08 +0200)]
Bug 27857: Fix Pseudonymization.t
t/db_dependent/Koha/Pseudonymization.t .. 2/3
# Failed test 'Attribute 1 should be retrieved correctly'
# at t/db_dependent/Koha/Pseudonymization.t line 198.
# Structures begin differing at:
# $got->{borrowernumber} = Does not exist
# $expected->{borrowernumber} = '58'
# Failed test 'Attribute 2 should be retrieved correctly'
# at t/db_dependent/Koha/Pseudonymization.t line 204.
# Structures begin differing at:
# $got->{borrowernumber} = Does not exist
# $expected->{borrowernumber} = '58'
# Looks like you failed 2 tests of 3.
t/db_dependent/Koha/Pseudonymization.t .. 3/3
David Cook [Thu, 14 May 2020 04:00:32 +0000 (04:00 +0000)]
Bug 25476: Add ability to browse file uploads by category
This patch adds the ability to search/browse files by category.
(Note it doesn't include temporary uploads since they don't have
a "category" per se.)
Test Plan:
0) Apply patch
1) Go to /cgi-bin/koha/admin/authorised_values.pl
2) Create "UPLOAD" authorized value category
3) Create "test" authorized value in "UPLOAD" category
4) Go to /cgi-bin/koha/tools/upload.pl
5) Note "Search uploads by category" fieldset
6) Upload new file to "test" category
7) Click "Back"
8) Choose "test" category in "Search uploads by category"
9) Click "Search"
10) Note that your file upload is displayed in result list
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 7 Apr 2021 13:02:17 +0000 (15:02 +0200)]
Bug 14233: Add logging support to notices and slips management
This enhancements adds support for logging changes to notices and slips.
Features include:
- a system preference (NoticesLog) which allows you to enable logging changes for notices and slips
- logging new notices, changes to notices, and deletion of notices
- filtering in the log viewer so you can show all changes for a specific notice
- a comparison feature, so you can see what changes were made to a notice.
Test plan:
1/ Add some 'Notice' action logs by adding a new notice or updateing an
existing notice
2/ Go to the 'Log viewer' under 'Tools'
3/ Note you can filter by 'Notices'
4/ Confirm the changes you made appear in the logs and that the 'Object'
field links back to the updated notice ready for editing.
1/ Make some changes to at least two different notices to trigger logs
2/ Go to the 'Log viewer' from 'Tools' and filter on 'Notices'
3/ Note, you can now see the 'Compare' checkbox option for these logs
4/ Select the checkbox on one of the notices and note that the results
are now filtered by that specific notice.
5/ Select a second checkbox to expose the option to 'View comparison'
6/ Click 'View comparison' to see the 'Diff view' of the two notices.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 6 Apr 2021 14:26:23 +0000 (16:26 +0200)]
Bug 28094: Deal with encoding for overriden sysprefs
The string we retrieved is UTF-8 encoded, to prevent encoding issue we
must decode it first.
Test plan:
Easily testable with LibraryName:
1. edit /etc/apache2/sites-available/kohadev.conf
2. Add
RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Library of ❤️"
3. restart_all
4. Hit the mainpage and look at the source (or title) and confirm that
the string is displayed correcty
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 25 Mar 2021 17:22:29 +0000 (17:22 +0000)]
Bug 28031: (follow-up) Clarify check methods
The check methods were positioned under the 'Internal methods' section
of the meodule but are used externally.
It also felt strange to have a noop or die method. Instead, I propose
renaming them to `repeatable_ok` and `unique_ok` and returning a
boolean denoting their state.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The current implementation of store+check_repeatable+check_unique_id
notably retrieves the related Koha::Patron::Attribute::Type object three
times.
This can be easily solved by retrieving it once and reusing. This patch
does that.
This changes the signature for the helper methods.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Verify the old _check_repeatable method is not used anywhere
$ git grep _check_repeatable
=> SUCCESS: It is not!
5. Verify check_unique_id is not used anywhere, so no risk changing the
signature
$ git grep check_unique_id
=> SUCCESS: It is safe to update it!
6. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28031: Avoid wrong exception on saving updated attribute
In the case a non-repeatable attribute for a patron is being updated
(its value) the routines that check the type is repeatable should
exclude its own id from the search for things to work.
This patch solves that.
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> FAIL: Tests explode! An unexpected exception is thrown!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27857: (follow-up) Use a more fine-grained exception for mandatory attributes
On using this dev for the API, I found that the original FKConstraint
exception was too generic, and could be confused with those risen by
Koha::Patron->store. So this patch changes the exception that is thrown
in Koha::Patron->extended_attributes
The change is reflected on the test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron.t
=> SUCCESS: Tests pass, and they include the new exception
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27857: Make Koha::Patron->extended_attributes validate data
This patch makes the extended_attributes method use
Koha::Patron->add_extended_attribute inside the loop, instead of direct
DB access. This way, it takes advantage of the validation that is done
there.
All happens inside a transaction, so if 'add_extended_attribute' throws
an exception, everything is rolled back.
To test:
1. Apply the previous patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron.t
=> FAIL: The behavior is not the correct one, tests fail
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
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>
This patch adds regression tests for the changed behavior.
Koha::Patron->extended_attributes will now throw exceptions and rollback
on invalid attributes.
The existing tests are amended so they don't try to deal with skipping
bad attributes.
Specific subtests are added for error situations.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron.t
=> FAIL: Tests fail because the new behavior is not implemented.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27857: Move extended_attributes tests to Koha/Patron.t
They really belong here. both Patron.t and Patrons.t got lengthy and it
is not intuitive to look for tests for a Koha::Patron method in the
Patrons.t file.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron.t \
t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass, no new stuff
4. Sign off :-D
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>
This trivial patch adds a new exception for more fine-grained control on
the errors when dealing with patrons and their extended attributes.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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>
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>
Bug 27858: (follow-up) Consistency in stringified exception
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27858: Make Koha::Patron::Attribute->store raise an exception on invalid type/code
This patch adds type validation to the ->store method. And exception
should be thrown if the type is invalid. Things currently explode in
such situations, so this doesn't change the behavior (just adding more
informative failure information).
To test:
1. Apply the previous patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> FAIL: No exception is thrown on the bad case, weird error
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Exception thrown!
5. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch introduces unit tests for the new exception to be thrown.
It generates a new extended attribute type, keeps the randomly generated
'code' and deletes the object. This way we can be sure the code doesn't
exist on the DB. It then tries to generate an attribute of that type, to
force the exception to be thrown.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Working on bug 27857 showed we needed one more exception, for when the
passed attribute type is invalid.
This patch adds the Koha::Exceptions::Patron::Attribute::InvalidType
exception. It adds a format for stringifying it, and tests are added.
The previous exceptions tests lacked one case, so I add them on this
patch as well.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove tt/Koha/Exceptions.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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>
Bug 27833: Make K::P::Attribute add the object to the exception
This patch makes the 'check_unique_id' and '_check_repeatable' methods
pass the 'attribute' parameter when throwing an exception. This way we
can provid emore meaningfull error messages.
To test:
1. Apply the previous patches
2. Run
$ kshell
k$ prove t/db_dependent/Koha/Patron/Attributes.t
=> FAIL: The exceptions are not passed the attribute!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
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>
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27833: Make Koha::Exceptions::Patron::Attribute::* have parameters
This patch adds a 'field' to this exceptions. They now have an
'attribute' parameter referencing the object itself,
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
3. Sign off!
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>
Fixes the checkbox label by adding an id, so that when you click on
"Show only subscriptons" the checkbox will be checked.
Adds standard classes to the existing "Merge selected invoices" button
to make things more consistent. Also added the fa-compress icon that
we use in cataloguing on the merge records button.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Devinim [Fri, 18 Oct 2019 13:51:55 +0000 (13:51 +0000)]
Bug 22773: (follow-up) Recommended changes are made on datatable and butons
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Christopher Kellermeyer <ckellermeyer@altadenalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Rebase add comma
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Devinim [Thu, 3 Oct 2019 15:59:37 +0000 (15:59 +0000)]
Bug 22773: Message appearing if any invoice selected
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Wed, 2 Oct 2019 12:02:24 +0000 (12:02 +0000)]
Bug 22773: (follow-up) Fix capitalization
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Devinim [Tue, 1 Oct 2019 09:38:24 +0000 (09:38 +0000)]
Bug 22773: Bulk Close invoices and Filter invoice view (open/closed)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 22773: The deprecated plugin is removed
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Christopher Kellermeyer <ckellermeyer@altadenalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Remove asset for removed js
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 7 Apr 2021 11:10:38 +0000 (12:10 +0100)]
Bug 28097: Mock finesModes to disable recalculation
Since bug 8338 the recalcuated zero amount fine is subsequently removed
in _FixOverduesOnReturn which causes this test to fail if finesMode is
'production' and 'CalculateFinesOnReturn' is enabled.
Perhaps we should be 'VOID'ing fines rather than completely deleting
them, but that's a question for another day.
Test plan
1/ Enable finesMode in the staff client
2/ Run the test and watch it fail
3/ Apply the patch
4/ Run the test and watch it pass
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 22 Mar 2021 13:03:11 +0000 (13:03 +0000)]
Bug 28013: Performance improvements to CanBookBeRenewed
In the case of 'AllowRenewalIfOtherItemsAvailable' we check all existing reserves against
all existing items. This patchset reduces the number of DB/subroutine calls
This patch adds an atomic update file that takes care of translating
existing rules. It constrains the rules to translate to those currently
expected by Koha and leaves any other value out.
To test:
1. Have some manually added rules:
$ koha-mysql kohadev
> INSERT INTO circulation_rules (rule_name,rule_value) VALUES
('holdallowed', -1);
> INSERT INTO circulation_rules (rule_name,rule_value) VALUES
('holdallowed', 1);
> INSERT INTO circulation_rules (rule_name,rule_value) VALUES
('holdallowed', 2);
> INSERT INTO circulation_rules (rule_name,rule_value) VALUES
('holdallowed', 3);
> INSERT INTO circulation_rules (rule_name,rule_value) VALUES
('holdallowed', 0);
> INSERT INTO circulation_rules (rule_name,rule_value) VALUES
('holdallowed', 4);
2. Apply this patch
3. Run:
$ updatedatabase
=> SUCCESS: It doesn't explode
4. Verify the created rules were updated correctly:
> SELECT * FROM circulation_rules WHERE rule_name='holdallowed';
5: Verify all the tests that dealt with this rule still pass!
$ kshell
k$ git diff origin/master --name-only | grep -e '\.t$' | \
xargs prove
=> SUCCESS: Tests pass!
6. Verify the UI handles setting things correctly
7. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Mon, 5 Apr 2021 22:39:43 +0000 (22:39 +0000)]
Bug 28092: Add reserve notes column to holds to pull
To test:
-PLace a hold and add a reserve note to that hold
-Go to Circulation > Holds to pull
-Notice there is no reserve notes column
-Apply patch and restart all the things
-Reload the Holds to pull report and you should see a reserve notes column
-Go to table settings (/cgi-bin/koha/admin/columns_settings.pl) and make sure you can properly hide the column.
-Test other columns in the table and make sure you can properly hide them
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> 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>
Bug 27894: Add visual feedback on overridden pickup locations
This patch takes advantage of the previous changes, and makes the
select2 dropdown display a warning sign (with a tooltip) on pickup
locations that, if chosen, it would mean a circ rule would be
overridden.
To test:
1. Have some pickup locations that are not valid for existing holds and
AllowHoldPolicyOverride set to "Don't allow"
2. Visit a biblio with some holds
3. Choose a hold that cannot use some pickup location and use the
dropdown
=> SUCCESS: Only valid pickup locations are retrieved
4. Set Allow HoldPolicyOverride to "Allow"
5. Refresh the page (I usually click on the Holds tab)
6 .Repeat 3
=> SUCCESS: All pickup locations in the system are displayed
=> FAIL: No visual feedback on overridden pickup locations :-(
7. Apply this patch and refresh the page
8. Repeat 3
=> SUCCESS: All pickup locations in the systema are displayed
=> SUCCESS: Visual feedback on overridden pickup locations is shown!
9. Set AllowHoldPolicyOverride to "Don't allow"
10. Repeat 3
=> SUCCESS: Only valid pickup locations are retrieved
=> SUCCESS: No overrridden warn/symbol, as expected
11. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes the controller for the route, return all valid pickup
locations (i.e. pickup_location => 1) when AllowHoldPolicyOverride is
set to 'Allow', but also adds a calculated attribute: 'needs_override'
so the consumer knows the specific pickup location needs an override
(and thus be able to provide visual feedback on a single run).
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> FAILURE: Tests fail, the change is not implemented
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Mon, 9 Nov 2020 08:36:28 +0000 (09:36 +0100)]
Bug 26970: Add row highlight on drag in Elasticsearch mapping template
In Elasticsearch mapping tables :
In order to better see which row is currently in drag-an-drop,
add an highlight color like in circulation and fine rules when editing a row.
Test plan :
1) Go to Administration > Search engine configuration (Elasticsearch)
2) In each table : biblio, authorities, facets
3) Clik on a row to start a drag => See row turning orange
4) Release to drop => See row turning back to original color
https://bugs.koha-community.org/show_bug.cgi?id=26970 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 [Mon, 14 Sep 2020 17:02:20 +0000 (17:02 +0000)]
Bug 26459: Add hold-mode option to sip_cli_emulator
To test:
1 - Apply patch
2 - Restart all
3 - Place an item level hold for a patron via the staff client
4 - Cancel the hold using the sip_cli_emulator with hold-mode: -
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --patron {cardnumber} --item {BARCODE} -m hold -l CPL --hold-mode -
5 - Run the sip_cli_emulator with no params
6 - Verify help text is understandable
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Thu, 25 Mar 2021 17:58:04 +0000 (17:58 +0000)]
Bug 28034: Make club enrollment tables in to DataTables
To test:
-Add some clubs
-Go to a patron record and enroll them in some clubs but not in others.
-There should be two table under the clubs tab, Clubs currently
enrolled in and Clubs not enrolled in
-Neither are DataTables
-Apply patch
-With the same patron check the clubs tab, they should be datatables
now
-Make sure all the controls, pagination works good
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>
Emmi Takkinen [Thu, 26 Nov 2020 12:59:42 +0000 (14:59 +0200)]
Bug 26498: Set default expiration date for holds
Koha doesn't automatically set expiration date for holds
so they can live in the system forever. This patch adds
new sysprefs to control setting of default expiration
date for holds. Note that expiration date is only set
if input field for it is left blank.
To test:
1. Apply patch and update database.
2. Enable syspref "DefaultHoldExpirationdate" and set some values
to "DefaultHoldExpirationdatePeriod" and
"DefaultHoldExpirationdateUnitOfTime".
3. Add some holds for patron from staff client or OPAC and leave
expiration date input field blank.
=> Holds expiration date should be set according your settings
4. Disable "DefaultHoldExpirationdate" and repeat step 3.
=> Expiration date shouldn't be set.
Also prove prove t/db_dependent/Hold.t
Sponsored-by: Koha-Suomi Oy Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 29 Mar 2021 11:35:02 +0000 (11:35 +0000)]
Bug 28046: Add "Additional fields" link on acquisition navigation menu
This patch adds a link to the "Additional fields" page in Administration
to the sidebar menu shown on Acquisitions pages.
To test, apply the patch and go to Acquisitions.
- In the sidebar menu you should see a "Manage order basket fields"
link.
- The link should take you directly to the "Additional fields for
'aqbasket'" page.
Signed-off-by: Séverine QUEUNE <severine.queune@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 26 Mar 2021 14:01:40 +0000 (14:01 +0000)]
Bug 28006: Restore "Additional fields" on navigation menu
This patch adds a link to the "Additional fields" page in Administration
to the sidebar menu shown on Serials pages.
To test, apply the patch and go to Serials.
- In the sidebar menu you should see a "Manage subscription fields"
link.
- The link should take you directly to the "Additional fields for
'subscription'" page.
Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 31 Mar 2021 12:41:59 +0000 (12:41 +0000)]
Bug 28066: Remove select tag's size attribute where it is 1
This patch removes the "size" attribute from <select> tags where the
value of the attribute is 1. The attribute is unnecessary because the
default value when the attribute is undefined is 1.
This will allow for more careful sizing of <select> tags without a size
attribute while preserving the desired behavior of <select> tags which
have a size greater than 1.
The patch modifies 83 files but makes the same minor corrections to
each. I think examining the diff is sufficent, or testing a
representative set of pages:
- Administration -> MARC frameworks -> MARC structure -> Edit tag:
The "Authorized value" select.
- Patrons -> New patron: The "Library" select.
- Reports -> Patrons with no checkouts: The "Into an
application" selects.
If anyone would like help testing any particular template I can
follow-up.
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>
Owen Leonard [Tue, 30 Mar 2021 12:23:12 +0000 (12:23 +0000)]
Bug 28055: Convert DataTables option names to current version
This patch makes changes the two global DataTables files in the staff
interface, replacing older 1.9.x option names with the current 1.10.x
version.
To test, apply the patch and confirm that default DataTables behaviors
continue to work correctly: Table information, "Show XX entries"
controls, pagination, search.
- Test tables which use the default DataTables configuration from
datatables.js:
- Administration -> Z39.50/SRU servers
- Administration -> MARC frameworks -> MARC structure
- Test tables which use the DataTables configuration in
columns_settings.inc, including column visibility and export controls.
- Administration -> Libraries
- Patrons -> Patron search results
- Circulation -> Holds queue
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 29 Mar 2021 18:35:16 +0000 (18:35 +0000)]
Bug 28047: Standardize: Call number, callnumber, Call no. etc.
This patch modifies instances in the template where variations of "Call
number" are used. Instead of "Call no." "Call no" or "callnumber," "Call
number" is used instead.
To test, apply the patch and test the following pages to confirm that
the label has been correctly updated. In the staff interface:
- Circulation -> Check out to a patron with checkouts -> View the table
of checked-out items.
- Check out to a patron who is guarantor to a patron with checkouts ->
View the table of the relative's checked-out items.
- Catalog -> Bibliographic detail page
-> Holdings table
-> Place hold -> Check "specific items" table
-> Rota (Stock rotation)
- Pending on-site checkouts
- Circulation -> Transfers to receive
- Circulation -> Transfers to send
- Patron -> Patron details
-> Print -> Print summary
-> Circulation history
In the OPAC:
- Log in as a user with checkouts
-> View the checkout tab on the "Your summary" page
-> Your checkout history
In self checkout:
- Log in as a user with checkouts -> View the checkouts table.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: 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 [Thu, 25 Mar 2021 18:20:39 +0000 (18:20 +0000)]
Bug 28037: Improve breadcrumbs of CSV profiles page
This patch expands the logic around the page title and breadcrumbs of
the CSV profiles page.
The name of the page has also been changed from "CSV export profiles" to
"CSV profiles" to match links elsewhere in Koha.
To test, apply the patch and go to Tools -> CSV profiles.
- The initial state of the page title and breadcrumbs menu should be
"Tools > CSV profiles."
- Click "New CSV profile." The page title and breadcrumbs should show
"Tools > CSV profiles > New CSV profile."
- Edit an existing CSV profile. The page title and breadcrumbs should
show "Tools > CSV profiles > Modify a CSV profile."
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, 25 Mar 2021 18:05:13 +0000 (18:05 +0000)]
Bug 28036: Improve breadcrumbs of serial claims page
This patch modifies the serial claims script and templates so that
better context can be shown in the page title and page breadcrumbs when
a vendor has been selected.
To test, apply the patch and go to Serials -> Claims.
- The initial state of the page title and breadcrumbs should show
"Serials > Claims."
- Select a vendor. The page title and breadcrumbs show show "Serials >
Claims > Claims for <vendor name>."
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 [Thu, 25 Mar 2021 16:44:33 +0000 (16:44 +0000)]
Bug 28035: Improve breadcrumbs of cataloging search page
This patch expands the logic around the cataloging search page's
breadcrumbs so that more context is provided in the breadcrumbs menu.
The page title should also reflect this change.
Some markup in the body of the page has been updated to clarify the page
structure using headings.
To test, apply the patch and go to Cataloging.
- The page title and breadcrumbs menu should show "Home > Cataloging"
- Perform a search which will return results from the catalog, from the
reservoir, or both. The page title and breadcrumbs menu should show:
"Home > Cataloging > Search results."
- Perform a search which will return no results. The page
title and breadcrumbs should be: "Home > Cataloging > No results
found."
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 modifies OPAC templates to replace the use of the
"title-string" DataTables sorting method with the newer "data-order"
attribute.
To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:
- As a logged-in user, (proper testing will depend on having the
relevant data associated with your user, e.g. holds, searches, ill
requests, etc.):
- Your summary
- Checkouts
- Overdues
- Holds
- Your charges
- Your search history
- Your checkout history
- Your holds history
- Your interlibrary loan requests
- Your tags
- Bibliographic detail page
- With a non-serial record: Holdings
- With a serial record: Latest issues
- More details -> Full history: Test multiple years if possible
- Course reserves -> Course details
- Self checkout -> Check out to a patron with checkouts
Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch modifies various templates to replace the use of the
"title-string" DataTables sorting method with the newer "data-order"
attribute.
To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:
- Cataloging -> Edit items
- Easiest to test with an title with many items. You can follow the
"Edit items" link from search results.
- Tools -> Patron lists
- View the contents of a patron list
- Catalog -> Place hold
- Locate a title with multiple items and check out each item with a
different due date.
- Start the process of placing a hold on that title for a patron.
- On the "Place hold" screen, check the table of "specific" items and
test sorting of the "Information" column by date due.
- Tools -> Tags
Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>