The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the joins were not updated accordingly so a
few scripts got broken.
To test:
1) Notice that
$ perl misc/cronjobs/automatic_renewals.pl -c -s -v
returns 255 error code on exit
2) Apply patch
3) Notice the automatic_renewals.pl works now and exit code is 0
4) Make sure /cgi-bin/koha/tools/batch_extend_due_dates.pl works.
5) Try to grep for 'borrower' in Koha source code and see if there
are any other join done using the Koha::Checkout or
Koha::Old::Checkout objects.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29380: (follow-up) Fix renewal feature in staff interface
The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the usage in the renew.pl script was not
updated.
To test:
1) Try to renew a book in intranet through the renewal tab
2) Notice it gives error
3) Apply patch
4) Notice the error is now gone
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
No method count found for Koha::Virtualshelves DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'category' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 601 at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt line 80.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch renames the (passed through) 'context' param for
'overlay_context'. I propose doing so, because in Koha-land 'context'
has a special meaning, related to C4::Context and it reads ambigous.
The patch itself is pretty trivial.
Tests should pass:
1. Run:
$ kshell
k$ prove t/db_dependent/Biblio/MarcOverlayRules.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14957: (follow-up) Clarify 'context' param
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Add a rule based system for merging MARC records to for example
prevent field data from being overwritten.
To test:
1. Apply this patch.
2. Log in to staff client.
3. Enable new syspref MARCMergeRules.
4. Click the new link "MARC merge rules" in the "Catalog"
section of the Koha administration page.
5. Create a new rule:
Module: source, Filter: *, Tag: 245, Preset: Protect.
6. Clicking "Edit" should allow you to edit corresponding rule.
7. Clicking "Delete" should remove corresponding rule after confirmation.
8. Selecting one or more rules followed by clicking "Delete
selected" should remove all selected rules after confirmation.
9. Try creating a rule with tag set to "**", the other options does
not matter. Verify that saving this rule produces an error
message complaining about invalid tag regular expression.
10. Try creating a rule with tag set to "008" (or other control
field) and set Appended: Append and Removed: Skip, the other
options does not matter. Verify that saving this rule produces
an error message complaining about invalid combination of actions
for control field.
11. With the 245 rule in step 5 in place, edit a bibliographic record,
change 245a for example (which should be Title for MARC21) and save.
12. Verify that the changes has not been saved.
13. Create a new rule:
Module: source, Filter: intranet, Tag: 245, Preset: Overwrite.
14. Repeat step 12, and verify that the changes has now been saved.
15. Run tests in t/db_dependent/Biblio/MarcMergeRules.t and very
that all tests pass.
Sponsored-by: Halland County Library
Sponsored-by: Catalyst IT
Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
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>
The previous patch makes check_cookie_auth return the session instead of
$sessionID, so we are adjusting the different calls to prevent
confusion.
However they are mainly used to check the authentication status and
don't care about this second variable.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The value of the checkbox was not correct
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Here we go!
Disclaimer: this patch is huge and does many things, but splitting it in
several chunks would be time consuming and painful to rebase. However it
adds many tests and isolate/refactor code to make it way more reusable.
This patchset will make the "batch item modification" and "batch item
deletion" features use the task queue (reminder: Since bug 28158, and so
21.05.00, we do no longer use the old "background job" functionality and
the user does not get any info about the progress of the job).
More than that, more of the code to build an item form and a list of
items is now isolated in module (.pm) and include files (.inc)
We are reusing the changes made by bug 27526 that simplifies the way we
edit/create items (no more unecessary serialization Koha > MARC > MARCXML
> XML > HTML)
New module:
* Koha::BackgroundJob::BatchDeleteItem
Subclass for process item deletion in batch
* Koha::BackgroundJob::BatchUpdateItem
Subclass for process item modification in batch
* Koha::Item::Attributes
We needed an object to represent item's attributes that are not
mapped with a koha field (aka "more subfields xml")
This module will help us to create the marcxml from a hashref and the
reverse.
* Koha::UI::Form::Builder::Item
The code that was used to build the add/edit item form is
centralised in this module. In conjunction with the
subfields_for_item BLOCK (from html_helpers.inc) it will be really
easy to reuse this code in other places where the item form is used
(acquisition and serials modules)
* Koha::UI::Table::Builder::Items
Same as previously for the table. We are now using this table from 3
different places (batch item mod, batch item del, backgroung job
detail view) and the code is only in one place.
To use with items_table_batchmod BLOCK (still from html_helpers.inc)
This patch is fixing some bugs about repeatable subfields and regex. A UI
change will reflect the limitation: if you want to apply a regex on a
subfield you cannot add several subfields for the same subfield code.
Test plan:
Prepare the ground:
- Make sure you are always using a bibliographic/item record using the framework
you are modifying!
- Add some subfields for items that are not mapped with a koha field
(note that you can use 'é' for more fun, don't try more funny
characters)
- Make some subfields (mapped and not mapped with a kohafield)
repeatable
- Add default values to some of your subfields
There are 4 main screens to test:
1. Add/edit item form
The behaviour should be the same before and after this patch.
See test plan from bug 27526.
Those 2 prefs must be tested:
* SubfieldsToAllowForRestrictedEditing
* SubfieldsToUseWhenPrefill
2. Batch modification
a. Fill some values, play with repeatable and regex.
Note that the behaviour in master was buggy, only the first value was modified by the regex:
* With subfield = "a | b"
1 value added with "new"
=> "new | b"
* With subfield = "a | b"
2 new fields "new1","new2"
=> "new2 | b"
Important note: For repeatable subfields, a regex will apply on the subfields in
the "concatenated form". To apply the regex on all the different subfields of a given
subfield code you must use the "g" modifier.
This could be improved later, but keep in mind that it's not a regression or behaviour
change.
b. Play with the "Populate fields with default values from default framework" checkbox
c. Use this tool to modify items and play with the different sysprefs that
interfer with it:
* NewItemsDefaultLocation
* SubfieldsToAllowForRestrictedBatchmod
* MaxItemsToDisplayForBatchMod
* MaxItemsToProcessForBatchMod
3. Batch deletion
a. Batch delete some items
b. Check items out and try to delete them
c. Use the "Delete records if no items remain" checkbox to delete
bibliographic records without remaining items.
d. Play with the following sysprefs and confirm that it works as
expected:
* MaxItemsToDisplayForBatchDel
e. Stress the tool: Go to the confirmation screen with items that can be
deleted, don't request the job to be processed right away, but check the
item out before.
4. Background job detail view
You must have seen it already if you are curious and tested the above.
When a new modification or deletion batch is requested, the confirmation
screen will tell you that the job has enqueued. A link to the progress
of the job can be followed.
On this screen you will be able to see the result of the job once it's
fully processed.
QA notes:
* There are some FIXME's that are not blocker in my opinion. Feel free to
discuss them if you have suggestions.
* Do we still need MaxItemsToProcessForBatchMod?
* Prior to this patchset we had a "Return to the cataloging module" link
if we went from the cataloguing module and that the biblio was deleted.
We cannot longer know if the biblio will be deleted but we could display
a "Go to the cataloging module" link on the "job has been enqueued"
screen regardless from where we were coming from.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Now that it's reusable, let use it somewhere else!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.
Actually this tabloop variable is never used from cataloguing plugins, we should remove it.
Test plan:
Read the code and confirm the above.
You can also test a couple of plugins and confirm that they are still
working.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The indicator value for 952 was hard coded in every case to " ". In
order to achieve that we can simply pass undef to TransformHtmlToXml()
and it will set the indicator values to " ".
To test:
1) Make sure the submission of (at least some) the modified files
still work, e.g. test that making a new item via
cataloguing/additem.pl works.
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It has been missed on bug 17600.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adjusted commit title.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Some of our partners have unusual barcode requirements that have
required us to transform scanned barcodes using javascript. This is not
the most reliable method. It would make more sense to have Koha
transform the barcodes on the backend using a plugin. We should add
hooks to transform and generate new item and patron barcodes.
Test Plan:
1) Apply this patch
2) Download and install the Barcode Transformer plugin
https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/
3) Go to the plugin configuration page, set the configuration to the example configuration from the same page
4) In the item barcode field on the checkin and checkout pages,
and anywhere else you can scan an item barcode, type in some
valid barcodes, but prefix them with X and postfix them with
Y, e.g. X123456Y
5) Note the letters are removed by Koha!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: (QA follow-up) Fix QA script issue
* Fixes issue with barcode generate stub so perlcritic is happy
* Removes extra semicolon from return call in configure method
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: Add unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: (QA follow-up) Remove unused method barcode_transform
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: (QA follow-up) Rename barcode_transform to item_barcode_transform
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: (QA follow-up) Barcodes inputted into Koha should always pass though barcodedecode
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: (QA follow-up) Catch one last case of itemBarcodeInputFilter
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: (QA follow-up) Fix Checkouts.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: Use call_recursive() as a replacement for call()
The method `call()` is not sufficient for barcode transformations. It's
possible that more than one barcode transformation plugin will be
installed. The `call_recursive()` method takes the output of the first
plugin and uses it as the input for the next plugin and so on. This allowes
each plugin to see the current version of the barcode and modify it if
necessary.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26351: Fix t/db_dependent/Koha/Plugins/Circulation_hooks.t
Bug 26351: Revert improper change to unit test, fix number of tests
Bug 26351: Remove uneeded use Koha::Plugins statements
Left over from previous changes
Bug 26351: Add missing barcodedecode import
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The logging for additional contents added by bug 26205 has been broken
by but 22544.
This patch is a revisited version as bug 24387 has been pushed.
It does not log MODIFY if no modification has been made on a template
(useful when only 1 version/lang of a content has been modified)
Test plan:
Turn on NewsLog
Add/modify and delete additional contents/News and confirm that
modification are logged.
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>
Same as the first patch, for authorities
Test plan:
Delete authority records using the batch record deletion tool
Confirm that the job is now delegated to the task queue and that
everything else is working as before
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch takes advantage of the task queue to delegate the batch
delete biblios tool.
Test plan:
Delete bibliographic records using the batch record deletion tool
Confirm that the job is now delegated to the task queue and that
everything else is working as before
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes some corrections to additional contents to allow
content to be deleted. The wrong parameter was being passed to the
script. The script was also not handling multiple deletions correctly.
The patch also adds a "category" parameter to the delete operation so
that the page is redirected correctly.
The patch also changes some strings which referred to "news"
referencing operations which might be performed on news or on HTML
customizations, e.g.:
"Are you sure you want to delete the selected content?" instead of "Are
you sure you want to delete the selected news?"
To test, apply the patch and go to Tools -> News.
- Create multiple news items if necessary.
- Test the "Delete" button corresponding to a single news item:
- Clicking the button should ask you to confirm.
- Check that the wording of the message is correct.
- After confirming the news item should be deleted.
- Ideally, test on news items which are on the second page of the
DataTable of news items.
- Test the process of deleting multiple news items at once:
- Check the checkbox next to multiple items.
- Click the "Delete selected" button at the bottom of the page.
- Check that the wording of the confirmation message is correct.
- After you confirm, the items should be deleted.
- Repeat these tests under Tools -> HTML customizations to confirm that
redirects work correctly. After deleting an HTML customization you
should be redirected back to the list of HTML customizations.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 batch patron modifications based on borrowernumber. The
user can choose to upload a file of borrowernumbers or submit a list of
borrowernumbers in a textarea, just like they can with card numbers.
To test, apply the patch and prepare files containing borrowernumbers
and card numbers. Patron lists should be enabled, and you should have at
least one patron list with patrons on it.
- Go to Tools -> Batch patron modification.
- You should see three tabs: "By card number," "By borrowernumber," and
"By patron list."
- Test each option for batch patron modifications:
- By card number file
- By card number list
- By borrowernumber file
- By borrowernumber list
- By patron list
- In each case the correct batch should be submitted, and modifications
should finish correctly..
- There should be an "order of operations" for card numbers and
borrowernumbers:
- If a file is uploaded AND a list of numbers is entered, the list of
numbers should be used.
- Batches should only get submitted from the active tab.
- If you upload a file or enter card numbers in one tab and then
switch to another tab and submit numbers from there, the original
tab's batches should be ignored.
Signed-off-by: kelly mcelligott <kelly@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It has never been used and should be removed
Test plan:
Search for "find_value" in the file and confirm that there is no more
occurrence
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Raised by the QA script, a couple issues carried by pre-17600 patches.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
One big patch for one big move.
The "News" feature (opac_news) has been hijacked to handle some system
preferences (bug 26050). The goal was to take profit of the UI (editor)
and the ability to translate the value.
Disclaimer: This patch is NOT offering the best implementation but, as
we still don't have bug 24975, it cannot be done now. And no, we don't
want to wait for it to move forward here. This patch is going into the
right direction anyway.
This enhancement is going to rename the "News" with a more genertic
"Additional contents". We have two different "categories" of content:
"news" and "html customizations".
What does it bring?
- A split on the UI for disambigate the two types of content (news and
syspref/html customizations)
- A simplification of the edit form: all languages will be translatable
on the same view (like the "notice templates")
- Ground will be prepared for different types of content (if needed later)
- Staff news can be translated
How was the "News" area working before this patch?
The opac_news DB table contained a (very inconsistent) 'lang' column.
The different values were:
- '' => news to display at the OPAC and staff interfaces
- 'koha' => news for staff only
- 'slip' => news for slip notices
- $lang => news for OPAC only, translated in $lang ('en', 'es-ES', etc.)
- "$location_$lang" => A syspref moved to this "news" area. The syspref
is $location, and is translated in $lang. Eg. OpacLoginInstructions_en,
OpacLoginInstructions_fr-FR, opacheader_es-ES
This patch is improving the DB structure with the following changes:
- renaming 'opac_news' with 'additional_contents'
- new 'category' column
=> 'news' or 'html_customizations'
- new 'location' column
=> For 'news': 'staff_and_opac', 'staff_only', 'slip'
=> For 'html_customizations': the old syspref name (eg. 'OpacLoginInstructions').
- new 'code' column (see later for more info)
- the 'lang' column will only contain the language code ('en', 'es-ES',
etc.). BUT a 'default' entry will ALWAYS exist for fallback behaviour.
We are getting closer to the 'notice template' table structure because
we want to match its UI. The 'code' column will bring us the ability to
group the different 'additional_contents' rows. The code for a given
news will be the same, but the (lang, title, content) will differ.
Examples:
News 1 will have, for each of the translated versions
(category, code, location, branchcode)
('news', 'News1', $location, $branchcode||undef)
And the 3 following columns will differ:
(title, content, lang)
('title for news 1', 'content for news 1', 'default')
('titulo para 1', 'contenido para 1', 'es-ES')
Note that the "category" is not strictely necessary, but it seems better
to have the ability to split the different content by category/type
easily.
Additional changes:
- Syspref 'NewsToolEditor' is renamed 'AdditionalContentsEditor'
- Koha::NewItem => Koha::AdditionalContent
- Koha::News => Koha::AdditionalContents
- Script and template renamed from koha-news to additional-contents
- Foreign keys have been renamed
- Subpermission edit_news has been renamed edit_additional_contents
- The UI can now be accessed via a "News" or "HTML customizations" link
from the tools module. The related contents will then be displayed (both
categories are now split)
Changes not done here:
- Primary key 'idnew' could be renamed 'id'
Limitations of the upgrade:
News cannot be grouped by a unique code for existing translations.
=> A given news will be now displayed several times on the translated
interface
Any ideas to improve the upgrade behaviour?
We will have to add a warning in the release notes to tell libraries to
review their news.
Test plan:
0. Don't apply the patches
1. Translate the interfaces in some languages
. Create some news for staff and OPAC
. Create some content for different entry of HTML customizations
Note that you are forced to define a 'default'.
Also note that you are only forced to fill the title (not the content).
This is certainly problematic (see FIXME in the code) as sometime only
the content is displayed.
. Play with the interface (edit, delete, filter)
. Go to the different places the news are displayed, and confirm they
are displayed correctly (staff home, opac home, opac rss)
. Create 1+ news for 'slip', check an item out and 'print slip' (from
the circulation page). You must see the news.
. Go to the different places you are expecting the HTML customizations
to be present and confirm that you see them.
. Switch the lang of the interface and confirm that you now see the
content in the translated version
. Generate the templates in another language, don't translate the
content
. Use this language for the interface and confirm that the 'default'
version is displauyed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 12759 added the ability to pass list contents to batch record
modification/deletion tools.
Patch Bug 22417 [Restore the 'add to list' feature] removed the fetch
of lists in batch_record_modification.pl I don't understand why.
It still exists in batch_delete_records.pl.
Note that this is needed when first form is displayed.
Test plan :
1) Create a private and a public list of records
2) Open Tools > Batch record modification
3) Check you can use the lists
4) Open Tools > Batch record deletion
5) Check you can use the lists
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1. have multiple news
2. check several of them and and click 'Delete selected'
3. see ugly error
4. apply patch
5. try again
6. no error
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>
Caused by bug 28158, the batch item modifications tool does not longer
display the table with the items that have been modified on the result screen.
There is no more fork and so no more completedJobID var.
We must process the items THEN build the items' info.
Test plan:
Use the batch item modification tools to modify some items.
Confirm that with this patch the table with the modified items is
displayed on the last screen.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_tools_batchMod_2epl::haspermission called at /kohadevbox/koha/tools/batchMod.pl line 89
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
On bug 17591 we discovered that there was something weird going on with
the way we export and use subroutines/modules.
This patch tries to standardize our EXPORT to use EXPORT_OK only.
That way we will need to explicitely define the subroutine we want to
use from a module.
This patch is a squashed version of:
Bug 17600: After export.pl
Bug 17600: After perlimport
Bug 17600: Manual changes
Bug 17600: Other manual changes after second perlimports run
Bug 17600: Fix tests
And a lot of other manual changes.
export.pl is a dirty script that can be found on bug 17600.
"perlimport" is:
git clone https://github.com/oalders/App-perlimports.git
cd App-perlimports/
cpanm --installdeps .
export PERL5LIB="$PERL5LIB:/kohadevbox/koha/App-perlimports/lib"
find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \;
The ideas of this patch are to:
* use EXPORT_OK instead of EXPORT
* perltidy the EXPORT_OK list
* remove '&' before the subroutine names
* remove some uneeded use statements
* explicitely import the subroutines we need within the controllers or
modules
Note that the private subroutines (starting with _) should not be
exported (and not used from outside of the module except from tests).
EXPORT vs EXPORT_OK (from
https://www.thegeekstuff.com/2010/06/perl-exporter-examples/)
"""
Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members.
@EXPORT and @EXPORT_OK are the two main variables used during export operation.
@EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace.
@EXPORT_OK does export of symbols on demand basis.
"""
If this patch caused a conflict with a patch you wrote prior to its
push:
* Make sure you are not reintroducing a "use" statement that has been
removed
* "$subroutine" is not exported by the C4::$MODULE module
means that you need to add the subroutine to the @EXPORT_OK list
* Bareword "$subroutine" not allowed while "strict subs"
means that you didn't imported the subroutine from the module:
- use $MODULE qw( $subroutine list );
You can also use the fully qualified namespace: C4::$MODULE::$subroutine
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch modifies the script and template so that if the user submits
a search by category, that category will be preselected on the search
results page.
Also added is an empty "Choose" option so that a search category isn't
selected by default.
To test, apply the patch and view the uploads page.
- In the category search form, a "Choose" option should be selected.
Submitting the form without selecting a category should not work.
- Search using one of your existing categories. On the search results
page the category you selected should remain selected.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Some libraries would like to be able to preserve particular fields for
existing patrons when overwriting them via the patron import tool.
Effectively, this means the specified columns of the CSV are used for
new patrons, but ignored for existing patrons.
Test Plan:
1) Create a patron CSV with one new patron, make the surname and
firstname "Test1". Add a cardnumber so we can upload it again later.
2) Import the file
3) Change the firstname and surname in the CSV to "Test2"
4) Return to the patron import tool, choose to match on cardnumber,
overwrite existing patrons, and preserve exiting firstnames
5) Import the file with these settings
6) Referesh the patron details for this patron, the patron's surname
should still be "Test" while the firstname should now be "Test2"
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 22544: fix count call - to squash
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We should remove the debug statements or use Koha::Logger when we want
to keep it.
Test plan:
Confirm that occurrences of remaining occurrences of DEBUG need to be
kept (historical scripts for instance)
Confirm that the occurrences removed by this patch can be removed
Confirm that the occurrences replaced by Koha::Logger are correct
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks good to me, noting a few minor points on BZ.
JD amended patch: replace "warn #Finished" with "#warn Finished", and
put the statement on a single line
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We are using Koha::Logger when it makes sense to keep the info,
otherwise we simply remove it
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 28572: Replace missing occurrence in misc/admin/koha-preferences
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There is a "debug" parameter we are passing from the controller scripts
to C4::Auth::get_template_and_user, but it's not actually used!
Test plan:
Confirm the assumption
Review the changes from this patch
Generated with:
perl -p -i -e 's#\s*debug\s*=\>\s*(0|1),?\s*##gms' **/*.pl
git checkout misc/devel/update_dbix_class_files.pl # Wrong catch
+ Manual fix in acqui/neworderempty.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The way we handle notice templates is confusing (see bug 27660, bug 26787, bug 28487).
This patch remove C4::Letters::getletter and use either Koha::Notice::Templates->find
or the newly created methods ->find_effective_template that will do
all necessary to return the correct template.
Test plan:
- Create and modify notice templates
- Make sure you have TranslateNotices turned on and that some notices
templates have a translated version
- Use holds_reminder.pl and overdue_notices.pl cronjobs and confirm that
the generated notices are the expected ones
- Test also pos/printreceipt.pl
- And finally test some other notices (CHECKIN, RENEWAL for instance)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Amended by removing comment for $params={%$params}
JD amended patch:
* Add missing POD
* Fix spelling (dont ==> don't)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We used to display a list of items that cannot be deleted (checked out
or on hold) on the Batch item deletion tool.
With bug 8132 we improve the error handling, but the info is spread in
the table.
This patch adds, at the top of the page, the list of items (barcode)
that cannot be removed.
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: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
== Test plan ==
1 - In the default framework make sure the 952$1 is visible in opac & catalog & editor
2 - Set WhenLostChargeReplacementFee to charge
3 - Set MarkLostitemsAsReturned to return from batch modification
4 - Find/edit an item with a replacement cost
5 - Check out the item to a patron
6 - Batch modify the item
7 - Set the lost status
8 - Item is not returned or charged
9 - with the patch, it is
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Like it was done in Bug 18806.
Test plan :
Use stage-marc-import.pl with and without patch, with a matcher to find
duplicates
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
Inventory explodes with the following stacktrace if timeformat is set to 12h
Invalid value passed, datelastseen=2021-04-09 12:00 AM expected type is date at /usr/share/perl5/Exception/Class/Base.pm line 88
Exception::Class::Base::throw('Koha::Exceptions::Object::BadValue', 'type', 'date', 'value', '2021-04-09 12:00 AM', 'property', 'datelastseen') called at /kohadevbox/koha/Koha/Object.pm line 196
Koha::Object::catch {...} ('DBIx::Class::Exception=HASH(0x557a052baeb0)') called at /usr/share/perl5/Try/Tiny.pm line 124
Try::Tiny::try('CODE(0x557a051931d8)', 'Try::Tiny::Catch=REF(0x557a052bfc30)') called at /kohadevbox/koha/Koha/Object.pm line 206
Koha::Object::store('Koha::Item=HASH(0x557a0521a048)') called at /kohadevbox/koha/Koha/Item.pm line 202
Koha::Item::store('Koha::Item=HASH(0x557a0521a048)') called at /kohadevbox/koha/tools/inventory.pl line 220
Test plan:
Set TimeFormat to 12h
Use the inventory
=> Confirm that it's working with this patch applied
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
This QA follow-up allows access to the old_issues table when editing the
notice in Tools.
Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
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>
The change to allow multiple guarantors was meant to maintain the
ability to import patrons with a Koha patron guarantor, but is not
working as intended.
A) Adding the guarantor simply doesn't work
B) We have two columns named 'relationship', one for the borrowers
table, and one for the guarantor relationships table. This clearly
doesn't work and will cause confusion. The one for the guarantor
relationships table should be renamed.
C) guarantor_firstname and guarantor_surname in the CSV file do nothing
and should be removed.
This patch also fixes a minor issue that causes warnings like:
CGI::param called in list context from
/kohadevbox/koha/tools/import_borrowers.pl line 124
Test Plan:
1) Create a CSV with contents like:
cardnumber,surname,firstname,branchcode,categorycode,guarantor_relationship,guarantor_id
bloop,gloop,froop,MPL,J,father,48
brim,flim,zim,MPL,J,father,48
2) Attempt to upload this file, ensure you have a borrowernumber 48 that
can have guarantors
3) Note the accounts are not linked
4) Apply this patch
5) Restart all the things!
6) Upload the file again
7) The patrons should now be linked!
8) Download the starter CSV file
9) Note the second relationship column is now guarantor_relationship
10) Note the columns guarantor_firstname and guarantor_surname are no longer present
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the ability to filter inventory by item type. Multiple
item types can be selected at once.
To test:
1) Apply patch and restart services.
2) Set up (at least) one item of a specific item type.
3) Go to Tools -> Inventory.
4) Scroll down to find the item types filter. Confirm the 'select all'
and 'clear all' buttons work as expected.
5) Select a few item types, but DO NOT include the item type that you
just set for your item. Confirm that your item does not show in the
results.
6) Go back to the Inventory tool. This time submit a search that DOES
include the item type you just set for your item. Confirm that your item
does show in the results.
7) Confirm tests pass:
prove t/db_dependent/Items/GetItemsForInventory.t
Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch is the result of making the same changes we did on the
t/db_dependent/AuthorisedValues.t file (replacing the calls to
Koha::AuthorisedValues->search with the tricky branchcode param, and
call ->search_with_library_limits, with the library_id as a third
parameter.
What I did was:
$ git grep 'Koha::AuthorisedValues\->search'
and then revisited each of the grep results to check if they added the
'branchcode' parameter to the filters.
This patch changes the calls to ->search, for
->search_with_library_limits in all the places that require it in the
current codebase [1].
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Charges/Sales.t \
t/db_dependent/Ill*
3. Verify the batchmod.pl script is working and filtering the authorised
values keeps working
[1] Some places like the Koha/Template/Plugin/AuthorisedValues.pm plugin
don't seem to be tested, at first glance.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In the code we prepare items for display if less than or equal to the pref, but we don't allow
the edit if greater than or equal to the pref. The second case should be only 'greater than'
To test:
1- Set MaxItemsToProcessForBatchMod to 1000
2- Go to Reports
3- Make a report for itemnumbers that will give you at least 1000 items (ex. SELECT itemnumber FROM items)
4- Save and run the report
5- In "Rows per page", choose 1000
6- Click on "Batch operations with 1000 visible records" > Batch item modification
7- Notice that the item modification form isn't there and that the message says "Too many items (1000): You are not allowed to edit more than 1000 items in a batch."
8- Apply patch
9- Restart all the things
10- Run the report again and display 1000 rows
11- Click on "Batch operations with 1000 visible records" > Batch item modification
12 - Sucess!
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch replace the QOTD editor with our new way to CRUD the
adminitration page (like libraries and STMP servers)
Test plan:
Play with the QOTD by adding, removing, updating quotes
Try to find bugs :)
Bug 27251: Fix capitalization
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>
Test Plan:
1. Go to Administration
2. Go to System Preferences
3. Find 'delimiter' (note the name)
4. Apply patch
5. Repeat step 1 and 2
6. Find 'CSVDelimiter' (note the name)
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It was added by bug 13552 but removed by 19793.
Test plan:
Update patron in a batch and confirm that you can modify the restriction
expiration and comment.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We need to close STDERR when forking stage-marc-import.pl,
or else the CGI session with Apache httpd does not properly
finish. This leads to unexpected behaviour across different httpd
versions, operating systems, etc.
This patch closes the STDERR file handle when forking a child
process to do MARC imports, and it re-opens STDERR to a log file
in the logdir directory to catch any import errors.
Test plan:
1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl
3. Upload a MARC file with a large number of records (e.g. 30,000 records)
4. Open F12 dev tools
5. Click on "Network" tab
6. Clear all existing network logs
7. Click "Stage for import"
8. After ~30 seconds, the request to stage-marc-import.pl should return a 200 code
9. Immediately, calls to background-job-progress.pl should start, and the "Job progress"
bar should update at a maximum rate of every .5 seconds
(or more realistically 1-2 seconds)
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 the logic and the needed UI elements to be able to pre-load an import profile. It also displays which profile was used to stage an import in staged import manager.
To test:
1. Apply all patches
2. Updatedatabase
3. Go to Stage MARC records for Import tool in admin, and upload a file with MARC records.
CHECK => after uploading, there is a fieldset with the legend “Profile settings”
=> inside the fieldset there is a select labeled “Pre fill values with profile”. The only value it has is “Do not use profile”.
4. Change some settings, and set “profile 1” as profile name and click on “Add profile”
SUCCESS => The select now has the new profile selected
5. Change profile select to “Do not use profile”
SUCCESS => Default values are now displayed in the form
6. Reload the page and upload the file again
SUCCESS => the select still has the profile recently added
7. Select the profile, change some parameter in the form and set the profile name to “profile 2”, and click add profile
SUCCESS => there are two profiles now, and if you toggle between them, the parameter changes
8. Select profile 1, change one parameter and click on update profile
SUCCESS => if you toggle that profile with the other, the new parameter of the value is shown when you select profile 1
9. Select profile 2, change some parameter and click Add profile (leaving the name as profile 2)
SUCCESS => the page complains there is another profile with the same name, and asks if you want to replace it.
10. Click on accept
SUCCESS => profile 2 now has the new value in the parameter
11. Select profile 2 and change the name to profile 1
SUCCESS => the page complains there is another profile with that name, and asks if you want to replace it
12. Click on accept
SUCCESS => in profile select there is only one profile called profile 1 that has the values of profile 2
13. Select profile 1 and click remove profile
SUCCESS => there is no profile in profile select.
14. Create a profile and click on “Stage for import”
15. Go to Staged MARC management page
SUCCESS => Improt should have the name of the profile in profile column, and when you click on the file name, there should be the name of the profile in the details.
16. prove t/db_dependent/ImportBatch.t t/db_dependent/api/v1/import_batch_profiles.t
17. Sign off
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Here we're just adding ILL notices to the existing "letters"
infrastructure so notices can be displayed and edited
Sponsored-by: PTFS Europe
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@it-tallaght.ie>
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>
Test plan :
- Check you have in default framework an item subfield mapped with items.notforloan and with an authorized value catergory,
for example 'NOTFORLOAN'
- Create a new value in this category, for example '9'
- Create a biblio with default framework
- Create an item with barcode='000AAA1', callnumber='A-1' and notforloan=0
- Create an item with barcode='000AAA2', callnumber='A-2' and notforloan=9
- Create a file 'barecodes.txt' containing 2 lines '000AAA1' and '000AAA2'
- Go to inventory tool : /cgi-bin/koha/tools/inventory.pl
- Choose file in 'Barcode file'
- Enter item callnumber between 'A-0' and 'A-9'
- Check 'Compare barcodes list to results'
- Submit=> without patch, you get no warnings
- Redo the same inventory but with checking items.notforloan 'For loan'
(using the browser back page is ok)
- submit => still no warning, Bug 000AAA2 must be listed it's not 'For loan'
- Apply patch, repeat, with tems.notforloan 'For loan' checked you get the
right warning
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>
This patch simply checks if conditionals are defined before comparing
We don't need to check actions because you cannot save an action without an action :-)
To test:
1 - Define several actions for a MARC modification template
2 - Ensure you have actions with no conditionals
3 - Tail the intranet logs
4 - Browse to Tools->MARC modification templates
5 - Click 'Edit actions' for the template you setup above
6 - Note warns like:
[2020/10/22 12:30:18] [WARN] Use of uninitialized value in string eq at /kohadevbox/koha/tools/marc_modification_templates.pl line 127.
7 - Apply patch
8 - Restart all the things
9 - Edit actions again and note no more warns
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In this patch we remove the limitation of 1 cover image per item
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patchset adds the ability to attach cover images at item level.
This commit message will explain the different patches that are
following.
The main idea is to have cover images for a given item. This is useful
for a bibliographic record linked with a subscription. Each item could
have the cover image for the serial numbers.
In this first patch there is a limitation to allow only 1 cover per
item, but a later patch will remove it. That way we will take advantage
of the recent work done to display nicely cover images (bug 25031), and
reuse it in this development (staff interface only).
In order to use a flexible and robust code, the legacy C4 code
(C4::Images) has been moved to Koha::CoverImages. Also the DB table
biblioimages has been renamed cover_images.
Test plan (for the whole patch set):
0. Turn off AllowMultipleCovers
1. Create a new bibliographic record and items
2. Attach a cover image to the bibliographic record
3. In the item list of the bibliographic detail page, you will notice a
new "Upload image" action. Select it
4. Select an image
=> Notice the new column in the item table
5. Upload another image
=> You cannot upload 2 images, you are going to replace the existing one
6. Turn on AllowMultipleCovers
7. Attach another image to the image
=> Notice the 2 images are displayed nicely, with navigation controls
8. Confirm you can view an image if you click on it and you can delete it
9. Test the OPAC view now
=> Cover image for items are displayed in the table, there is no
navigation controls here however.
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The warnings are
Use of uninitialized value $val in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 138.
Problem = a value of has been passed to param without key at /kohadevbox/koha/C4/Templates.pm line 138.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We don't need to pass it to the job, they each know which record type
they are dealing with
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This feature has been added recently by bug 18127.
It highlights the need of a post processing hook.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 22417: Add a note about the existence of the DB row
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 22417: (follow-up) Fix the batch authority tool
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)
Test plan:
1) Apply the patch.
2) Check that you can still upload a barcode file.
3) Check that you can scan/enter barcodes in the new textarea.
4) Check that if you both upload a barcode file and enter barcodes,
you will be prompted to choose only one method.
5) Check that you can then proceed to the next step by either resetting the
upload file input or emptying the textarea.
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 add an 'udated_on' column to the letter table and displays
the information in 'slips and notices'.
To test:
- Apply patch
- Run updatedatabase
Note: the existing letters will all be set to the
currnet date).
- Go to Tools > Notices and slips
- Verify there is a new column "Last updated" in the table
Note: The table will always display the newest change date
of the different message transport types.
- Edit any notice
- Verify the "Last updated" is shown for any transport type
with an existing notice definition
- Edit and add a notice
- Verify the dates are correctly stored
- Test the column configuration for the new column works
correctly
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>
In tools home there is a link to the table showing tool plugins.
Would be great to be able to run a tool plugin directly from tools home.
Also adds the behavior than if there is no tool plugin, "Tool plugins"
section is not displayed in tools home.
No need of a link that goes to an empty table ;)
Test plan :
1) Enable plugins, dont install any
2) Go to "Tools" module : /cgi-bin/koha/tools/tools-home.pl
3) Check you dont see "Tool plugins"
4) Install a tool plugin like Carrousel https://inlibro.com/instructions-carrousel/
5) Refresh /cgi-bin/koha/tools/tools-home.pl
6) Check you see "Tool plugins" and a link to Carrousel
7) Click on link to Carrousel => You see plugin run
8) Disable Carrousel plugin
9) Refresh /cgi-bin/koha/tools/tools-home.pl
10) Check you dont see "Tool plugins"
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>
This patch modifies the news interface so that the user is offered a
choice of editing news items using the default editor as defined by the
NewsToolEditor system preference or the non-default one.
To test, apply the patch and go to Tools -> News.
- In the list of news items you should see an "Edit" split button in
each row.
- Clicking the "Edit" part of the button should open the edit view with
the correct editor as defined by the NewsToolEditor preference.
- Clicking the menu arrow on the button should offer the other editing
method:
- If NewsToolEditor is set to "WYSIWYG," the menu should offer "text
editor."
- If NewsToolEditor is set to "text editor," the menu should offer
"WYSIWYG editor."
- Test the button with the NewsToolEditor preference set to both options
and confirm that the button and menu work correctly.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It looks like the field was intentionally removed from the list
of batch editable fields in the past. This makes sense as we
used to have a unique index on it at some point - but we do have
no more.
This removes the exception so that the invendory number behaves
like the other fields on the batch item edit form.
To test:
- Create some items with and without stocknumber
- Go to tools > batch item modification
- Enter the barcodes of your selected items in the list or
upload a file with them
- Verify that the stocknumber/inventory number is not showing
in the item edit form below
- Apply patch
- Reload the page - inventory number is there now
- Batch edit the inventory number and verify it works as expected
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
When batch editing, 2 reindex calls are sent to ES/Zebra.
We can easily avoid that reusing the skip_modzebra_update (renamed skip_record_index)
Additionally we should only send one request for biblio, and we should
only do it if we succeed
As the whole batch mod is in a transaction it is possible to fail in which case
Zebra queue is reset, but ES indexes have already been set
In addition to the skip param this patchset moves Zebra and Elasticsearch calls to
Indexer modules and introduces a generic Koha::SearchEngine::Indexer so that we don't
need to check the engine when calling for index
The new index_records routine takes an array so that we can reduce the calls to
the ES server.
The index_records routine for Zebra loops over ModZebra to avoid affecting current behaviour
Test plan:
General tests, under both search engines:
1 - Add a biblio and confirm it is searchable
2 - Edit the biblio and confirm changes are searchable
3 - Add an item, confirm it is searchable
4 - Delete an item, confirm it is not searchable
5 - Delete a biblio, confirm it is not searchable
6 - Add an authority and confirm it is searchable
7 - Delete an authority and confirm it is not searchable
Batch mod tests, under both search engines
1 - Have a bib with several items, none marked 'not for loan'
2 - Do a staff search that returns this biblio
3 - Items show as available
4 - Click on title to go to details page
5 - Edit->Item in a batch
6 - Set the not for loan status for all items
7 - Repeat your search
8 - Items show as not for loan
9 - Test batch deleting items
a - Test with a list of items, not deleting bibs
b - Test with a list of items, deleting bibs if no items remain where all items are only item on a biblio:
SELECT MAX(barcode) FROM items GROUP BY biblionumber HAVING COUNT(barcode) IN (1)
c - Test with a list of items, deleting bibs if no items remain where some items are the only item on a biblio:
SELECT MAX(barcode) FROM items GROUP BY biblionumber HAVING COUNT(barcode) IN (1,2)
10 - Confirm records are update/deleted as appropriate
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It defaults to 0 in get_template_and_user
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>
For sites with very large amounts of due dates to extend ( tens of thousands ), it can take a very long time of the results to load ( if at all ). It would be good to have a way to bypass the confirmation screen, instead directly updating the due dates before displaying the results.
Test Plan:
1) Apply this patch
2) Browse to tools/batch_extend_due_dates.pl
3) Note the new "Preview results" checkbox
4) Submit form with the checkbox unchecked, due dates should be updated
without previewing the checkouts
5) Submit form with the checkbox checked, tool should function as
it did previously
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25101: (QA follow-up) Add hint to new option
Adds a hint about the large numbers behind the new
checkbox option.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25101: (QA follow-up) Fix hint for new option
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Perform some CRUD operations on the news page in staff.
Verify that news on opac and staff respect publicationdate.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
em is better for accessibility
We should set the field to 0 when it was previously unset
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: remove unecessary indentation changes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the ability to exclude patrons (by category) from local
holds, and items, by editing the item itself or by batch item
modification tool.
To test:
1. apply patches
2. updatedatabase
3. Enable LocalHoldsPriority preference, and leave
LocalHoldsPriorityPatronControl in pickup library, and
LocalHoldsPriorityItemControl in holding library.
4. Search for a biblio with one item.
5. Place a hold with a patron (patron1) and set pickup location to a different
library of the item's home library
6. Place another hold with another patron (patron2) and set pickup location to be
the same as the item's home library
7. ./misc/cronjobs/holds/build_holds_queue.pl
8. Go to circulation -> holds queue
9. Search by the item's home library
CHECK => only the hold for patron2 (with the pickup location the same as the
item's home library) appears in the table
10. Go back to the biblio details page and click on "Items" tab
CHECK => There is a new section in the item's details between "Statuses"
and "History" called "Priority"
11. Set exclude to "Yes" and update
12. repeat steps 7 to 9
SUCCESS => only the hold for patron1 now appears, even the other hold had local
hold priority
13. Repeat step 10 and 11 but this time set exclude to "No"
14. repeat steps 7 to 9
CHECK => the hold for patron2 is back
15. Edit patron2's category and set exclude from local holds priority to
"Yes"
16. Repeat steps 7 to 9
SUCCESS => the hold for patron1 is back
17. Go to tools -> Batch item modification and in barcode list place
several (existing) barcodes and press continue
CHECK => There is a new section in the bottom called "Priority"
18. Set exclude to "Yes" and save
SUCCESS => all items in the list now have exclude setted to "Yes"
19. Try to checkout the first item to a patron3
SUCCESS => Alert message appears saying that patron1 has a hold on that
item
20. Click on Yes and then checkin that item
SUCCESS => There is a modal window saying that a hold was found for
patron1
21. prove t/db_dependent/HoldsQueue.t t/db_dependent/Holds/LocalHoldsPriority.t
22. Sign off
Sponsored-by: Cooperative Information Network (CIN)
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
0 - Perform a search in the staff client
1 - Click a title to go to the details page for a record
2 - Click the 'Edit' button and select 'Edit items in a batch'
3 - Note the searchid is in the url
4 - Make a change and hit 'Save'
5 - Note the 'Return the the record' link at the top, and the button on the bottom include searchid in URL
6 - Click one and note the brwoser is stil there
7 - Click 'Edit' and select 'Delete items in a batch'
8 - Delete one item
9 - Click return to record
10 - Browser is there
11 - Click 'Delete items in a batch again
12 - Select all and check 'Delete records if no items remain'
13 - Delete them
14 - Note you have a link to 'Go back to the results'
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The restores the wildcards that were used in the past
To test:
0 - Ensure cataloguing logs and issues logs are enabled
1 - Edit an item
2 - Circulate that same item
3 - Browse to tools-> log viewer
4 - Put the itemnumber in the 'info' box
5 - You see only the circulation
6 - Put the itemnumber in the object box
7 - You see only the cataloging modification
8 - Apply patch
9 - Put itemnumber in info box
10 - you see both actions
11 - Put the itemnumber in the object box
12 - You see only the catalogiong modification
Signed-off-by: Jason Robb <jrobb@sekls.org>
Bug 25893: Don't wildcard object
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25893: (follow-up) Undo unrelated changes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch renames the introduced attribute for later usage on the API,
and changes the logic to use it the other way around.
It also adds a KEY for the flag, as it will be used in WHERE statements.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1) Update database
2) Update schema
3) In staff side, go to Tools -> CSV profiles
4) Make a CSV profile with profile type = MARC and usage = Export
records
5) Leave 'Show option in OPAC' unchecked and save
6) Go to OPAC and add an item to your cart
7) Click Cart, click Download, confirm that your newly created CSV
profile does not show as an option
8) Go back and edit CSV profile on staff side
9) Check the 'Show option in OPAC' checkbox and save
10) Go back to download cart in OPAC
11) Confirm the CSV profile now shows in the dropdown
Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The last usage of this module was removed in the commit
"Bug 25723: Update cache flushing calls" but the import was
not removed along with it.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch updates the previous single_holidays and exeption_holidays
cache flushing calls to match the new cache key structure of the updated
routines.
Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch removes some new error cases introduced during rebase
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a .perlcriticrc (copied from qa-test-tools) and fixes
almost all perlcrictic violations according to this .perlcriticrc
The remaining violations are silenced out by appending a '## no critic'
to the offending lines. They can still be seen by using the --force
option of perlcritic
This patch also modify t/00-testcritic.t to check all Perl files using
the new .perlcriticrc.
I'm not sure if this test script is still useful as it is now equivalent
to `perlcritic --quiet .` and it looks like it is much slower
(approximatively 5 times slower on my machine)
Test plan:
1. Run `perlcritic --quiet .` from the root directory. It should output
nothing
2. Run `perlcritic --quiet --force .`. It should output 7 errors (6
StringyEval, 1 BarewordFileHandles)
3. Run `TEST_QA=1 prove t/00-testcritic.t`
4. Read the patch. Check that all changes make sense and do not
introduce undesired behaviour
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch 'ours' several variables to fix Plack scope errors
in exceptionHolidays.pl.
This also adds '@holidays_list' as parameter to 'edit_holidays'.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds functionality to calendar tool to
make edits or deletes to all branches at once.
To test:
-Apply patch
-Add holiday for a library and copy it to all or some
libraries
-Edit previosly made holiday (edit, delete etc.) and
check out "Copy changes to all libraries." checkbox
=> Changes are made to all libraries sharing changed
holiday
Sponsored by: Koha-Suomi Oy
Signed-off-by: Christofer <christofer.zorn@ajaxlibrary.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch moves the OPAC problem report management page from the
Administration section to the Tools section.
I think this makes sense because management of reports is an ongoing
task, not a configuration.
To test, apply the patch and enable the OPACReportProblem system
preference.
- Go to Administration. There should be no link to OPAC problem
reports.
- Open an administration page which shows the Administration menu in
the left-hand sidebar, e.g. Libraries. There should be no link to
OPAC problem reports in the menu.
- Go to Tools. There should be a link to OPAC problem reports in the
"Addional tools" section.
- Open the OPAC problem reports page and confirm that it works
correctly.
- The breadcrumbs menu should show "Tools > OPAC problem reports."
- Confirm that the link in the sidebar menu works correctly.
- If necessary, submit an OPAC problem report via the OPAC so that
there is a pending report. Go to the staff interface home page and
check that the "OPAC problem reports pending" link works correctly.
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>
Follow-up work
commit bbb504c86f
Bug 23463: Replace ModItem with Koha::Item->store
Test plan :
- Create a biblio with default framework
- Create an item with barcode='000AAA1', callnumber='ZZZAAA1'
- Create an item with barcode='000AAA2', callnumber='ZZZAAA2'
- Create a file 'barecodes.txt' containing 2 lines '000AAA1' and '000AAA2'
- Go to inventory tool : /cgi-bin/koha/tools/inventory.pl
- Choose file in 'Barcode file'
- Enter item callnumber between 'ZZZ' and 'ZZZa'
- Check 'Compare barcodes list to results'
- Submit
=> without patch, you get an error trace
- Apply patch, it works
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended commit title.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Well, this is actually the real root of the error!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The last_item_for_hold case cannot be guessed (easily), and so we are going to
delete the items in a transaction. If something wrong happened we
rollback and display a list of items that caused the rollback.
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When the list of items is displayed we already know if there will be a
problem during the deletion. So let's disable the checkbox to tell the
user in advance that items cannot be deleted.
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1 - Modify a patron
2 - Circulate some items to the patron
3 - Click 'Modification log'
4 - Verify you see your actions
5 - Under 'Output' select 'To a file'
6 - Save the output to a file
7 - View the file
8 - Not you have references ot objects in stead of patron/item data
9 - Apply patch
10 - Repeat
11 - Note viewing on screen has not changed
12 - Note exporting to file inlcudes borrower/item numbers and not references
13 - Sign off
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The label creator won't be able to add a batch for items, if they are
not imported into the database (missing itemnumber). This patch hides
the link, when the status is not imported, to avoid the error situation.
To test:
- Export a record with items from your Koha installation
- Delete items and record from Koha
- Stage the record with the items - the "Create labels" link should be showing
- Try to create the labels - note error
- Apply patch
- Retry - the link should no longer show
- Import the records - the link should show now
- Create labels again - a new batch should have been created
- Verify the link on the batch # leads to the batch in the labels module
Bonus: Moves the message from the .pl file to the template to make
it translatable.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When selecting a new hard due date, we should keep the time part of the
original checkouts.
Test plan:
1 - Checkout an item specifying a date due
2 - Checkout an item without specifying a date due
3 - Use Tools->Batch extend due date
4 - Select a hard due date
5 - On the confirmation screen you should see that the time part has
been kept
6 - Confirm
7 - Make sure the correct values hava been inserted in DB
8 - Try now using the other option, give a number of days
9 - Repeat 4-7
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
In addition to checking the patron image upload permission, this
adds a check for the patronimages system preference to the tools
home page and sidebar.
To test:
- Check that the patron image upload tool only displays when
- system preference patronimages is set to 'Allow'
and user is either
- superlibrarian or
- has bath_upload_patron_images permission
- Save URL of patron image uploader page
- Turn off patronimages
- Verify you get redirected to the home page of Koha when trying
to access the page
Note: this redirect is already used by the stock rotation feature.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1 - Have some patrons in your system
2 - Export some of their info via reports
SELECT cardnumber, userid, surname, firstname, password, branchcode, categorycode
3 - Edit the file from above, changing all the password lines
4 - Import the file with overwrite
5 - Confirm passwords have not changed (run the report again and confirm the hashes are the same)
6 - Apply patch
7 - Restart all the things
8 - Check the new box on import screen to overwrite passwrods
9 - Import file again
10 - Confirm passwords have changed
11 - Signin using new password to verify the hash is the password as supplied
12 - Repeat via commandline import supplying --overwrite_passwords option
13 - Verify works as expected
14 - Prove -v t/db_dependent/Koha/Patrons/Import.t
Sponsored-by: ByWater Solutions
Signed-off-by: Ron Marion <ron.marion@goddard.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard 2018-03-16 10:47:47 UTC :
<<
I don't think the system preference adds any security. There are already multiple permissions required for working with plugins:
- Configure plugins
- Manage plugins ( install / uninstall )
- Use report plugins
- Use tool plugins
And even with those permissions your server must be configured to allow the use of plugins.
>>
Test plan :
1) Install kitchen sink plugin https://github.com/bywatersolutions/koha-plugin-kitchen-sink
2) Run misc/devel/install_plugins.pl
3) Set config enable_plugins=1
4) Check all parts of the plugin are working
5) Set config enable_plugins=0
6) Check all parts of the plugin are disabled
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
There is a security hole in 2 scripts that are used by the UI to edit
holidays.
To test:
1) Go to Tools -> Calendar, for Centerville
Check no holiday for 30/4/2020
2) To add a new holiday without login execute
a curl command with necessary parameters
3) Reload page from 1), verify the new holiday
edit and delete the holiday
4) Apply the patch
5) Do 2) again, this time you get a lengthy output,
with the magic words:
<title>Koha ›
Log in to Koha
</title>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Dealt with that previously in the module during the rebase.
It conflicted with bug 23281.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We do no longer need this package, we can use
Koha::Patron::Attribute::Types directly instead.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We can then now start to move methods from C4::Members::AttributeTypes
as well.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch replace Koha::Patron->get_extended_attributes with
->extended_attributes
It's now a getter a setter method.
It permits to replace UpdateBorrowerAttribute and use
create_related from DBIx::Class
Notes:
* We face the same variable names difference than in a previous patch
(value vs attribute)
Bug 20443: Remove SetBorrowerAttributes
squash + RM get_extended_attributes
RM get_extended_attributes
SQUASH Bug 20443: Remove UpdateBorrowerAttribute and SetBorrowerAttribute
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The GetBorrowerAttributes subroutine return the attributes for a given
patron.
Using get_extended_attributes we can acchieve it easily. The problematic
here is to restore the method's name (value vs attribute,
value_description vs description of the authorised value, as well as
display_checkout that should not be a method of Attribute, but
Attribute::Type instead)
value_description was used when the attribute types were attached to an
authorised value category. To avoid the necessary test in template and
controller there is now a $attribute->description method that will
display either the attribute's value OR the value of the authorised
value when needed. We should certainly use this one from few other
places.
Notes:
* This patch rename Koha::Patron->attributes with Koha::Patron->get_extended_attributes.
It will be renamed with Koha::Patron->extended_attributes in ones of the next
patches when it will become a setter as well.
* GetBorrowerAttributes did not care about the library limits, we still
do not
* The opac_only flag was not used outside of test, we drop it off.
* To maintain the existing behavior we add a default order-by clause to
the search method [code, attribute]
* From C4::Letters::_parseletter we always display the staff description
of the AV, There is now a FIXME to warn about it
* FIXMEs are not regressions, existing behaviors must be kept
* TODO add a new check to bug 21010 to search for inconsistencies in
patron's attributes attached to non-existent authorised values
* One test has been updated in Modifications.t, order_by is now
by default set to ['code', 'attribute']
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Wrong replacement in additem.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Starting to replace the ModItem calls with Koha::Item->store
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
With events sometimes leading to unforeseen branch closures (think Coronavirus as
an example), it would be helpful to have a tool that would allow librarians to
update due dates in bulk based on branch and current due date of the material.
It allows to select checkouts given the following parameters:
* libraries
* patron's categories
* range of the due date
You can set a hard due date, or define a number of days to extend the
due date.
Test plan:
Check some items out
Use the new tool to extend the due dates
Test the different filters to make sure they all work
Note: What about holidays?
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1) Start by having no (zero) lists
2) Go to Tools -> Batch record modification
3) Go through the batch record modification process, confirm everything
works as normal and there is a link to do a new batch record
modification at the end
4) In another tab, go to Lists and create a new list
5) Go back to the first tab and start a new batch modification process
6) At the end of the process, there should be a new option to add
modified records to an existing list
7) Select a list from the dropdown and confirm you are able to save your
modified records to the list as expected
8) Start a new batch modification process, this time for authorities
records
9) At the end confirm there is no option to add modified records to a
list, because authorities cannot be added to lists
Sponsored-by: Catalyst IT
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489
it's not longer possible. We could remove the code.
One occurrence left in C4::InstallAuth as there is no (real) logged in user yet.
Test plan:
* Install Koha to make sure NO_LIBRARY_SET is not needed during the
install process
* Login into Koha
* Make sure the your library's name is displayed correctly in the header
* Set another library
* Confirm that the library's name is updated
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No problem during install, nor changing library.
Fixed (pre-existing) tab in circ/branchtransfers.pl
No errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 9978 should have fixed them all, but some were missing.
We want all the license statements part of Koha to be identical, and
using the GPLv3 statement.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the necessary changes to the script so that the filename
extensions works for exporting authorities.
To test:
1) Attempt to export with all filetypes for biblios and authorities
2) Confirm the extension for the exported file (after clicking the
Export button) is correct for each one
Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
Go to Home › Tools › Batch item modification
Insert barcodes and continue
=> Without this patch you will get warning in the log
=> With this patch applied you warning does no longer appear
Confirm that the number of holds is correct
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We certainly faced 3 similar bugs due to this syntax: bug 23006, bug
22941 and bug 17526.
To prevent other issues related to this syntax this patch suggests to
replace them all in one go.
Test plan:
Confirm that the 2 syntaxes are similar
Eyeball the patch and confirm that there is no typo!
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds streetnumber, address, address2, phone and mobile to the
Batch Patron Modify form, also moves Primary email to a more logical
place on the page
To test:
1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to
edit
3) Add some data into the streetnumber, address, address2, phone and
mobile fields and click Save
4) These fields in the user record should now contain your data
5) Test that running the tool again with the option to delete the data
clears the fields correctly
6) Repeat steps 1-5 with a file of user borrowernumbers
Signed-off-by: Daniel J <daniel.jones@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the way data is passed to the staged MARC record
management template, splitting author, ISBN, and ISSN out of the
"citation" variable and passing them separately.
The DataTables configuration for the staged MARC record management page
is modified so that those now-separate variables are conditionally
displayed.
Unrelated minor change: Added a class to the MARC preview modal so that
it displays wider.
To test, apply the patch and view the "Staged MARC management" page for
both batches of bibliographic records and batches of authority records.
In each case the title or authority heading should be displayed as a
link while author, ISBN, and ISSN (if any) should not.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This adds the email field to the patron batch modification tool.
To test:
1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to edit
3) Add some data (e.g. test@foobar.com) into the Email address field, and click Save
4) The Primary Email address in the user record should now contain your email address
5) Test that running the tool again with the option to delete the data clears the field correctly
6) Repeat steps 1-5 with a file of user borrowernumbers
Sponsored-by: PTFS Europe
Signed-off-by: Sal <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
- Find/create a bib with at least one item
- From detail.pl, use the checkboxes in the holdings table to select one or more items
- click the "Modify Selected Items" link just above the holdings table to take your item(s) to batch modification
- Change something and click save
- Observe that the Return to the Record link points to a url without a biblionumber: "/cgi-bin/koha/catalogue/detail.pl?biblionumber="
- Apply patch
- Repeat
- The link now works!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Bug 24423: Fix for deletion - cleanup accidental debug inclusiopm
To test:
Repeat prior test plan with 'Delete selected'
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When an add for biblio or item is recorded there is no space in the info field
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To dissociate a search on biblio and item, we pass a new "object_type"
parameter to viewlog.pl. If equals 'biblio' we will assume that "object"
contains a biblionumber
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The 'Modification log" link in the cataloguing module returns confusing
results. The 'object' parameter is the biblionumber, but the all log
from itemnumber=biblionumber will be displayed as well.
Since bug 11473 we have the action_logs.info column that is prefixed by
'item ' or 'biblio ' to disociated an item modification from a biblio
modif.
This patch suggests a quick and dirty approach, use this column to make
sure we are searching for the correct logs.
/!\ As bug 11473 did not update the existing rows, we will no longer display
the logs created prior to this change.
Test plan:
Make sure you have at least 2 bibliographic records with some items
Make sure you have the biblionumbers of those records that match
existing itemnumbers
Edit them (no matter what you change)
Go to the bibliographic detail page (staff) and click "Modification log"
You should see the correct changes.
Signed-off-by: hc <hc@interleaf.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
- go to Tools > Batch item modification,
- select items to modify,
- for one or some text fields, check the second checkbox (Use regular
expression) and type your regex,
- check the regex has been applied.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The lines with my @barcodes makes no sense anymore.
Test plan:
Test with a barcode file.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The solution for items does not work, since it compares barcodes.
Instead of a grep in a map, we could do simpler.
Test plan:
Try barcode file, order not by itemnumber. Toggle with case. Add wrong code.
Try same via barcode list text area.
Try an itemnumber file, reorder again. Add wrong number.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
They must be displayed in the same order they have been scanned (or they
appear in the file)
This is an alternative patch. Same behavior for barcodes or itemnumbers,
as well as if a file has been used or items scanned.
Code is duplicated, but refactoring is out of the scope.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead
Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
Note that there is a link AND a button, coming from
commit 928c0af2b6
Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1.Enable multi-languages
2.Set the preference 'TranslateNotices' on 'Allow'
3.Go to: tools==>Notices & slips==>Edit (one notice)
4.Click on the "Email" in the Default, uncheck the checkbox for 'HTML Messages'.
5.Save
6.Reopen the notice, nothing changed.
7.Apply the patch
8.Repeat the steps 4 and 5
9.Success.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes batchMod.pl and inventory.pl pick the barcode
separators from a new pref BarcodeSeparators (instead of hardcoding
these separators differently).
A few other code locations may be potential candidates for such a change
too.
Test plan:
Test inventory with a few variations of BarcodeSeparators.
Test Batch item modification similarly.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the ability to set an unlimited number of guarantors
for a given patron. As before, each guarantor may be linked to another
Koha patron, and all the behavior that applies to a given guarantor
remains the same.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Find some patrons with guarantors, verify the still have their guarantor
4) Test adding and removing guarantors on a patron record, both Koha users and not
5) Verify the "Add child" button works
6) Verify NoIssuesChargeGuarantees still works
7) Verify tools/cleanborrowers.pl will not delete a guarantor
8) Verify the guarantors are displayed on moremember.pl
9) Verify the guarantor is removed by members/update-child.pl
10) Verify the guarantor is removed by misc/cronjobs/j2a.pl
11) Verify import patrons converts guarantor_id, relationship, contactfirstname,
and contactsurname into a guarantor
12) prove t/Patron.t
13) prove t/db_dependent/Circulation.t
14) prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
15) prove t/db_dependent/Items.t
16) prove t/db_dependent/Koha/Patrons.t
17) prove t/db_dependent/Members.t
18) prove t/db_dependent/Patron/Relationships.t
Signed-off-by: Kim Peine <kmpeine@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Note: this fixes the bug that is present right now where batch item
modification barcode matching is case sensitive, but if Koha barcodes
ever do become case sensitive, this patch will need to be removed.
To test:
1) Make/use an item with a barcode with letters in it. For testing
purposes, I'll be using an item with the barcode 'abcde'.
2) Go to Tools -> Batch item modification and enter this barcode in the
barcode list text input field, but change the case of one or some
letters. (i.e. enter the barcode in the field as 'abCDE')
3) Click Continue
4) Notice that the next page shows an error 'the following barcodes were
not found', but the item still shows underneath (was correctly fetched from database).
5) Create a text file and put the changed-case barcode in it (i.e. put
the barcode 'abCDE' in the text file)
6) Go back to batch item modification and upload the
text file as a barcode file
7) Notice same error as in Step 4
8) Apply patch and refresh page
9) Run through steps 1 to 6. There should no longer be an error and the
barcodes should be found as expected.
Sponsored-by: South Taranaki District Council
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
As per test feedback I've changed wording from debarrment to restriction
Added insertion into the borrower_debarments table and removal from
borrower_debarments table (and borrowers.debarred and
borrowers.debarredcomment) when either 'Restriction
expiration' or 'Restriction comment' are ticket to be disabled/deleted.
Test plan (please follow this instead of following test plan in the
first patch):
1. Go to Tools > Batch patron modification
2. Input the cardnumbers of several (undebarred/unrestricted) patrons
and submit
3. Notice there is no input for setting Restriction expiration date or
Restriction comment
Also notice in the list of matching borrowers at the top of the page
there is no display of the 'Restriction expiration' or 'Restriction
comment' values for the patron
4. Apply patch
5. Restart memcached and plack
6. Refresh the page notice 'Restriction expiration' (a date picker
input) and 'Restriction comment'are now input options
Also notice in the table at the top of the page 'Restriction
expiration' and 'Restriction comment' are shown on the far right of the table (you may need
to scroll to see this)
7. Pick a date in the 'Restriction expired' datepicker and write in text into
the 'Restriction comment' field and submit
8. Notice in the next loaded page the selected patrons have the
'Restriction expiration' and 'Restriction comment' values you entered
9. Query the borrower_debarments database table and check that the new
debarments are added to this table
10. Go back to the Batch patron modification page and re-input the same
cardnumbers
11. Write text into the 'Restriction comment' field and don't pick a
'Restriction expiration' value and submit
12. Notice in the next loaded page the selected patrons have the
'Restriction expiration' value of 9999-12-31 and 'Restriction comment'
value you just entered
13. Query the borrowers table and notice the borrowers.debarred value
for the modified patrons is '9999-12-31' and the
borrower.debarredcomment is what you inputted in step 11
14. Query the borrower_debarments table and notice the expiration value
is NULL and the comment value is set to what you entered in step 11
Also note the addition of the new debarment has not removed the existing
debarment on the patrons
15. Click on the cardnumber link of one of the patrons and notice the red
text on their patron account page informing you they are restricted
until the date you set
16. In the Koha home directory enter Koha shell:
sudo koha-shell <instancename>
17. Run: prove xt
18. All tests should pass
19. Repeat step 10 and tick the checkbox beside the 'Restriction
expiration' field and submit
20. In the next loaded screen notice the 'Restricted expiration'and
'Restricted comment' are empty
Check the borrower_debarments table and notice all restrictions for the
patron are removed.
Check the borrowers table and notice the debarred and debarredcomment
fields are empty for the patrons
21. Repeat steps 10 and 11 to make a new restriction
22. Repeat step 19 and this time check the 'Restriction comment' field
and submit and observe that also clears the restriction in the next
loaded page, in the borrower_debarments and borrowers table
23. Sign off
Sponsored-By: Brimbank Library, Australia
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1. Go to Tools > Batch patron modification
2. Input the cardnumbers of several (undebarred/unrestricted) patrons and submit
3. Notice there is no input for setting a debarred until (restriction
expiration) date or debar comment
Also notice in the list of matching borrowers at the top of the page
there is no display of the debarred or debarredcomment values for the
patron
4. Apply patch
5. Restart memcached and plack
6. Refresh the page notice 'Debarred till' (a date picker input) and
'Debarred comment' are now input options
Also notice in the table at the top of the page 'Debarred till' and
'Debarred comment' are shown on the far right of the table (you may need
to scroll to see this)
7. Pick a date in the 'Debarred till' datepicker and write in text into
the 'Debarred comment' field and submit
8. Notice in the next loaded page the selected patrons have the
'Debarred till' and 'Debarred comment' values you entered
9. Click on the cardnumber link of one of the patrons and notice the red
text on their patron account page informing you they are restricted
until the date you set
10. In the Koha home directory enter Koha shell:
sudo koha-shell <instancename>
11. Run: prove xt
12. Confirm all tests pass
13. Sign off
Sponsored-By: Brimbank Library, Australia
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Unify and clean up subtitle usage so that it's always used as a simple array and not the old hash structure.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
On the batch patron modification tool, if no patron attribute is selected then
an UPDATE query will be executed anyway. Indeed the form will send a
an empty "patron_attributes" parameter. We need to handle it.
Test plan:
Go to the patron modification tool
Enter a cardnumber
Change a field (like city)
Do not change anything in the patron's attributes
Save
=> Without this patch a SQL error is generated:
DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`borrower_attributes`, CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO borrower_attributes SET attribute = ?, code = ?, borrowernumber = ?" with ParamValues: 0=undef, 1="", 2="51"] at /home/vagrant/kohaclone/C4/Members/Attributes.pm line 287.
=> With this patch applied you will not see it
You should also test that you can modify patron's attributes ;)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the Notices edit process so that if the user chooses
the "Save and continue" option the page reloads with the same panel open
which they were previously editing in.
To test, apply the patch and go to Tools -> Notices and Slips.
- Open a notice for editing.
- Expand one of the sections.
- Choose "Save and continue" from the button menu in the toolbar.
- When the page reloads, the section you expanded should be open
again.
- Test each section and test with no sections expanded.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the Koha news page so that filtering the table of
news is done using DataTables' built-in search functionality. This
allows for the table to be filtered without requiring a reload of the
page.
The patch also moves the table filter into a sidebar form and adds a
keyword field. A minor change has been made to the global CSS to improve
the display of the form in the sidebar.
To test, apply the patch and rebuild the staff client CSS.
- Go to Tools -> News.
- Test the various table filter options: keyword, display location, and
library. Confirm that all work as expected.
- Changes to the keyword search text should be reflected in the
search field at the top of the table, and vice versa.
- Changes to the sidebar filter should trigger the correct state of the
"Clear filter" button at the top of the news table (enabled or
disabled).
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
If a barcode contains special characters like $, the regex in inventory
does no longer work.
This fix (as suggested by Jonathan) replaces the regex by a eq compare.
Test plan:
Pick one barcode and add a $ somewhere in the middle, say 123$456.
Include this barcode in a barcode file for inventory.
Run inventory on that file and verify that barcode was read and datelastseen
was updated. The barcode should not be reported as missing (not scanned).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To reproduce warns:
1) Go to Tools -> Notices & slips
2) Create a new notice of any module
Notice these warns:
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_svc_letters_get line 50, this
can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_svc_letters_get line 50, this
can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
3) Create a new notice of the Circulation module
Notice this additional warn:
Use of uninitialized value $code in pattern match (m//) at
/home/vagrant/kohaclone/tools/letter.pl line 258.
To test:
4) Apply patch and refresh page
5) Run steps 1-3 again and confirm no warns show
Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Move to admin
Add a permission
Remove descriptions from table
Clean up template
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
POD warnings from QA tool are false positives (basic functionsn POD not
needed)
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch allows for redfining the keyboard shortcuts used in rancor.
For now these are set globally (per instance)
Ctrl-S is a codemirror setting and cannot be altered
To test:
1 - Apply patches
2 - update database
3 - Load the advanced cataloging editor
4 - Click the "Keyboard shortcuts" button
5 - Ensure the list looks correct
6 - Note that 'Ctrl-S' note sit cannot be remapped
7 - Note the 'Redefine shortcuts' link at the top of the menu
8 - Confirm all the listed shortcuts work as expected
9 - Click the 'Redefine' link
10 - Ensure current mappings load correctly
11 - Read explanation and verify it makes sense
12 - Remap some functions
13 - Return to the cataloging editor
14 - Confirm your mappings work
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
Go to Tools -> Log Viewer and confirm the warn no longer shows after
applying the patch.
Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Without this patch renewals for checkouts wouldn't
show in the log viewer. The log viewre was using
RENEW, which we use for patrons, but for issue
RENEWAL is used.
The patch adds RENEWAL to the search params, when
Renew was selected in the form, so both terms are
included in the query.
To test:
- Make sure you have RenewalLog turned on
- Make a patron renewal
- Check something out and renew it
- Go to Tools > Log viewer and test different
searches
- Modules All - Actions All
- Modules All - Actions Renew
- Modules Circulation - Actions Renew
...
- Make sure results show as expected
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Have a list of barcodes that exist in your catalog
2 - Go to Tools->Batch item modification
3 - Attempt to modify items using the list
4 - Get an error page
5 - Apply patch
6 - Repeat
7 - Modification should work correctly
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Set MaxItemsToDisplayForBatchMod to some number
2 - Modify less items than that
3 - Note they show
a - Note if over 1000 they show in a simple display
4 - Modify more items
5 - Note they do not show and you see a note
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Get a list of itemnumbers or barcodes
2 - Set MaxItemsToProcessForBatchMod to less than this number of items
3 - Attempt to batch edit, you arent allowed
4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000
5 - Try a list of as many items as possible 30000 was good for me (they
should exist in your system)
6 - Try to batch edit, system will timeout on displaying these items
7 - Apply patch, update database
8 - Set MaxItemsToDisplayForBatchMod to 1000 (default)
9 - Try large file again, should not display items, but allow
modification, wait for this to finish
10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again
11 - Should be prohibited as before
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Changes:
- Replace getting preference ExtendedPatronAttributes by Koha.Preference
in templates
- Add Koha::Patron->attributes for getting patrons extended attributes
- Use this method in circ-menu.inc
- Remove getting attributes from members perl scripts
Test plan:
0) Apply the patch
1) Add some patron attributes type - with free text, authorised value,
limited by libraries...
2) Add some values to this attributes for some patrons
3) Go through as many patron pages as you can and confirm that
attributes are shown at side panel when they shoul and are not shown
when they should not be shown
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed Koha/Schema/Result/BorrowerAttribute.pm
[EDIT] Added missing semicolon on L114 in Koha/Patron/Attribute.pm
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Note: This is here for information purpose, feel free to test it if you
wan to play with it.
TODO: C4::Reserves::_get_itype is not longer in use
No more GetItem must be returned by:
git grep GetItem|grep -v GetItemsAvailableToFillHoldRequestsForBib|grep
-v GetItemsForInventory|grep -v GetItemsInfo|grep -v
GetItemsLocationInfo|grep -v GetItemsInCollection|grep -v
GetItemCourseReservesInfo|grep -v GetItemnumbersFromOrder|grep -v
GetItemSearchField|grep -v GetItemTypesCategorized|grep -v
GetItemNumbersFromImportBatch|cut -d':' -f1|sort|uniq
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch includes the changes for both batch record modification and
deletion.
Checks that all public lists are included and only private lists created
by the logged in user.
Hides the virtualshelves option if authorities are selected.
Doesn't show shelf option at all if none exist
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1) Create a list, add a record to it by its barcode that you don't mind
deleting
2) Go to Tools -> Batch record modification
3) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown show
again.
4) Select the list from the dropdown, select a modification template,
Continue
5) Confirm all of the records in that list show on the page. Click
Modify selected records. Confirm this is successful.
6) Go to Batch record deletion
7) Select the record type 'Authorities'. Confirm the dropdown to select
a list disappears. Confirm selecting 'Biblios' makes the dropdown
show again.
8) Select the list from the dropdown and click Continue
9) Confirm all of the records in that list show on the page. Click
Delete selected records. Confirm this is successful.
10) Go back to your lists. The list should still exist but it will now be
empty.
Sponsored-by: Catalyst IT
NOTE: Rebased to work -- Mark Tompsett
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
https://bugs.koha-community.org/show_bug.cgi?id=19905
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Catalog an item under LCC with callnumber GT95
2 - cn_sort should calculate as GT0095
3 - Go to inventory tool
4 - Enter a range that should have your item e.g LC GT90 to GT100
5 - Item is not returned
6 - Apply patch
7 - Item should be returned
8 - Verify things otherwise work as expected
Signed-off-by: Anne-Claire Bernaudin <anne-claire.bernaudin@univ-rennes1.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
https://bugs.koha-community.org/show_bug.cgi?id=19905
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Instead of dying!
Test plan:
Assuming you have a patron with borrowernumber=51 and another one that
can be deleted with borrowernumber=42
- authorities-home.pl
* Delete an authority record
* hit /cgi-bin/koha/authorities/authorities-home.pl?op=delete
- basket/sendbasket.pl
* Send a basket to someone
* hit /cgi-bin/koha/basket/sendbasket.pl?email_add=1
- members/apikeys.pl
* Generate and delete an API key for a patron
* hit /cgi-bin/koha/members/apikeys.pl?patron_id=51&op=delete
- members/deletemem.pl
* Delete a patron
* hit /cgi-bin/koha/members/deletemem.pl?member=42&op=delete_confirmed
- members/mancredit.pl
* Add a manual credit
* hit /cgi-bin/koha/members/mancredit.pl?borrowernumber=51&add=1
- members/maninvoice.pl
* Add a manual invoice
* hit /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51&add=1
- members/member-flags.pl
* Change permissions for a patron
* hit /cgi-bin/koha/members/member-flags.pl?member=51&newflags=1
- members/member-password.pl
* Change the password for a patron (from the staff interface)
* hit /cgi-bin/koha/members/member-password.pl?member=51&newpassword=aA1
- members/memberentry.pl
* Edit some patron's info
* hit /cgi-bin/koha/members/memberentry.pl?borrowernumber=51&op=save
- members/paycollect.pl
* Pay an individual fine
* hit something like /cgi-bin/koha/members/paycollect.pl?borrowernumber=51&pay_individual=1&accounttype=L&amount=1.00&amountoutstanding=1.00&accountlines_id=157&paid=1
You may need to edit some values
- tools/import_borrowers.pl
* Import some patrons
* hit /cgi-bin/koha/tools/import_borrowers.pl?uploadborrowers=1
- tools/picture-upload.pl
* Upload an image for a patron
* You will need to edit the html content
hit Home › Tools › Upload patron images
then locate the csrf_token input and modify its value
Note for QA:
- Opac is not done as blocking_errors.inc does not exist for this
interface
- ill/ill-requests.pl
I did not manage to replace this occurrence
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Caused by
commit 0cffb0f758
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
The test plan was not complete enough.
Test plan:
1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a
single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and
Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) Clone PREDUE for a specific library
7) The 'all libraries' option must list the templates for all libraries,
but without duplicate
8) Select a library in the dropdown list: only the templates for the
given library is listed, without duplicate
Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch modifies the access files template to help
compliance with several coding guidelines:
- Bootstrap grid
- Improve DataTables configuration
- Move date formatting from the script to the template
- Markup corrections
To test you must modify koha-conf.xml to contain something like the
following:
<access_dirs>
<access_dir>/tmp/koha-public</access_dir>
</access_dirs>
Make sure the directory exists and contains multiple files.
- Go to Tools -> Access files
- Confirm that the page looks correct and the layout adjusts at various
browser widths.
- Confirm that DataTables functionality works correctly, including
correct sorting by date.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Add a shelving location with code "ZZZZ" and lib "Awake"
2 - Load some items in batch modification
3 - Note shelving location dropdown is wrong
4 - Apply patch
5 - Reload page
6 - Note order is correct
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In several places we escape quotation marks using
$value =~ s/"/"/g;
All the occurrences are wrong and must be removed.
Most of them are leftover of bug 11638 (Remove HTML from
addbiblio.pl), which removes the construction of html from pl scripts.
The problem has been highlighted by bug 13618, I did not track down why
the issue did not exist before (?)
Test plan:
0/ Use strings with quotation marks, like:
'Fiddle tune history : "bad" tunes'
You can also use other html characters to make the tests more complete,
like 'Fiddle tune history : <"bad" tunes>'
1/ authorities/authorities.pl
a. Edit an authority filling different fields with quotation marks
b. Edit it again
=> The display (inputs' values) is wrong, if you save the escaped quotes
will be inserted
2/ cataloguing/addbiblio.pl
Same editing a bibliographic record
3/ cataloguing/additem.pl
Same editing items
4/ members/memberentry.pl
Edit a patron's record and fill some fields with quotation marks
+ fields borrowernotes and opacnotes
=> The quotes are inserted directly in DB (escape is done before the
insert!)
5/ opac/opac-review.pl
For QA only: $js_ok_review is never used
6/ tools/batchMod.pl
For QA only: $value is always undefined at that point
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Rather than getting the description in the script and passing, we should
just use the tmeplate plugin to get the description from the category
code.
To test:
1 - Find a patron, note their category
2 - Visit Tools - Batch patron modification
3 - Enter barcode of patron above
4 - Note category does not show in the display of patrons to be modified
5 - Apply patch
6 - Reload the page, note the patron category displays
7 - Modify the patron (anything but category)
8 - Check that category still diplays correctly in results
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch enables items to be skipped for inventory stocktaking
if the item is currently a waiting hold. The intention is to skip
items that should be on the holds waiting shelf in the library.
Test Plan:
1) Apply this patch
2) Generate a list of barcodes ordered by callnumber
3) Select one of those items and place it on hold, then confirm the hold
4) Remove that barcode from the list of barcodes
5) Browse to the inventory tool, choose your barcodes file
6) Run the inventory tool with that barcode file.
7) Note the tool says that item should have been scanned
8) Click the browsers back button to return to the previous page
9) Check the checkbox for "Skip copies marked as waiting holds"
10) Run the tool again, not it does not flag that item as previously
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch addes the ability to choose to be warned if it's possible
an item was scanned out of order ( i.e. mis-shelved ).
Test Plan:
1) Apply this patch
2) Generate a list of barcodes ordered by callnumber
3) "Misplace" one callnumber by moving it to another area of the list
4) Browse to the inventory tool, choose your barcodes file
5) Check the checkbox for "Check barcodes list for items shelved out of order"
6) Click "submit", note the item has been flagged as possibly out of order
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
#batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Bring up a patron
2 - Click 'Modification log'
3 - Note you get borrower info
4 - Move the object field into info field
5 - Submit
6 - You are now on the 'Log viewer' page with admin options, not
borrower circ options
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fix:
'koha_kohadev.letter.name' isn't in GROUP BY
DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
FROM letter
LEFT OUTER JOIN branches USING (branchcode)
GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.
Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val
ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id ) WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL )
GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396.
We must use Koha::AuthorisedValues->search instead of a raw SQL query.
Test plan:
Edit some items in a batch
Confirm that the dropdown list (AV) are correctly filled
We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Have or make some authority records
2 - Have or make an authority matching rule
3 - Export your authrotities
4 - Import them using the matching rule
5 - On the 'Manage staged records' page view some diffs
6 - The import record is correct, but the existing records pull form
bibs
7 - Apply patch
8 - Repeat
9 - Confirm you see the expected authority matches
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The subscriptionsnumber is required in biblio-view-menu.inc to display
the Subscription(s) tab. In detail.pl, if you click any of
Labeled MARC (you need to set the syspref viewLabeledMARC)
Hold(s)
Article requests
Checkout history
Modification log
Rota (you need to set the syspref StockRotation)
you lose the Subscription(s) tab.
This patch fixes the display by having each feature script generate that
value to be passed to the UI. I keep this separated from the first patch
since it's not exactly the same issue, and the solution might not
please.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In inventory, optional filters are build from authorize values categories used for items.notforloan, items.itemlost, items.withdrawn and items.damaged.
The bug is that description of value 0 is always "For loan".
This seems to be only for "notforloan".
Second bug is that if a description exists for "notforloan" value 0, it is not used.
This patch corrects by adding "For loan" only for "notforloan" authorized values and if there is no 0 value.
It changes the description added by code from "ignore" to a more unlikly user defined "__IGNORE__".
Test plan:
1) Make sure you have authorized values defined on items.notforloan, say "NFL" category, with at least a value and description but no 0 value
2) Make sure you have authorized values defined on items.itemlost, say "LOST" category, with 0 = "Not lost" and 1 = "Lost"
3) Go to inventory /cgi-bin/koha/tools/inventory.pl
4) Without patch you see "For loan" on both items.notforloan and items.itemlost
5) With patch you see "For loan" only in items.notforloan, you see for items.itemlost : "Not lost" and "Lost"
6) Create in authorized values category "NFL" a value 0 with description "Available"
7) Go to inventory /cgi-bin/koha/tools/inventory.pl
8) Without patch you see "For loan" in items.notforloan for value 0
9) With patch you see "Available" in items.notforloan for value 0
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>