Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled
This patch hides the Article requests column in the large circulation
rules table when the ArticleRequests system preference is disabled.
To test:
0) Apply patch
1) With ArticleRequests disabled, go to Administration > Circulation and fines
rules
2) Scroll right in the first table
--> There isn't any mention of article requests in the table
3) Scroll down to see the other tables in the page
--> There are no other article requests tables
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) Scroll right in the first table
--> There should be an article requests yes/no column
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests
limit and Default article request fees
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b875fa936f1c971e734e71ec7727d780ba9a9af)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7d571ca2c0224f4ff30b491f174b31e252fea0fb) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Katrin Fischer [Sat, 30 Jul 2022 21:35:50 +0000 (23:35 +0200)]
Bug 31272: Use TT plugins for pickup library and due date in opac-reserve.pl
Before this patch the date formatting for the due date was done
in the .pl instead of the template and the branchcode would show
instead of the library's name in the list of items when placing
an item level hold in the OPAC.
To test:
* Find or create a record with mulitple items
* Check out one of the items
* Place a record level hold
* Return an item to set to waiting
* Place an item level hold
* Go to the OPAC and start placing an item level hold
* Verify the messages in the item table show the branchcode
* Apply patch
* Only visible change should be the library name replacing the branchcode
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2353893c1acc45c99f5afbe0bde5dcd049d88660)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7459cbd3999f4a4ca97e53473c52c9d28dddbe3d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 31249: Use cronlogaction on update_patrons_category.pl
This patch does what the title says.
To test:
1. Run the script
2. Check the action logs
=> FAIL: Boo, no record of the running cronjob
3. Apply this patch
4. Repeat 1-2
=> SUCCESS: Yay!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Liz Rea <liz@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4d2ef0f4691058cdb9fdff34a5a555a755f75a2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b25b9b75bb936ea011bbd1220d6ec6d3c8dd78ff) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Marcel de Rooy [Mon, 1 Aug 2022 07:25:10 +0000 (07:25 +0000)]
Bug 27849: (follow-up) Add test
Compacting the code a bit too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad0aa754ee2a3e8e438594a54b2375b994753951)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 558ee09dd5bb1dbffe5a70acfca5607c00f14cf8) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
MJ Ray [Wed, 3 Mar 2021 17:54:42 +0000 (17:54 +0000)]
Bug 27849: Koha::Token may access undefined C4::Context->userenv
The _add_default_csrf_params internal function accesses
C4::Context->userenv without checking that it has been defined. I think
not all of the potential callers of it declare that they require a
defined userenv, so we should test and provide defaults for required
values if it is not defined, to avoid some "Can't use an undefined value
as a HASH reference" HTTP 500 Internal Server Errors.
To test:
Do anything that requires a form with CSRF token, such as editing your
details. Behaviour should be unchanged. To test the failure case, you
would need some customised code that indirectly generates a CSRF token
before setting the userenv up and I am not sure there is any in released
Koha yet.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Looks good to me. Working as expected.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c45fe1aaa54fd9d6ff84617df0bb94b4cfbbb12)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a48cf3c941dbd406f3791a8e29c58853e2b80ba1) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Michael Hafen [Fri, 13 Aug 2021 21:52:52 +0000 (15:52 -0600)]
Bug 28864: Have patron card creator use PatronsPerPage
Add pageLength to members/member.tt
Add aLengthMenu and pageLength to
patroncards/add_user_search (common/patron_search.tt).
Add aLengthMenu, pageLength, and iDisplayLength to patroncards/edit-batch
Test plan:
1. Set the PatronsPerPage system preference to any integer other than 20.
2. Go to Tools -> Patron card creator.
3. Start a new Card Batch.
4. Click the 'Add patron(s)' button to open the patron search window.
5. Do a search.
6. Add more than 20 patrons to the batch.
7. Close patron search window.
8. Click the 'Add patron(s)' button to add the selected patrons to the batch.
9. Observe that the table of patrons is has 20 as the default per page setting.
10. Apply patch.
11. Reload the batch.
12. Observe that the per page drop down includes the value of PatronsPerPage
and that value is selected by default.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5ca665f6aaf750fa507875343da0adb423ad7bd8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a1b1b82945a87c6d7487e70cea1827353f2a0663) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Lucas Gass [Thu, 29 Sep 2022 15:29:14 +0000 (15:29 +0000)]
Bug 30984: DBRev 21.11.12.002
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4d330f3697035453e2442780966d286486dd44db) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Fri, 29 Jul 2022 10:53:06 +0000 (06:53 -0400)]
Bug 30984: (QA follow-up) Switch from mediumtext to varchar(255)
My research indeicates that tinytext of less than 40 bytes uses
about the same storage as a varchar(255). Also, using
a TEXT field in a complex query may create a temp table.
varchar fields are also more efficient for sorting on.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6106f6926ab64647f0e92c8f12fedb5da3e216f0) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3a0d75a40cfeec8e14d7092b4cf23763363b45a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1fe48f965cb068bf707868600670a1d19fa09da2) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Fri, 17 Jun 2022 10:59:11 +0000 (06:59 -0400)]
Bug 30984: Action logs should log the cronjob script name that generated the given log
When something is changed by a cronjob, and that entity is logged via action logs, we can know what changed, and that it was via a cronjob, but we cannot necessarily know which cronjob made that change. The closest we can come is to find the action logs for the cronjob module which ran before the change which is by no means reliable assuming the CronLog is even enabled.
We should add a new column to action logs to store the name of the script ran for any action logs where the interface is "cron".
Test plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable all the Log/Logging sysprefs
4) Run some cronjobs that will generate action logs
5) Note the new action_logs column "script" contains the filename of the
cronjob that caused the change.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 18fd0c89cf7f288ad5ff4527484d9e989ed3e5f7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5767add2ccbb4ca4afbe0fbe2d19182c5b44ec9a) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Mon, 1 Aug 2022 10:31:21 +0000 (12:31 +0200)]
Bug 30468: Restore 'set -e' and remove echos
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4a00658e349fb21a9a334f0ab880d81b8f51d2e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ecc6a21ad23c9bf417cc13f972264ac83685410e) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Wed, 6 Apr 2022 12:38:00 +0000 (08:38 -0400)]
Bug 30468: koha-mysql does not honor Koha's timezone setting
If I run a query like "SELECT NOW()" from a koha report, I will get a different answer than if I had run it from koha-mysql.
In Koha, we set the timezone for each database connection.
However, koha-mysql does not do this, so instead we are left using the default timezone of the database.
Test Plan:
1) Set your time zone to something other than the database time zone
2) run "SELECT NOW()" using debian/scripts/koha-mysql
*not* /usr/sbin/koha-mysql
3) Note you get the database timezone's current time
4) Apply this patch
5) Repeat step 2
6) Now you get the correct time!
Signed-off-by: Michal Urban <michalurban177@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e97b099d58e73be44354d2343c0f45077871b398)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5e14e2c693e2382780f25c5fe8dc32b78d011d1f) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Shi Yao Wang [Fri, 27 May 2022 14:52:08 +0000 (10:52 -0400)]
Bug 30028: Fix patron message delete confirmation to be translatable
Make the message deletion confirmation popup translatable. Test plan
uses fr-CA translations.
Test plan:
1) Switch language to french (fr-CA)
If you do not have the translations, go to
misc/translator
then do
./translate install fr-CA
After it is done, go to administration > global system preference >
l18N/L10N then select Français (fr-CA) under language preference.
Refresh then you should be able to switch languages.
2) Add a message to a patron account from your own branch (or make sure AllowAllMessageDeletion is on)
3) Click "Delete" next to the message
--> a confirmation message appears "Are you sure you want to delete this message? This cannot be undone." with options "Cancel" and "OK".
4) Apply the patch
5) Write a translation in misc/translator/po/fr-CA-messages-js.po :
msgid "Are you sure you want to delete this message? This cannot be undone."
msgstr "Êtes-vous sûr de vouloir supprimer ce message? Cette opération est irréversible."
6) Refresh the translations by going to misc/translator and execute ./translate install fr-CA
7) Refresh and click "Delete" again
--> now the confirmation message is "Êtes-vous sûr de vouloir supprimer ce message? Cette opération est irréversible." with options "Cancel" and "OK"
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 622137294a4f1eca66ff794e1a91a75c08fe30c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f28a90434803dc683445d13dd2f7d180a78006d1) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.
To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly
Signed-off-by: Andrew <andrewfh@dubcolib.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 94191e5bfe681dca021bb133c9593bc5bc7e2193)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ab884f60f2d37ae59d9ee355de6737dbe90e2426) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
first two are from sample notices, third from sample creator data
3) apply the patch, repeat 1)
4) repeat 2), verify the strings are present in the translation file
5) translate some of the new strings, install the language,
verify strings are present in the translated files
./translate install fr-CA
check fr-CA/optional/sample_creator_data.yml and
fr-CA/mandatory/sample_notices.yml
There are some 60+ new strings.
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>
(cherry picked from commit 160d96e176331f8ac8eef4942bcc0af1868017c5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 577eed32b5dca9bc0dccb5de05a587b2f1debf68) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Lucas Gass [Thu, 28 Jul 2022 18:18:15 +0000 (18:18 +0000)]
Bug 31251: Use jQuery val() to clear_entry
1. Add some patron attributes that are textarea and some that have an AV category so they are select dropdowns
2. Go to the patron form and add some values to the patron attributes
3. Use the "Clear" button to try and clear the values, doesnt work.
4. Apply patch
5. Try clearing values from patron attributes that are both select dropdowns and textarea. The "Clear" button should work.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3198f647496d87e19036432f1be9f87dac4614d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25b2ebf8b25c52078c3c5bb5a50af0c5dab31039) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Lucas Gass [Thu, 29 Sep 2022 14:32:20 +0000 (14:32 +0000)]
Bug 29012: DBRev 21.11.12.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2256a16b9b1ff51a2c7ccf9453d9c4b7a03f6630) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Fri, 29 Jul 2022 12:12:53 +0000 (08:12 -0400)]
Bug 29012: (QA follow-up) Use q{} instead of '' in smart-rules.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f8e77b4e899d6f71fb8987975ba916a65dc8229)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 294ed32d06101b57f07838910165f75b039e5dea) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kevin Carnes [Fri, 3 Dec 2021 09:49:59 +0000 (09:49 +0000)]
Bug 29012: Add default values for blank circulation rules that weren't saved to the database
There are 5 fields that are not set if no value is provided when saving/editing a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds
This is problematic because it gives the impression these rules are set as blank, but in reality they don't exist and the rule will fal back to the higher level
To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf397ac3bcbc93a508954c836d1cb90a84fb2ac6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 387900a65c7cafcf28ad0da415e4136ffa7e0443) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
The basic MARC editor has its own button associated with each subfield
for emptying the contents of the input. Since the Flatpickr "X" icon
causes a layout problem and would be redundant, we can hide it on this page.
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Alex Buckley [Wed, 18 May 2022 04:07:06 +0000 (04:07 +0000)]
Bug 30797: Add the calendar.inc include to addbiblio.tt
addbiblio.tt throws the '$(...).flatpickr is not a function' because it
is missing includes to flatpickr.min.js and shortcut-buttons-flatpickr.min.js
To fix this the addbiblio.tt should include the calendar.inc file (like
additem.tt does) which includes to those aforementioned JS files.
Test plan:
1. Edit a MARC bibliographic framework
2. Make the 902$d subfield visible in the Editor
3. Also set the 902$d subfield plugin='dateaccessioned.pl'
4. Catalogue a new biblio record
5. Notice the 902$d subfield has not been pre-populated with todays date
6. Right click, choose 'Inspect', observe this JS error in the console: "Uncaught
TypeError: $(...).flatpickr is not a function"
7. Apply patch, and restart services
8. Repeat steps 4-6 and this time observe the 902$d is pre-populated,
and there is no flatpickr JS error in the console
Sponsored-by: Chartered Accountants Australia and New Zealand Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c3c006713bd8bc457b73dbcd3423a2506369bf9e) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 31455: (QA follow-up) Make table creation O(N)
We can insert the indices before the main loop to a hash,
this way we don't have to look up during each loop iteration
the index from an array which in the worst case might take O(N)
thus making the total time complexity O(N^2).
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 223d9d3a99903cff3d8a3078e6921da79099375c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b2a66cd3075b85a388272885048ba3248ce60500) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Tue, 7 Jun 2022 09:27:04 +0000 (11:27 +0200)]
Bug 30909: Retain permanent_location if mapped
If items.permanent_location is mapped to a MARC subfields we must retain
the value, not using items.location
Test plan:
1 - Map permanent_location to a marc field
2 - Expose that field in the item editor
3 - Change the location of the item and retain the permanent location on saving
4 - note that permanent location has not changed
Test the different other situation, when adding and editing: Empty the field, change only location, change only permanent_location, etc.
Signed-off-by: andrew <andrewfh@dubcolib.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2668a685702a0cd9adf3deeafcc9e4433199e0f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 346be764e71a1bdd60aa4d267598e22a85448610) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Johanna Raisa [Tue, 26 Jul 2022 09:01:56 +0000 (12:01 +0300)]
Bug 23202: Fix screen freeze when ordereing several items
This patch fixes adding multiple items on order acquisitions
The error is: Uncaught TypeError: $(...).parent(...).attr(...) is undefined
Test plan:
1) Set dateaccessioned.pl plugin to ACQ framework's 952$d field.
2) Create basket to a vendor and add order from a new empty record.
3) Add date acquired value from calendar.
4) Add multiple items and see that the view freezes.
5) Apply the patch
6) Reload the page and repeat the steps 3 and 4.
7) See that the items are added.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD Amended patch: adjust commit title Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d2d78e2581419dd3d8101fd9aecf358c71213733)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cf96c9802adf05b11aae6149bcd334eb13f2ba2e) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle M Hall [Thu, 7 Jul 2022 19:14:59 +0000 (15:14 -0400)]
Bug 31120: Items will renew for zero ( 0 ) days if renewalperiod is blank/empty value
If the rule renewalperiod is the blank empty string instead of being null/undefined or non-existant, Koha will interpret the renewal period as being zero days instead of falling back to the issuelength rule.
It makes sense to me that a literal 0 here should make it renew for zero days even though that is nonsensical.
Test Plan:
1) Delete all your rules
2) Create an all/all/all rules with an empty string for renewal base
period
3) Note that renewing an item does nothing
4) Apply this patch
5) Restart all the things!
6) Renew again
7) Note the renewal uses the issuelength rule as intended
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b010d99dfcb1a77a6ebd679aabafd819c6e67cf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e20879a8f5c9c13886c2f5073df379de28373c6d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle M Hall [Thu, 14 Jul 2022 10:38:57 +0000 (10:38 +0000)]
Bug 31120: Add unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 511ae8298e033ddf2a12799c968d25bd716d62af)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d23293acb5525ac799cf84173015edd80f3caded) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 21982: Circulation statistics wizard does not count deleted items
By default statistic assistant filter is set on the
existing items and doesn't mind about deleted items.
The patch corrects this. Items belong to the same library.
Test plan:
1)Make sure to have at least 1 or more item(s) in deleteditems database table
2)Home > Reports > Circulation statistics
3)Fill up 'Issuing library', 'Home library' and 'Holding library'
4)Submit
5)Notice that only statistics for active items are shown
6)Apply patch and repeat from 2) to 5)
7)Now active items and deleted items are shown
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 610f287db9581bfa6d606468810792d25c6dc47b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c7b78eb133c6ff2bc57739fba5325a46ee289739) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Lari Taskula [Wed, 1 Jun 2022 15:06:52 +0000 (15:06 +0000)]
Bug 30878: Avoid resetting waiting reserves tab
When canceling holds waiting over X days in "Holds awaiting pickup"
view, form submission resets the selected tab to "Holds waiting". This
tab reset may cause confusion for the user and lead to unwanted
actions. Instead, the user should be returned to the same tab that they
began with.
To test:
1. Apply patch
2. Navigate to /cgi-bin/koha/circ/waitingreserves.pl
3. Select "Holds waiting over X days" tab
4. Refresh page
5. Observe "Holds waiting over X days" is still selected
6. Have some holds waiting over X days
7. Select one of them and press "Cancel selected (1)" and confirm
8. Observe "Holds waiting over X days" is still selected after form
submission
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30235d31884c6c24edf692a9f69170b25a645e05)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b8bb46ced840065193144e0f40c33e38f3d0a18) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Wed, 29 Jun 2022 16:26:30 +0000 (17:26 +0100)]
Bug 26689: Prepend letter codes.
This patch prepends the credit_type_code and debit_type_code with
CREDIT_ and DEBIT_ respectively when doing a lookup on the notice letter
code.
Test plan
1) As previous patches, however instead of just naming your notice to
match the credit_type_code or debit_type_code use
CREDIT_credit_type_code and DEBIT_debit_type_code respectively.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6d9fd8160a6e0e9976babcc2cd01f58baa4a325e) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 12 Mar 2021 16:09:22 +0000 (16:09 +0000)]
Bug 26689: Check for specific template then fallback - printinvoice
This patch adds a check for a more specific ACCOUNT_DEBIT template
(named to match the debit_type_code of the credit line) prior to
falling back to the ACCOUNT_DEBIT template.
Test plan
1/ On a patrons account page use the print option on a series of debit
lines with differing credit types (Overdue, Payout)
2/ Note that the same template 'ACCOUNT_DEBIT' is used for all types
3/ Apply the patch
4/ Run step 1 again and note all still print using ACCOUNT_DEBIT
5/ Add a new notice template under the 'circulation' module with a code
that matches one of your account debit types (OVERDUE, PAYOUT)
6/ Run step 1 again and note that where you have added a specific notice
for that debit type it has been used.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e46612d7c5dfc8d0faff009ef9f86198bdd0f83)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 021ca321ee7eb97a392149f736524b46b2a57407) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 12 Mar 2021 14:38:31 +0000 (14:38 +0000)]
Bug 26689: Check for specific template then fallback - printfeercpt
This patch adds a check for a more specific ACCOUNT_CREDIT template
(named to match the credit_type_code of the credit line) prior to
falling back to the ACCOUNT_CREDIT template.
Test plan
1/ On a patrons account page use the print option on a series of credit
lines with differing credit types (Payment, Lost Item Return, Writeoff)
2/ Note that the same template 'ACCOUNT_CREDIT' is used for all types
3/ Apply the patch
4/ Run step 1 again and note all still print using ACCOUNT_CREDIT
5/ Add a new notice template under the 'circulation' module with a code
that matches one of your account credit types (PAYMENT, WRITEOFF,
LOST_FOUND)
6/ Run step 1 again and note that where you have added a specific notice
for that credit type it has been used.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 422ab472836cfcd0dd4197173de1213c06375d42)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32091958c78bc5d2e8550bac896b78be47833f90) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 8 Jul 2022 14:46:04 +0000 (15:46 +0100)]
Bug 31121: Fix date formatting in cashup summary modal
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c12d037da294944cf82208b2bd72d3348b66c0cf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a75cacaf34c9a9193734fdc4b4e91a335d6cfb89) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Lucas Gass [Wed, 20 Jul 2022 16:53:28 +0000 (16:53 +0000)]
Bug 31204: Clearly indicate edit buttons are for record modification
To test:
1. Apply patch
2. Do a search and select some records
3. On the toolbar (#selection_ops) open the Edit dropdown.
4. The labels should read 'Batch edit records' and 'Batch delete records'.
Note: To see both you must have batchmod and batchdelete permission.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ce420ed82862e750b7a6a46c66c5cf1587f5e7d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eeaeb57f254a04c137a3bec133720523c8a68f8c) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Wed, 6 Jul 2022 10:54:35 +0000 (11:54 +0100)]
Bug 30838: (QA follow-up) Add unit tests
Two tests added, one in t/db_dependent/Circulation.t to catch the
initial setting of to_address at enqueue time and a second in
t/db_dependent/Letters.t to catch the correcting at send time.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 467b444c7e355b1ef3ecbab29f67544bfd72360b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 899898400f095a0cfbbae950bf2d46b8327db905) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Tue, 28 Jun 2022 11:27:17 +0000 (07:27 -0400)]
Bug 30838: (QA follow-up) Add missing semicolon
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 008e6ae9ebd45cc8161a86f293703f02d7409319)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3805235e4573c350bced0f7ead946eb2fbea2631) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Tue, 24 May 2022 11:57:09 +0000 (12:57 +0100)]
Bug 30838: Set to_address to smsalertnumber at send
It may be helpful to know exactly what number was used for the sms alert
that was sent. As such, we should ensure it's set at the time of
sending.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9cdc1da651faa24a93f87569bf2b219f31552ee)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 625b354f8a12b20400766f51576e23baa51b091d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Tue, 24 May 2022 11:32:45 +0000 (12:32 +0100)]
Bug 30838: Don't fallback through phone numbers for sms
This patch removes the fallback handling for smsalartnumber as the
to_address in notices. We ignore the to_address field in the message
queue at send time for sms anyway and use smsalertnumber exclusively so
having this field populated is just confusing to the end user
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e388ed509c58b5f7398baf6f7bb027b4dc46c1c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20b17b51679ac6884da2550d952a75c786e81692) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f72d4a85a0ddbe224d101ee67f02cfb75cb06467) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 097969ac4d9d34ad4b516c4936e2a97dddbcb3c2) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 13a3b0be9c0ba1a2dfc33cdf8b4845fefdb372d1) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Tue, 12 Jul 2022 15:22:46 +0000 (16:22 +0100)]
Bug 31086: (QA follow-up) Add unit tests
This patch adds the unit tests for the change to Koha::Hold::store.
We test for and catch the exception introduced for both the create and
update cases.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f0685f0f4053da428ab13d9f3991790fb71b7e55)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bc95ffa3e3f97738f54ce56e2af0422bfc05bc57) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Tue, 12 Jul 2022 15:21:30 +0000 (16:21 +0100)]
Bug 31086: (QA follow-up) Fix failing tests
This test was missed first time around, branchcode needed adding to all
the calls to AddReserve.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bdddc7ee0a3a0ed2ec1c5996ab5be587c1e395df)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51f33cbc209b37b20fb8ae8e9f1003940e672084) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Tue, 12 Jul 2022 14:39:37 +0000 (15:39 +0100)]
Bug 31086: (QA follow-up) Remove DEFAULT from column
There's no need to have a default here, and in fact it doesn't make
sense.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d731943c2464592624d2b34bc91a75ea3ceae5b7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4db94b43c807e8bcc8fcbc97c4fd5011158cbcc5) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Fri, 1 Jul 2022 15:30:33 +0000 (15:30 +0000)]
Bug 31086: Update existing unit tests
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf2a9b5279151b61bb149c318505e2d5e5ca8df8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20226a8082a1e7bd5908f13945e4a1fca58a1d13) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Fri, 1 Jul 2022 14:46:26 +0000 (14:46 +0000)]
Bug 31086: Prevent placing hold with no pickup location
To test:
1 - Apply patch
2 - Repeat test on previous patch
3 - You should get a warning popup when attempting to save hold
4 - Reload page
5 - Inspect the HTML and manualy set #pickup value of selected option to ""
6 - Attempt to save hold
7 - You get the popup
8 - Place a hold normally (with location) and verify it works
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e609e20c041084a5b763f0b8fe8cd304e5ca8159)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 56f452c173156f3a83b7435c2ff95ed6dbe1d7f9) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Fri, 1 Jul 2022 14:44:09 +0000 (14:44 +0000)]
Bug 31086: Throw an exception when a hold is stored with no branchcode
To test:
1 - Apply first 2 patches
2 - On staff client, find a biblio, place hold, select a patron
3 - Before creating hold, right click on 'Pickup location'
4 - Inspect the element
5 - In the console find the top <li> for pickup, and right click
6 - Select 'Delete node'
7 - Save hold
8 - You get an exception/error
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7d886d388dc9825c6e93a158e19f7da60db145b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e03b542a18d20f00211721e3c2f200d7fc00c664) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 30308: Fix bulkmarcimport.pl broken by OAI-PMH:AutoUpdateSets(EmbedItemData)
Test plan:
(A) Reproduce the bug:
A1 In Administration > System preferences > Web services:
- Enable OAI-PMH
- Enable OAI-PMH:AutoUpdateSets
- Enable OAI-PMH:AutoUpdateSetsEmbedItemData
A2 In Tools > Export data > Export bibliographic records, export 1 (one)
biblio record. Be sure that this biblio record has at least one item.
Don't tick "Don't export items".
A3 Delete the exported biblio record, and its items.
A4 In command line, on the server load the exported file:
./bulkmarcimport.pl -b -v -file /path/to/koha.mrc
A5 Retrieve the biblio record in Koha. Note the absence of the item(s). This is
the bug.
(B) Apply the patch
B1 Delete the record (without item) loaded at A4.
B2 In command line, on the server load the exported file:
./bulkmarcimport.pl -b -v -file /path/to/koha.mrc
B2 Retrieve the biblio record in Koha. Note the presence of the item(s).
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d5e65dd4c0352c4fb2d96f4cabfc6e6311770cd0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 06b48f16e420ccac12cc0560d0091c404e647be6) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Tue, 12 Jul 2022 08:09:25 +0000 (10:09 +0200)]
Bug 31138: Don't ignore DataTables errors and raise them to the end-user
DataTables is not raising error to the end user, it's only displaying a generic message in the console.
This leads to lot of questions on IRC or the mailing list ("the table is empty").
We can do better and display what went wrong.
We could also imagine add a link to the wiki for the more common problems (won't be implemented here however).
Test plan:
Revert "Bug 31104: Put each link on a separate header" and search for a
patron using a very long string
You should get an alert with the reponse of the server.
In my case:
"""
Something went wrong when loading the table.
414: Request-URI Too Long
"""
You can also make the REST API returns a 500 (bad specs or simply with a
die statement).
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76b984bb6ccee55ba1ddfdb5b08c6ee2e75eaa37)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a5d048b51b60dcb7123e2fd0b73e5d95f9e554e) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Thu, 21 Jul 2022 18:16:22 +0000 (18:16 +0000)]
Bug 31213: Auto search simple term quoted
This patch does a second search if the first had no results and was a simple single term search
We simply quote the term, rebuild the query, and rerun the search
This targets both Zebra and ES, but is more relevant for ES
To test:
0 - Have Koha running using ES
1 - Add titles your system "Ivy + Bean" "The 6:20 Man"
2 - Search for these titles without quotes - NO results under ES
3 - Search with quotes - you find them
4 - Apply patch, restart all
5 - Search again without quotes
6 - Success!
7 - Confirm search still works under Zebra
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ce5f0532c8fea625c838725f70518421ebbb22b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e1500c7c6b054ccd4cb7575641809e696418cdce) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Tue, 5 Apr 2022 13:40:51 +0000 (09:40 -0400)]
Bug 30458: Include librarian (manager_id) in accountline when using "Payout amount" button
When using the "Payout amount" button, accountlines.manager_id is not
populated. This is not the case with the "Issue payout" buttons.
Test Plan:
1) Create a manual credit
2) Issue a payout using the "Payout amount" button
3) Inspect the payout accountline, note it has no manager_id
4) Apply this patch, restart all the things!
5) Repeat steps 1 and 2
6) Note the new payout accountline has a manager_id!
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
JK: Fix commit title
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0177b88eb33d398da4eb5ffb6344226930c3346b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73f7c89ba69a32482fe7b3cb02e98b21ef443a45) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Wed, 6 Apr 2022 13:49:58 +0000 (13:49 +0000)]
Bug 30471: Correct display of default rules
To test:
1 - Browse to 'Administration->Circulation and fines rules'
2 - Make sure you are editing 'Standard rules for all libraries'
3 - Set 'Lost item fee refund on return policy' to 'Refund lost item charge and charge new overdue fine'
4 - Swtich to edit rules for a specific library, click on the dropdown for 'Lost item fee refund on return policy' and note default says 'Use default (Refund lost item charge and restore overdue fine)'
5 - Switch default/all libraries rule to 'Refund lost item charge and restore overdue fine'
6 - On specific branch note the default option is now 'Use default (Refund lost item charge and charge new overdue fine)'
7 - Apply patch and repeat, note the default descriptions now display correctly
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 417d8df61b4d00b6b904dd374835e99cfb9be4a2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c92a1cf501127ea02fe04c8fc947e9ec8ea934b0) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Wed, 20 Jul 2022 16:32:58 +0000 (12:32 -0400)]
Bug 31202: Don't remove optional SIP fields with a value of "0"
If the value of a SIP field is "0", that evaluates to false, so any calls to maybe_add with a value of "0" will not get added to the SIP response message.
Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t
Signed-off-by: Michal Urban <michalurban177@gmail.com>
JK: Adjust commit title
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8b957a69d4449bedd0f593cf946e5fde0e8d7a69)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5775f6c9a97bbfe15c1c496c6b2fdee856734cf1) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Wed, 20 Jul 2022 15:44:05 +0000 (17:44 +0200)]
Bug 31201: Prevent Pseudonymization.t to fail
It's failing if selenium/patrons_search.t failed before, they are using
the same code and the selenium tests didn't clean correctly
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ed83d7744502d767d9806afb8516ec5ecb967fa5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7d2086663e64d1768f7a0206851fe857387db36d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 30658: (bug 29496 follow-up) CheckMandatorySubfields don't work properly with select field in serials-edit.tt for Supplemental issue
CheckMandatorySubfields use the class "input_marceditor" but in file
serials-edit.tt this class is not set for select input in Supplemental
issue form. In consequence if a select field is set as mandatory, it is
detected as missing even if it is filed and so you can't submit the form
and receive the new supplemantal issue.
Test plan:
1- Create (or find) a subscription for a biblio record and select the
option "Create an item record when receiving this serial"
2- Be sure to have at least one mandatory subfield that is filed with a
select input in the framework used by the biblio record. (ex: 952$a,
952$b or 952$c).
3- From the subscription-detail page click on "Receive"
4- In the lower part--Supplemental issue--fill the suppelemant details,
change the status to "Arrived" and fill the item form that appears.
5- Click on "Save"
6- Check that an error box appear with the message " Form not submitted
because of the following problem(s) 1 mandatory fields empty
(highlighted)" (the number can be different according to the number of
concerned subfields)
7- Apply the patch
8- Repeat step 3 to 5
9- Check that no error appear and that your item has been created
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>
(cherry picked from commit 4f6164d1940f4d666d2efb0e3e8d76bea3108125)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e40a76bd78e34af1a73fba1417613ca25e44e59b) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 31186: Fix the hidingrules test for result numbering
We should not test the $hidingrules variable but the number
of keys it contains.
Test plan:
Clear OpacHiddenItems.
Check with and without this patch search result numbering on
the OPAC.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d7647052f20104b70ba6b02d1535874fb9ab3b61)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b8f34e1acce7fe0a9b9698e30c210248107973f9) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Katrin Fischer [Sat, 16 Jul 2022 11:23:54 +0000 (11:23 +0000)]
Bug 27045: (follow-up) Fix delimiter in header rows
The header rows still showed \t because the newly defined
variable wasn't used there.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eea061ca30e4810b07ca2920bfe1e55762fab02)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed114537d3a965bc5f636e4f138cdf35c2515d3b) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Fri, 20 Nov 2020 14:33:14 +0000 (15:33 +0100)]
Bug 27045: Fix other exports using CSV profiles
This patch corrects the export of the 2 other reports
using CSV profiles:
* Late issues (serials)
* Basket (acquisitions)
To test:
1) Late issues
* Update the late issues sample report to use tab as separator
* Create a subscription
* Go to serial collection and 'generate next' to get some late issues
* Go to Claims
* Export the late issues and verify format is correct
* Verify exported file has tabs
2) Basket summary
* Create an order with several order lines
* Create an SQL type CSV profile for basket export using tab as separator
Example: aqorders.quantity|aqordres.listprice|Title=biblio.title
* Export the basket using your configured CSV profile
* Verify exported file has tabs
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7cd84171ab57a35138fa5c585d2ed6de442e453c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9af01ea2e3c6735420431cd41a97e29a28167165) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Fri, 20 Nov 2020 14:33:02 +0000 (15:33 +0100)]
Bug 27045: Fix items lost report export if delimiter is tab
When choosing tabulation as the delimiter for a CSV profile
for the lost item report, the tabs appear in the file as \t
instead of as proper tabs.
title\tauthor\tstocknumber\tcallnumber
"E Street shuffle :"\"Heylin, Clinton."\\
To test:
* Upate the existing sample lost item CSV profile to use tabs as
separator
* Make sure you have some lost items in your database or create some
* Go to Reports > Lost items
* Run the report
* Check all or some of the checkboxes in the result list
* Export using the link on top and the CSV profile
* Verify the tabs are not exported correctly
* Apply patch
* Verify tabs now are proper tabs instead of \t
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 983965ee4790fd7841af87fcfdb8395ccea9e813)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4db8368fd558066ab321353e9eb346563f871f72) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Julian Maurice [Wed, 9 Mar 2022 15:42:50 +0000 (16:42 +0100)]
Bug 30268: Check mandatory fields in addorderiso2709.pl
Test plan:
1. Make sure you have mandatory item subfields in the MARC bibliographic
framework used in acquisitions ("ACQ" if it exists, the default framework
otherwise).
2. Use the "Stage MARC records for import" tool to upload a file. Do not import
the bibliographic records.
3. Create a new acquisition basket ("Create items when:" must be set to
"placing an order") and add a new order from a staged file
4. Select the file you just uploaded
5. In the "Items information" tab, make sure at least one mandatory subfield is
empty
6. Try to submit the form. If there are errors about other mandatory fields
(like the fund for instance), fix those errors and resubmit. There should be
an error message about mandatory item subfields.
7. Enter a value for the mandatory item subfields and resubmit the form. Verify
that the order and the item have been correctly created.
Signed-off-by: Thibault Kero <thibault.keromnes@univ-paris8.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e37359cae96535e45ccb26a5e22d5b67920d27cd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7faeaf4aef4963e6a0a8c5a0240fa562a8dba105) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Mon, 18 Jul 2022 11:49:57 +0000 (11:49 +0000)]
Bug 7660: Use first available categorycode when none passed in
The code that populates the patron messaging preferences on initial form load
expects to have a category selected. Currently we only have one if one was
passed to the form. When creating an account from a parent, we don't have a
category explicitly selected - so we can just select the first of the possible
categories
To test:
1 - In KTD set 'Juvenile' category to have some messaging preferences
2 - Find a patron, say Edna Acosta, and 'Add guarantee'
3 - In new form preferences are blank, cancel
4 - Apply patch, restart all
5 - Go to Edna, click 'Add guarantee'
6 - Preferences are populated!
7 - Cancel
8 - Go to 'Patrons' module
9 - Click "+ New patron"
10 - Confirm messaging preferences load correctly when not adding child
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 146423f1bcbefda20995429a1f8ed9152977495c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 12569073194b5b833022a77289f26c1d37bdc90f) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Fridolin Somers [Thu, 23 Jun 2022 01:04:47 +0000 (15:04 -1000)]
Bug 31020: Fix PassItemMarcToXSLT in system preferences description
Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences.
But it only applies on results pages.
The only use in perl code is in C4::Search :
> $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');
I've tested by adding in all XSLT files :
<strong>ITEMS <xsl:value-of select="count(marc:datafield[@tag=952])"/> </strong>
Number of items only appears in OPAC and staff interface results pages.
In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing.
In other pages MARC record does not embed items datas.
This patch adds "MARC21 952, UNIMARC 995" to be explicit we talk about
MARC datas not item tags build in XML recieved by XSLT.
Test plan :
1) Apply patch
2) Search for PassItemMarcToXSLT in system preferencies
3) Look at description of PassItemMarcToXSLT
4) Check PassItemMarcToXSLT only apprears in OPACXSLTResultsDisplay and XSLTResultsDisplay
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6dbad91c4f114471036695f1476dc5315a94d1a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f70fd04521e560f55a45742e1c3ba388a34e6d98) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Shi Yao Wang [Wed, 29 Jun 2022 15:13:27 +0000 (11:13 -0400)]
Bug 30935: Holds to pull shows wrong first patron
When different patrons have item level holds on the same item, Holds to
pull shows wrong first patron.
Test plan:
1) Place a record-level hold on a biblio with an available item
2) Check the Holds to pull page (circ/pendingreserves.pl)
--> The biblio should appear in the list and the patron should appear in the 'First patron' column
3) Place a second record-level hold on the same biblio
4) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the second patron
5) Place a third record-level hold on the same biblio
6) Go back to the Holds to pull page
--> The biblio is still there, but the patron in the 'First patron' column is the third patron
7) Apply the patch
8) Go back to the Holds to pull page
--> The biblio is still there and the patron in the 'First patron' column is the first patron
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 87b985528edf0a714121fed13d2390fd57a27a36)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1cc0c07371f695646468862812fb82674480345) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Fridolin Somers [Thu, 11 Feb 2021 15:27:54 +0000 (16:27 +0100)]
Bug 27683: Impact on catalogue/detail.pl
Since EasyAnalyticalRecords pref is now in GetAnalyticsCount, remove
test in catalogue/detail.pl.
Test plan :
1) Build an item and a linked analytical record with 773$0 and $9
2) Go to record detail page
3) Enable EasyAnalyticalRecords
4) You see analytics tab and analytical count on item
5) Disable EasyAnalyticalRecords
6) You dont see analytics tab
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc23a4c478ab57f3b987b27fb7c2beebd4ceb823)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e9daeb70a20f2790e90705b5fe11bdec8458566f) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Fridolin Somers [Thu, 11 Feb 2021 14:33:35 +0000 (15:33 +0100)]
Bug 27683: Bind results of GetAnalyticsCount to the EasyAnalyticalRecords pref
C4::Items::GetAnalyticsCount is part of the easy analytics feature.
Like Bug 20702 make early return when the system preference EasyAnalyticalRecords is disabled.
Actually it may block an item deletion for wrong reason.
Test plan :
1) Dont apply patch
2) Build an item and a linked analytical record with 773$0 and $9
3) Enable EasyAnalyticalRecords
4) Try to delete the item
5) You have an alert because linked to analytics
6) Disable EasyAnalyticalRecords
7) Try to delete the item
8) You have an alert because linked to analytics
9) Apply patch
10) Try to delete the item
11) No alert, it works :D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfc390940d8688195c5046f978f08bbd64bf24e1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28b5880d7113c98fd3ff336a3080a00781b9912d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Fridolin Somers [Thu, 11 Feb 2021 15:28:18 +0000 (16:28 +0100)]
Bug 27683: Unit test for GetAnalyticsCount
Run prove t/db_dependent/Items/GetAnalyticsCount.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd7652255c1a4c2ea6c62fab91cb94a92e312258)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 555efbd4470a6aba5bf18d1a6c05d7bc77381870) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Michal Urban [Wed, 15 Jun 2022 08:04:37 +0000 (04:04 -0400)]
Bug 30447: Unit tests
Added tests to ensure that Koha::Holds->get_items_that_can_fill returns items with datecancelled and datearrived
Added test for correct number of items for each call of "get_items_that_fill"
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b4a9edc83f72b9740cd59bd5c842855cd65e19cc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2dfd3b05e74d5a7641bf93b021b437427fb8d86b) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Mon, 4 Apr 2022 12:21:43 +0000 (12:21 +0000)]
Bug 30447: Check if transfers arrived or cancelled
TO test:
1 - Find a bib with a single item
2 - Browse to Circulation->Transfer
3 - Transfer the item to another branch
4 - Check the item in at current branch and cancel the transfer on the dialog
5 - Place a hold on the biblio for a patron at current branch
6 - Browse to Circulation->Holds to pull
7 - Item does not show
8 - Apply patch, restart all
9 - Browse to Circulation->Holds to pull
10 - Item shows
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 206ba015c4a4b28b022ab9d6481a07ab76461747)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f7363f6ca7c0862b9071fe956f97a1401aad50d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Shi Yao Wang [Mon, 4 Jul 2022 13:18:51 +0000 (09:18 -0400)]
Bug 29922: (follow-up) Remove extra sort
Remove wrong sort in staff advanced search page
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 15918c33701fe2cf3b84e568bb9bd16b328f172f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c41dba3eba2ce4baf8ddbd7df087a52c14f07c4d) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Shi Yao Wang [Mon, 27 Jun 2022 15:18:05 +0000 (11:18 -0400)]
Bug 29922: Make get_search_groups return results sorted by title
get_search_groups from Koha/Library/Groups.pm returns library groups sorted by title.
Test plan:
1- Go to administration > library groups and create multiple library groups with different names (e.g. AGroup, BGroup, ÄGroup, etc.). Make sure to tick "Use for OPAC search groups" checkbox.
2- Go to advanced search in OPAC.
3- Under "Groups of librairies" , click the select button.
4- Notice that the library groups are not in alphabetical order.
5- Apply the patch.
6- Notice that the library groups are in alphabetical order.
7- Run `prove t/db_dependent/LibraryGroups.t` and all test should pass.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d86d949551201bfc7745f65fbb8428abac324cb4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73d5fd08f5d1c41c2fb332b5c376533dda0e5fd4) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 15 Jul 2022 13:58:40 +0000 (14:58 +0100)]
Bug 31163: Sort cashups newest to oldest
The cashup history table was sorting from oldest to newest.. it's
perferable to show the most recent at the top by default.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dbbaba3ee08f6551294a00194f03e6d64a409431)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9739eb738db4d0d58a9b4bd6b16468dc5086b97f) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
The solution was to add regexp that trims all whitespaces.
How to test:
1. Go to the koha/virtualshelves/shelves.pl;
2. Add new list or edit existing one;
3. Start adding new items;
4. In the "Barcode" field add barcode(s) with whitespaces before them;
5. Observe that it wasn't added as the barcode isn't recognized because of whitespaces;
6. Apply the patch;
7. Repeat step 4;
8. Observe that the item was successfully added;
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c4ee39bf3aa8f1077ec925630e70e22aa2f35f6a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e54d08e64ac886e8c114a2e7b6c34c554116b07) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 65292aaa86650257d6d47dfe134b177480c9f106) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Fridolin Somers [Wed, 11 May 2022 19:38:23 +0000 (09:38 -1000)]
Bug 27667: Display a warning for records missing in Elasticsearch
On "About Koha" page are displayed the numbers of indexed biblios and authorities with ES.
It could be great if we could have comparison with the number of records in the database to display the number of missing records.
In the "System information" tab with the other "Data problems".
If Searchengine has any issue (index count will be -1), we do not
display missing records.
Test plan :
1) Use Elasticsearch searchengine
2) Rebuild all records : koha-elasticsearch --rebuild -d kohadev
3) Go to "About Koha" page and look at System information tab
=> you see no warning
4) On a biblio record delete the MARCXML in biblio_metadata.metadata
5) Rebuild all records : koha-elasticsearch --rebuild -d kohadev
6) Go to "About Koha" page and look at System information tab
=> you see warning : 1 record(s) missing on a total of 435 in indice koha_kohadev_biblios.
7) On a authority record delete the MARCXML in auth_header.marcxml
8) Rebuild all records : koha-elasticsearch --rebuild -d kohadev
9) Go to "About Koha" page and look at System information tab
=> you see warning : 1 record(s) missing on a total of 1705 in indice koha_kohadev_authorities.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fee0f29792353d895af9eb6328cd50faef743162)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 21ff48061278549bafbc191d7f0ed4b5ece7918c) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Lucas Gass [Fri, 15 Jul 2022 16:55:53 +0000 (16:55 +0000)]
Bug 20439: Sort SMS providers in alphabetical order by DB field
To test:
1/ Add 'Email' to the 'SMSSendDriver' system preference.
2/ Make sure 'EnhancedMessagingPreferencesOPAC' and 'EnhancedMessagingPreferences' are turned on.
3/ Add some SMS providers (/cgi-bin/koha/admin/sms_providers.pl) with different names.
4/ Notice on memberentry.pl and opac-messaging.pl the SMS providers sort by when they were added, not alphabetically.
5/ Apply patch and restart services.
6/ Look at memberentry.pl and opac-messaging.pl and notice that they SMS providers now sort alphabetically.
Signed-off-by: George Williams <george@nekls.org Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd49601079fcf6790364522b41bd038bca3190c6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 35b8967b84ebac2c0e836474445d0cea197b59c6) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Tue, 12 Jul 2022 18:39:06 +0000 (18:39 +0000)]
Bug 31144: When modifying an order we should not load the vendor default discount
After placing an order in a basket with a discount of "0" if you attempt to modify we will load the vendor default discount, this can lead to accidentally applying a discount when modifying other order parts
To test:
0 - Have a vendor with a discount set
1 - Add an order to a basket
2 - While adding, set discount to 0
3 - Add order - prices are calculated ocrrectly
4 - Modify order
5 - Note discount is populated with vendor discount
6 - Cancel
7 - Apply patch
8 - Modify order
9 - Discount remains at 0
10 - Repeat with a vendor with no discount set
11 - Placing order not specifiying discount it remains blank
12 - Modifying order discount remains blank
13 - Modify order and set discount
14 - Confirm it is retained on modifcation
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 73d2066837e5f73e44c89952497d12e6f1d13342)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f92f6a315d8b89a7da65cb24f85edea2963ecbfe) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 24 Sep 2021 11:19:12 +0000 (12:19 +0100)]
Bug 29105: Add effective_itemtype handling to items api
This patch adds effective_item_type_id to the items api.
We overload the to_api method to append the effective_item_type_id field
with that of the effective itemtype code.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dc75b5d5cd181d8f8e50e98adb7afc69fc6a8838)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f00a28b576ed9c2efcff22f43f2261f7d9b6ef12) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 24 Sep 2021 14:13:55 +0000 (15:13 +0100)]
Bug 29105: Unit test
This patch adds a unit test for the addition of effective_item_type_id
to the items responses.
Test plan
1) Run the unit test prior to applying the second patch and confirm it
fails
2) Apply the second patch and confirm the unit test now passes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ca908816f2e56acced272f7fc56a0f68df62a43)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5974ff87c72aa4ae94578a930a2570c02225623b) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cef190f71c41948acfd63edf21bae3040fa67d83) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Fridolin Somers [Thu, 2 Jun 2022 06:24:03 +0000 (20:24 -1000)]
Bug 30882: Add max_result_window to index config
Elasticsearch number of results is by default limited by setting "index.max-result-window", default value is 10000.
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window
We use this setting:
https://git.koha-community.org/Koha-community/Koha/src/commit/44d6528b566e5c16eba9b15f8aa24667293766c3/Koha/SearchEngine/Elasticsearch/Search.pm#L411
I propose we add this setting in index config.
Test plan:
1) Use Elasticsearch
2) Apply patch and flush memcached
3) Rebuild indexes: misc/search_tools/rebuild_elasticsearch.pl -v -b -d
4) Check the settings of index (when using koha-testing-docker*):
curl 'es:9200/koha_kohadev_biblios/_settings?pretty&filter_path=**.max_result_window'
5) You should see:
"max_result_window" : "1000000"
* You also need to add this setting to the es section in koha-testing-docker's
docker-compose.yml (after the networks configuration):
ports:
- "9200:9300"
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 90ef5ec8c81b6010e6d7eafc6498bc2e6a9ca8f5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b041f75f7be1b6e2dfdf232d8ee3e776f77277f7) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Tue, 12 Jul 2022 18:10:54 +0000 (18:10 +0000)]
Bug 14680: Always subtract discount from price to calculate estimated cost
This patch simply removes a discrepancty where when a discount is provided on the order form
we add the discount to the price, and when it comes form the vendor we subtract the discount.
Discounts should always descrease the estimated cost
To test:
0 - Have a vendor with a discount of 10% specified
1 - Export a record from your Koha
2 - Stage the record for import and match on biblionumber
3 - Add to a basket in acq from the staged file
4 - Select the title, and set order price to $10 and do not fill the discount field
5 - Add the order - note $10 RRP and $9 actual/budgeted cost
6 - Repeat 2&3
7 - Select the tile, set price $10 and discount 50%
8 - Add the order - note $20 RRP and $10 actual/budgeted cost! FAIL
9 - Apply patch, restart all
10 - Repeat 2-7
11 - Add the order, note $10 RRP and $5 actual.budgeted cost
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c734c6903a823eeb58be9ab1c4af251def776b7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96eed0f5e00657808e506ba6d5e0a98a3529bf95) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 604da9beaaaaa90c875dfcc05261f45793b3fb7c) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Fri, 24 Jun 2022 08:20:52 +0000 (09:20 +0100)]
Bug 31036: Treat SIP00 that same as CASH
SIP00 is the code for CASH transactions that have taken place on a SIP
client. Cash management treats CASH type transactions as a special case
for banking and register requirements. This patch brings SIP00 in line
with the CASH handling code of cash management.
Test plan
1) Enable cash management with 'EnablePointOfSale'
2) Enable cash registers with 'UseCashRegisters'
3) Add a cash register via 'Administration > Cash registers'
4) Make some payments against the ash register in the staff client
5) Attempt to make a payment via a SIP client without having associated
a cash register to the SIP account config
5a) This should now fail
6) Attach the cash register to the SIP account used above
6a) Payment should now work again on SIP transactions
7) Look at the cash register details page for the cash register
7a) 'Bankale' should now include cash from both SIP and Staff client
sales
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d8be887d08f523171faa30b35ff86798c4b0115)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c3c889e7f4b440bcbac8ac0a3eb77e5cfe4c322a) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Bug 31137: Only display label printer profiles when editing labels
This patch filters the printer profiles in the label edition template so you may only choose Printer Profiles created for Labels.
To test
1 Create a new Printer Profile in Patron Cards
2 Edit a Label template, pick the Printer Profile you just created.
3 Save the Label Template. You get an error 500
4 apply patch, restart services
5 Edit a Label template and check that you can't pick the Printer Profile you created in Patron Cards
Martin Renvoize [Mon, 4 Jul 2022 12:14:45 +0000 (13:14 +0100)]
Bug 31129: Fix debarment count on circulation page
This patch was split from bug 23681 where QA identified the issue.
This patch fixes the debarment count displayed on the circulation page
tabs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6afcdbf48d9daacb24a3f0337a5cab5c7dbded7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87d7ded49074d997322a45ad1e1fd3dbc6e1338b) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Jonathan Druart [Tue, 12 Jul 2022 09:30:55 +0000 (11:30 +0200)]
Bug 31139: Fix basic_workflow.t
Error while executing command: element not interactable: Element <input id="tag_952_subfield_w_810691" class="input_marceditor items.replacementpricedate noEnterSubmit flatpickr-input" name="items.replacementpricedate" type="hidden"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.
Not sure if it's coming from bug 30717 or not. git bisect told me it was the culprit but we released 22.05 and it seems that we got basic_workflow.t green since then.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 083769164b9af4ab27db7dd16f60af960b3dbf28)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a0a459a0da7bc5cf72960c92f1f8569a8328e6c) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Tue, 12 Jul 2022 18:52:21 +0000 (18:52 +0000)]
Bug 31145: Supply defaults for vendors and funds
This is a convenience bug - when koha testing docker creates sample vendors and budgets there are small issues:
1 - The vendor website gets a random string - you can't edit the vendor without removing this
2 - The funds have random values for statistical categories, and you get empty dropdowns when choosing a fund in ordering
To test:
1 - Apply patch
2 - Restart all
3 - Edit 'My vendor'
4 - note webstie is empty and you can save without changing anythign
5 - Add order to basket for my vendor
6 - Confirm that when selecting a fund statistic 1 and statistic 2 remain as text input fields
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9d251e587cf05900a9527e28793f664c994c43c4) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kevin Carnes [Wed, 25 May 2022 09:19:21 +0000 (09:19 +0000)]
Bug 25669: (follow-up) Minor fixes
Bulk doesn't support include_type_name, update requirement to
Search::Elasticseach@6.80, and remove data type name from tests.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e926de5e8f359acf6b8beff541fe13ce2a5ac49e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 22c9ea9737d614a26b06092cda9708e27013e494) Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Nick Clemens [Mon, 28 Mar 2022 12:00:25 +0000 (12:00 +0000)]
Bug 25669: Use include_type_name parameter in ES calls
This patch includes the parameter:
include_type_name
on our ES calls
It removes the deprecation warning we are seeing, and should allow using ES7 with no other chnages.
For ES8 we will need to remove the hardcoded type,
I would suggest a second patch, with a new syspref "ElasticsearchLegacyType" set to 'True' by default.
Description can explain that this must be set to false, and data reindexed after upgrading to ES7 and before
upgrading to ES8 - then we can drop this pref when we drop ES7 support
When we drop ES6 support the pref can be set default true for upgrades, default 'false' for new installs
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 150a4b03f337f6a58869c67d3681caa64441d53a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 99757c2d975d224ea191622116e6eb839fff70c1) Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Martin Renvoize [Tue, 12 Jul 2022 10:22:36 +0000 (11:22 +0100)]
Bug 31141: Remove 'select_column' from waiting_holds.inc
In the only place we use the waiting_holds include, we were hard coded
to always pass the 'select_column' variable as true.
We can simply and clarify the logic by just removing this superflous
variable.
Test plan
1. Confirm that the waiting holds tables continue to display as expected
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f58099a2440a8482b09ae14df89c1cd6eb43c5d6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f0a70a271bda696b9e39b162faca1c504a980b8) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Kyle Hall [Mon, 27 Jun 2022 12:13:39 +0000 (08:13 -0400)]
Bug 31054: Manual importing for EDIFACT invoices fails with a 500 error page
Error in plack log is: Can't locate object method "new" via package
"Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin" (perhaps you
forgot to load "Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin"?)
at /usr/share/koha/lib/Koha/EDI.pm line 219.
Test Plan:
1) Set EdifactInvoiceImport to "Don't"
2) Configure an EDI vendor to use an EDIFACT plugin
3) Attempt to import an invoice file
4) You will be shown an error page
5) Apply this patch
6) Restart all the things!
7) Attempt to import another invoice file
8) It works!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 181b0c16feeb0645851aa586c59c1fd5de8e6053)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20a9c16e6b505d081f6875cce66fd2fb6ee66bbc) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>