]> git.koha-community.org Git - koha.git/log
koha.git
27 hours agoBug 37265: Consideration of UniqueItemFields setting when receiving items in an order main
Michał Dudzik [Mon, 8 Jul 2024 15:23:45 +0000 (17:23 +0200)]
Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order

When using the Koha acquisition module to receive items (basket receiving
an order), Koha does not consideration of UniqueItemFields setting.
The problem is that you can accidentally attach 3 items to an order with the same values.

Test plan:
1. Set preference UniqueItemFields: Public note (itemnotes)
2. Go to the acquisition module.
3. Create a basket with the option for 'Create items when:' set to receiving an order.
4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more.
5. Close the basket.
6. Receive the order.
7. Add a public note: TEST, and receive the first item (Add item).
8. You will see that the next item has the same public note.
9. Apply this patch and repeat step 7 - the public note is not used for the next note.

Sponsored-by: kohawbibliotece.pl
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37931: Adjustment for "show fewer" link
Jonathan Druart [Wed, 18 Sep 2024 09:06:18 +0000 (11:06 +0200)]
Bug 37931: Adjustment for "show fewer" link

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37931: Fix OPAC item type facet label
Lari Taskula [Mon, 16 Sep 2024 13:15:34 +0000 (13:15 +0000)]
Bug 37931: Fix OPAC item type facet label

To test:
1. Have additional language installed and set up for OPAC
2. Search something
3. Notice "Item types" facet label untranslated
4. Apply patch and make sure translations are updated
5. Observe facet label "Item types" translated
6. See patch [1] "Bug 36750: Fix some labels" in Bug 36750
7. Observe item type change missing for OPAC but present in staff client

[1] https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166289

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37430: (Bug 33407 follow-up) Unit tests
Nick Clemens [Wed, 12 Jun 2024 11:41:53 +0000 (11:41 +0000)]
Bug 37430: (Bug 33407 follow-up) Unit tests

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37430: (Bug 33407 follow-up) ISBD punctuation removal in ES searches
Janusz Kaczmarek [Mon, 22 Jul 2024 12:01:40 +0000 (12:01 +0000)]
Bug 37430: (Bug 33407 follow-up) ISBD punctuation removal in ES searches

Tiny adjustment for very special and malicious cases needed in
Koha::SearchEngine::Elasticsearch::QueryBuilder::clean_search_term.

Extended unit tests added following Nick's suggestions in
Bug 33407 discussion.

Test plan
=========
1. Use ktd with Elasticsearch and ktd's test data.
2. Edit the 4th record (The C programming language) and add a semicolon
   followed by a space before the slash in 245 $a to have:
   The C programming language ; /
3. Make a search for the first ISBD zone taken verbatim from the forth
   record:
   The C programming language ; / Brian W. Kernighan, Dennis M. Ritchie

   There should be no result.
4. Apply the patch, restart plack.
5. Repeat the search. You should get the record.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37446: DBRev 24.06.00.035
Martin Renvoize [Wed, 2 Oct 2024 09:40:06 +0000 (10:40 +0100)]
Bug 37446: DBRev 24.06.00.035

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 37446: Fix search facets for holding and home libraries
Aleisha Amohia [Thu, 29 Aug 2024 04:52:28 +0000 (04:52 +0000)]
Bug 37446: Fix search facets for holding and home libraries

This bug ensures that the facet labels for holdingbranch and homebranch are updated, regardless of how the DisplayLibraryFacets system preference is set.

To test:

1. Check out an earlier version of Koha, for example `git checkout v23.11.08-1`
2. Spin up your development environment with elasticsearch, for example `ktd --es7 up`
3. Once it's ready, go to the staff interface and search for the DisplayLibraryFacets system preference in Koha administration. Set to 'holding library' if not already.
4. Do a catalogue search, notice the facets on the side. "Holding libraries" should show as normal. There should be no facet for home libraries.
5. In your terminal, check out 24.05.x, for example `git checkout v24.05.03`
6. Run database updates to upgrade Koha, for example `sudo koha-upgrade-schema kohadev`, and restart services `restart_all`
7. Repeat step 4. Notice the error in the facets "homelibrary"

8. Apply patch from Bug 37446
9. Repeat step 6
10. Repeat step 4. This time the facet should read "Home libraries"

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 35087: (follow-up) Accept only values which will be saved correctly
Owen Leonard [Wed, 31 Jan 2024 16:47:34 +0000 (16:47 +0000)]
Bug 35087: (follow-up) Accept only values which will be saved correctly

This patch adds a regex (thanks to Katrin for the help) specific to the
range of values which will be accepted by the discount column in the
database which has the type "float(6,4)".

The patch also removes the format() filter from the template so that
values returned from the database won't be truncated:

Using "format ('%.1f')", a value in the db of '9.009' would appear in
the edit form as '9.0', a change which could be missed if the user was
editing some other field in the vendor edit form.

To test, apply the patch and clear your browser cache if necessary.

- Go to Acquisitions -> Vendors -> Edit vendor.
- Under "Ordering information," test entering various values in the
  "Discount" field. It should accept numbers with up to two digits
   before the decimal and up to three digits after the decimal:

   9, 99, -99, 99.9, 0.99, 99.99, 99.999

- In each of these cases, confirm that a value accepted by the
  client-side validation is also accepted when you submit the form and
  is correctly displayed when you edit that vendor again.

- It should not accept:

   100, 100.001, 100.00001

- The error message has been updated to read, "Please enter a decimal
  number in the format: 0.0"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
27 hours agoBug 35087: Discount rate only accepts a point as decimal separator
Thibaud Guillot [Thu, 18 Jan 2024 08:28:29 +0000 (09:28 +0100)]
Bug 35087: Discount rate only accepts a point as decimal separator

When a comma is used to define the discount rate of a vendor,
the data is not recorded (as NULL), it is however recorded if the
separator is a point.

Test plan:

1) Go to acqui module and edit a vendor
2) Set a discount rate with a comma as decimal separator
3) Edit again or request your database to see that there is no data
   saved
4) Do it again with a point as decimal and see it works
5) Apply this patch and reloard the build for the templates
 6) Repeat step 2 and see the warning to inform you that you must use a
    point

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37848: Fix "Run with template" dropdown menu style
Owen Leonard [Fri, 6 Sep 2024 11:42:09 +0000 (11:42 +0000)]
Bug 37848: Fix "Run with template" dropdown menu style

This patch adds the missing "dropdown-item" class to the "Run with
template" dropdown menu markup in order to correct the menu's style.

The patch also adds a template ID to the menu items' id attributes so
that we don't have duplicate IDs.

To test, apply the patch and go to Tools -> Notices.

(testing steps copied from Bug 36157)

1. Create a notice with the module of "Reports" -- add something to the
   "Print" section. Example from the other bug:

    [% FOREACH b IN data %]
      <div class="panel panel-default">
         <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
         <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
         <div class="panel-footer">ID: [% b.borrowernumber %]</div>
      </div>
    [% END %]

2. Create and run a saved report. Example from bug 36157:

    SELECT * FROM borrowers

3. Click on the "Run with template" dropdown and confirm that it is
   styled correctly.
4. Click to run the report with the template and confirm that it works
   correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 38000: Update imports
Pedro Amorim [Tue, 24 Sep 2024 14:25:11 +0000 (14:25 +0000)]
Bug 38000: Update imports

Noticed this while debugging a search related problem on a live server. This is cosmetic only.

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37967: DBRev 24.06.00.034
Martin Renvoize [Wed, 2 Oct 2024 09:26:27 +0000 (10:26 +0100)]
Bug 37967: DBRev 24.06.00.034

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37967: (QA follow-up) Add bug number/description and perltidy atomicupdate
Lucas Gass [Tue, 24 Sep 2024 19:33:44 +0000 (19:33 +0000)]
Bug 37967: (QA follow-up) Add bug number/description and perltidy atomicupdate

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37967: Allow auto renewals notices to be sent via phone
Kyle M Hall [Thu, 19 Sep 2024 18:31:56 +0000 (14:31 -0400)]
Bug 37967: Allow auto renewals notices to be sent via phone

Auto renewals via phone are only disallowed because itiva did not support them.
There is no reason to disallow auto-reneals for the generic phone transport.
Twilio, for example, would have no problem sending those phone notices.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Note you can now select phone for auto-renewals!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37928: Add missing dropdown-item class to "Upload image"
Jonathan Druart [Mon, 16 Sep 2024 10:26:49 +0000 (12:26 +0200)]
Bug 37928: Add missing dropdown-item class to "Upload image"

"Upload image" item not correctly styled

Test plan:
Go to the bib detail page with at least one item.
Open the action dropdown list and notice the "Upload image" is correctly
styled with this patch

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37362: Do not show the lists button if there are no public lists and opacuserlogi...
Owen Leonard [Wed, 4 Sep 2024 13:32:27 +0000 (13:32 +0000)]
Bug 37362: Do not show the lists button if there are no public lists and opacuserlogin is off

This patch updates the OPAC header so that if opacuserlogin is off and
there are no public shelves, the Lists button does not appear. If
opacuserlogin is turned off the only kind of lists the user can interact
with are public ones, and without public lists there's nothing to do.

To test, apply the patch and test the arrangement of the OPAC header in
these cases:

- opacuserlogin is on, user is logged in, and there are no public lists:
  - The Lists button appears and contains only "Your lists" menu items.
- opacuserlogin is on, user is logged in, and there are public lists:
  - The Lists button appears and the menu contains controls for both
    public and private lists.
- opacuserlogin is off and there are public lists:
  - The Lists button appears and shows only controls for public lists.
- opacuserlogin is off and there are no public lists:
  - The Lists button does not appear.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37807: Disable "Export today's checked in barcodes" when needed
Jonathan Druart [Mon, 2 Sep 2024 12:38:59 +0000 (14:38 +0200)]
Bug 37807: Disable "Export today's checked in barcodes" when needed

If patron has privacy==2 ("Never: Delete my history immediately"), the "Export today's checked in barcodes" button is supposed to be disabled, with a tooltip with an explanation, but it is not.

Test plan:
Turn on OpacPrivacy and select "Never" in your privacy settings (OPAC)
Go to the circulation page for this patron (staff) and notice that the
export button (under "More") is disabled and has a tooltip when the
mouse hover it.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37730: Batch patron modification header scroll
Chloe Zermatten [Mon, 30 Sep 2024 15:03:23 +0000 (15:03 +0000)]
Bug 37730: Batch patron modification header scroll

When scroling down <staff_url>/cgi-bin/koha/tools/modborrowers.pl,
there is a point where the table header leaves the normal flow of
the page to stick to the top of the screen instead. When this
occurs, the header becomes fixed: if scrolling through the table
horizontally, only the body will move. This is an issue as it means
that in this situation, some column headers cannot be viewed and the
data does not necessarily match the header under which it is found.

This patch resolves this issue by allowing the header to scroll
horizontally and ensuring that the width of the column headers
still match that of the columns themselves.

Test plan:

A) Reproduce the bug as per Pedro's intructions:

***
1) Visit "batch patron modification":
<staff_url>/cgi-bin/koha/tools/modborrowers.pl
2) Enter multiple cardnumbers, in k-t-d you may use these:
23529000104159
23529000120056
23529000714163
23529000651225
23529000445172
23529000105040
23529000224510
23529000591678
3) Press "Continue"
4) Scroll down the page enough that the table headers row becomes
   "detached"
   and sticks to the top of the page as you scroll down.
5) Scroll the table horizontally. Notice the headers are stuck even
   though
   the data columns have moved horizontally, causing the headers and
data to
   not match.
***

B) Apply the patch
C) Go through steps 1-5 again. This time, notice that the header scrolls
   along with the table body and that the column headers and data always
match.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37810: (QA follow-up) Tidy
Nick Clemens [Tue, 1 Oct 2024 14:05:56 +0000 (14:05 +0000)]
Bug 37810: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37810: Consider ServiceActive on status response
Pedro Amorim [Mon, 2 Sep 2024 14:51:31 +0000 (14:51 +0000)]
Bug 37810: Consider ServiceActive on status response

Some SUSHI providers return ServiceActive instead of the documented Service_Active:
https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status

This ensures the test connection does not fail regardless of what is used

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37810: Add test
Pedro Amorim [Thu, 19 Sep 2024 12:36:54 +0000 (12:36 +0000)]
Bug 37810: Add test

Test plan:
1) Apply only tests patch, run:
prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t
2) Verify tests fail
3) Apply fix patch
4) Run tests again, verify they pass

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37891: (QA follow-up): Fix tt_valid QA test
Pedro Amorim [Mon, 30 Sep 2024 13:47:06 +0000 (13:47 +0000)]
Bug 37891: (QA follow-up): Fix tt_valid QA test

1) Apply both patches
2) $ qa -c 2 -v 2

Amended-by: Jonathan Druart
Add the different attribute at the end of the node so that we can easily
see what's different between the two lines

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 37891: Submit SMS related data even if SMSSendDriver is empty.
Pedro Amorim [Wed, 11 Sep 2024 10:40:17 +0000 (10:40 +0000)]
Bug 37891: Submit SMS related data even if SMSSendDriver is empty.

The bug is caused by the SMS data not being submitted as its fieldset is disabled if SMSSendDriver is empty.
This causes the SMS instance of the notice to not be updated when the edit happens, becoming out of sync.
Once it becomes out of sync with the other notices of same code but different transport_type, the 'GROUP BY branchcode,module,code,name,branchname' in letter.pl will fail, as the name no longer matches, listing the same notice twice on the notices table.

This patch updates the logic on the template to have the SMS input elements be disabled/readonly instead of having disabled='disabled' on the SMS fieldset.
This keeps the same functionality i.e. staff member is unable to edit SMS notice if SMSSendDriver is disabled, but ensures that SMS related data is submitted to the controller when the notice edit save happens.

Test plan:
1) Visit notices and slips:
  <staff_url>/cgi-bin/koha/tools/letter.pl
2) Search for a notice code e.g. 'ILL_REQUEST_UPDATE'.
3) Notice only one result is returned. Click 'Edit'.
4) Edit the 'Name'. Click 'Save'.
5) Repeat 2. Notice two results are now returned.
6) Apply patch. Repeat test plan. Notice only one result is returned at the end.

Signed-off-by: Jason Robb <jrobb@sekls.org>
Amended-by: Jonathan Druart
Align

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
28 hours agoBug 38035: Exclude "sound" from the list of installed languages
Jonathan Druart [Mon, 30 Sep 2024 14:46:38 +0000 (16:46 +0200)]
Bug 38035: Exclude "sound" from the list of installed languages

Not sure how this is coming from, neither why we have not noticed that
before, but "sound" is listed under `koha-translate --list`

It's coming from `ls koha-tmpl/intranet-tmpl/prog`

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 36594: (RM follow-up) Add new filter to filters test
Martin Renvoize [Mon, 30 Sep 2024 17:21:13 +0000 (18:21 +0100)]
Bug 36594: (RM follow-up) Add new filter to filters test

This is the patch I meant to write before pushing but brain fade failed
me.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 35655: (follow-up) Fix perlcritic error
Tomas Cohen Arazi [Mon, 30 Sep 2024 16:52:21 +0000 (13:52 -0300)]
Bug 35655: (follow-up) Fix perlcritic error

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 days agoBug 35655: DBRev 24.06.00.033
Tomas Cohen Arazi [Mon, 30 Sep 2024 15:47:19 +0000 (12:47 -0300)]
Bug 35655: DBRev 24.06.00.033

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 days agoBug 37871: Remove extraneous 246 subfields from the title mappings (Elasticsearch...
Caroline Cyr La Rose [Fri, 13 Sep 2024 16:33:22 +0000 (12:33 -0400)]
Bug 37871: Remove extraneous 246 subfields from the title mappings (Elasticsearch, MARC21)

This patch limits indexing of field 246 to $a, $b, $n, and $p in
various title indexes.
Previously, all 246 subfields were indexed, including non-title
subfields such as $i (Display text), $g (Miscellaneous information),
and linking subfields, making the title index very large and giving
false results.

To test:

1. Add all the 246 subfields to the default bibliographic framework
   1.1. Go to Administration > MARC bibliographic framework
   1.2. Click Actions > MARC structure next to the Default framework
   1.3. Search for 246
   1.4. Click Actions > Edit subfields
   1.5. For each subfield, make sure Editor is checked
   1.6. Click Save changes

2. Create a new record and fill out all the 246 subfields
   2.1. Go to Cataloging
   2.2. Click New record
   2.3. Fill out the mandatory fields (000, 003, 005, 008, 040$c,
        245$a, 942$c)
   2.4. Fill out all the subfields in 246 (I simply write the name of
        the subfield in the text field e.g. Display text in 246$i)
   2.5. Click Save
   2.6. Click Normal to access the detailed record

3. View the Elastic search record
   --> All the subfields (including "Display text", "Miscellaneous
       information" and other non-title subfields) should be indexed in
       - title
       - title__suggestion
       - title-abbreviated
       - title-abbreviated__sort
       - title expanded
       - title-expanded__sort
       - title-former
       - title-former__sort

4. Make a title or keyword search for "Display" (or whatever you wrote
   in 246$i)
   --> Your record should be in the results

5. Apply patch

6. Rebuild the index using -r

koha-elasticsearch --rebuild -d -r -v kohadev

7. Redo step 3
   --> Only 246 $a, $b, $n, and $p should be indexed

8. Redo step 4
   --> Your record should NOT be in the results

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 35655: Add unit tests
Kyle M Hall [Thu, 26 Sep 2024 19:16:44 +0000 (15:16 -0400)]
Bug 35655: Add unit tests

Add the ability to specify STOMP connection info via environment
variables and utilize those in unit tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 35655: Only use STOMP if JobsNotificationMethod set to do so
Tomas Cohen Arazi [Thu, 12 Sep 2024 14:14:22 +0000 (11:14 -0300)]
Bug 35655: Only use STOMP if JobsNotificationMethod set to do so

This patch makes the background jobs (jobs from now on) connect step not
try to connect to the STOMP broker, unless explicitly told to do so.

This is achieved by using a newly introduced system preference
`JobsNotificationMethod` which falls back to STOMP if undefined.

The "about" page now has 3 states for

+ Message broker:  Using SQL polling
+ Message broker:  Using SQL polling (Fallback, Error connecting to RabbitMQ)
+ Message broker:  Using RabbitMQ

The goal for this patch is to stop flooding the logs on very busy sites
when Rabbit is not being used. This shouldn't predate any efforts on
making the STOMP based jobs brokering mechanism solid and usable.

To test:
1. On clean `main`, run:
   $ ktd --shell
2. Open the logs on a separate terminal:
   $ ktd --shell
  k$ tail -f /var/log/koha/kohadev/*.log
3. Stage some MARC for import
=> SUCCESS: No warnings about STOMP
4. Import the staged records
=> SUCCESS: No warnings about STOMP
5. Stop rabbitmq:
  k$ sudo service rabbitmq-server stop
6. Repeat 2-4
=> FAIL: The logs say it couldn't connect to STOMP
7. Apply this patches and run:
  k$ restart_all
8a. See the "about" page, should read:
    Message broker: Using SQL polling (Fallback, Error connecting to RabbitMQ)
8b. Repeat 2-4
    should work with one warning in the
9. Start rabbit:
  k$ sudo service rabbitmq-server start
  k$ restart_all (not really necessary)
10a. See the "about" page, should read:
    Message broker:  Using RabbitMQ
10b. Repeat 2-4
=> SUCCESS: No warnings about STOMP
11. Change the `JobsNotificationMethod` system preference to *polling*
   and stop rabbit:
  k$ sudo service rabbitmq-server stop
  k$ restart_all
12a. See the "about" page, should read:
Message broker:  Using SQL polling
12b. Repeat 2-4
=> SUCCESS: No warnings about STOMP, not even on startup
13. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 35655: Add 'JobsNotificationMethod' system preference
Tomas Cohen Arazi [Thu, 12 Sep 2024 14:09:11 +0000 (11:09 -0300)]
Bug 35655: Add 'JobsNotificationMethod' system preference

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37525: [SCO] Regression in 32256: "Return this item" doesn't show up despite...
Oliver Behnke [Tue, 20 Aug 2024 16:37:36 +0000 (19:37 +0300)]
Bug 37525: [SCO] Regression in 32256: "Return this item" doesn't show up despite SCOAllowCheckin being allowed

There's a regression in bug 32256 and commit bb059abe respectively:

https://gitlab.com/koha-community/Koha/-/commit/bb059abe90#a22dc682a84c41672294c66e441329a451b5cd5a_137_137

The refactoring of "renew" -> "c.renew" missed this line (at least), so the condition is never met.

This fixes the issue and restores the original functionality.

Test plan:
1. log in with a patron at http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
2. check out an item
3. scan it again
4. see that the "return this item" choice isn't proposed. This is the
   bug
5. apply patches
6. rescan the item in the self-check out
7. returning is proposed
8. check it in and confirms that it's not checked out anymore

Signed-off-by: Oliver Behnke <oliver.behnke@aei.mpg.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37369: Fix filtering of search result table in item search
Emmi Takkinen [Thu, 26 Sep 2024 05:22:13 +0000 (08:22 +0300)]
Bug 37369: Fix filtering of search result table in item search

At the moment, the filtering on item results page
requires using the code in the following fields:
- Collection
- Home library
- Current library
- Shelving location
- Itemtype
- item status -fields (not for loan etc)

So e.g. "Centerville" in Home library -field doesn't
bring back results but code "CPL" does. This happens
because "columns" option in search results table
isn't working when its used in function columnFilter.
However option "aoColumns" works.

To test:
1. Navigate to item search and search items.
=> Note that all filters in search result table
are free text fields.
2. Attempt to filter search results by home library
with description of some library.
=> No results are displayed.
3. Now filter results with code of the library.
=> Results are now displayed.
4. Apply this patch and refresh page.
5. Search items again.
=> Note that now some of the filters are now using
dropdown select fields.
6. Attempt to filter results by home library again.
=> Results are now displayed correctly.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Olivier Hubert <olivier.hubert@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 26929: Fetching macros for Advanced Editor should ignore default pagesize
Phil Ringnalda [Fri, 13 Sep 2024 23:52:05 +0000 (16:52 -0700)]
Bug 26929: Fetching macros for Advanced Editor should ignore default pagesize

The REST API has a default page size of 20, controlled by the preference
RESTdefaultPageSize. That's fine for things that are fetched to display
in pages of 20, but for things like macros in the Advanced Editor that
don't implement paging, it's awkward, since when you create your 21st
macro, it disappears the next time you open the editor.

The Advanced Editor should instead disable paging by passing the param
_per_page=-1

Test plan:

1. Set the preference EnableAdvancedCatalogingEditor to Enable. While you
   are there, set the preference RESTdefaultPageSize to 2, so you don't have
   to create 21 macros to see one disappear
2. Cataloging - Advanced editor - Macros
3. Click New macro..., give it the name 1, then repeat for 2 and 3
4. You have a list of macros open with all three listed, so far so good.
   Refresh the browser page and reopen Macros. You now have two macros
5. Apply patch, refresh the page, reopen Macros. You now have three macros
6. You should probably reset that RESTdefaultPageSize back to 20 if you
   aren't about to reset ktd

Sponsored-by: Chetco Community Public Library
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 36594: Library hours in koha/admin/branches.pl now adhere to selected time and...
CJ Lynce [Fri, 6 Sep 2024 20:51:38 +0000 (20:51 +0000)]
Bug 36594: Library hours in koha/admin/branches.pl now adhere to selected time and calendar system preferences.

-Newly created or edited libraries no longer display 'null' for undefined
open and close times.
-Libraries without any defined hours will state such instead of displaying the
hours table.
-The CalendarFirstDayOfWeek system preferences is now respected when viewing
a library with defined hours.
-Time displays and inputs now follow the TimeFormat system preference.
-Times are no longer displayed with seconds.

As part of this patch, a new Template Filter, KohaTimes, has been added to
allow for proper formatting of time strings based on systems preferences.

To Test:
1. Login to staff interface
2. Go to Koha administration > Basic parameters > Libraries
3. Edit any library or create a new library. Do not set hours.
4. Save the library.
*Note that on the library list, in the hours column, all days are displayed
with 'null'.
5. Edit or create a 2nd library.
6. Try to manually enter a time (not using the flatpickr modal)
*Note that the mask wants a date format, not a time format.
7. Set some hours for the library, leaving at least one
day without hours. Save.
*Note that in the library list, in the hours column, defined times are in
the format HH:MM:SS.
7. Edit the system preference CalendarFirstDayOfWeek to set a day other
than Sunday as the first day of the week.
8. Return to Koha administration > Basic parameters > Libraries
9. Click on the name of a specific library with hours to view details.
*Note that the order of the calendar weeek still starts with Sunday.
10. The order of the calendar week still starts with Sunday.
11. Edit the system preference TimeFormat and set to 12-hours.
12. Return to Koha administration > Basic parameters > Libraries.
*Note that the time format on the branches list is not in 12-hour format.
13. Click on the name of a specific library with hours to view details.
*Note that the time format in the branch details screen is not in 12-hour
format.

14. Apply Patch.

15. Return to Koha administration > Basic parameters > Libraries
16. Verify that your library with all undefined times shows "Library hours
not set".
17. Verify that your library with defined hours is showing times in HH:MM
format, and days without defined hours are blank.
18. Verify that your library with defined hours is respecting the TimeFormat
preferences.
19. Click on the name of a library with hours to view details.
20. Verify that the hours respect the CalendarFirstDayOfWeek and TimeFormat
preferences.
21. Click on the name of another library without hours to view details.
Verify these libraries show as "No opening hours have been set"
in the branch detail view.
22. Edit a library's hours. When inputing, try to manually enter a time (not
using the flatpickr modal). Verify that you can enter time in the proper
(12 or 24 hours) format.

Sponsored-by: Westlake Porter Public Library
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37983: Restore auto-focus on patron input when "Schedule a pickup" is selected
Jonathan Druart [Mon, 23 Sep 2024 10:07:20 +0000 (12:07 +0200)]
Bug 37983: Restore auto-focus on patron input when "Schedule a pickup" is selected

In the curbside pickup module, when the "Schedule a pickup" tab is selected we expect
the patron search box to get the focus. But it has been broken bug 30965 (which changed the id of the input).

Test plan:
Setup curbside pickup for your library
Go to Circulation > Curbside pickups
Click the last tab
Notice that you can directly search for a patron, the input has the
focus

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37964: Add units test
Fridolin Somers [Thu, 19 Sep 2024 14:44:07 +0000 (16:44 +0200)]
Bug 37964: Add units test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Amended-by: Jonathan Druart
Tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled
Fridolin Somers [Thu, 19 Sep 2024 14:23:49 +0000 (16:23 +0200)]
Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled

After Bug 33496, host items are displayed even when system preference EasyAnalyticalRecords is disabled.

Test plan :
1) Build an analytical record with 773$0 and $9
2) Enable 'EasyAnalyticalRecords'
3) Go to catalogue details page
=> You see the linked item
4) Disable EasyAnalyticalRecords
5) Go to catalogue details page
=> You dont see the linked item

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37982: Replace edit form with GET
Jonathan Druart [Mon, 23 Sep 2024 09:13:45 +0000 (11:13 +0200)]
Bug 37982: Replace edit form with GET

Caught by tests from bug 37728

 # $VAR3 = 'koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt:158';

We don't really need the form to be POSTed, we should not reach the URL maxlength.
The UI will certainly explode if there are lot of items to edit anyway.
The code is not clear on this page as we are sending several forms using
the items selected from this table. But this one form is used to display
the edit form and so can be GET (and better as the URL can be shared).
The other actions have their own form (in modals mostly).

Test plan:
Create a subscription and go to the serial collection page.
Make sure at least one item is select and click the "Edit" button.
No behaviour change expected here, the edit form should still be
displayed.
Try the other actions on top of the table and confirm they are still
working as before.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37981: Switch installer/step3.tt form from POST to GET
Jonathan Druart [Mon, 23 Sep 2024 09:03:33 +0000 (11:03 +0200)]
Bug 37981: Switch installer/step3.tt form from POST to GET

This form does not need to be a POSTed form.

Test plan:
Drop and recreate the DB and run the web installer.
Everything should work, no behaviour change expected.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37328: Cannot delete report after using Update and Run SQL button
CJ Lynce [Thu, 29 Aug 2024 15:07:05 +0000 (15:07 +0000)]
Bug 37328: Cannot delete report after using Update and Run SQL button

Fixes the ability to delete a report from the report toolbar menu after running
the report, including displaying the delete confirm modal.

To test:
1) Login to staff client
2) Navigate to Reports -> Create from SQL
3) Create a short report (SELECT * FROM items), name it and SAVE it.
4) On the resulting "Edit SQL report' page, click 'Update and run SQL'
5) On the toolbar, click Edit -> Delete
Nothing happens
6) Apply patch
7) Return to Reports -> Saved Reports and Edit the report you created.
8) On "Edit SQL report' page, click 'Update and run SQL'
9) On the toolbar, click Edit -> Delete
10) Confirm the delete modal.
The report is now deleted.

Sponsored-by: Westlake Porter Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 33635: Add BOM to report exports as CSV
Martin Renvoize [Wed, 18 Sep 2024 04:42:41 +0000 (05:42 +0100)]
Bug 33635: Add BOM to report exports as CSV

When you export a report as CSV excel will not recognise that it's
encoding is utf-8 unless there is a correct Byte Order Mark prepended to
the file.

This patch adds such a BOM to the output file allowing Excel to treat
the file correctly.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 35442: Script migration_tools/build_oai_sets.pl add ORDER BY
Fridolin Somers [Wed, 29 Nov 2023 19:53:03 +0000 (09:53 -1000)]
Bug 35442: Script migration_tools/build_oai_sets.pl add ORDER BY

Script migration_tools/build_oai_sets.pl is missing ORDER BY
biblionumber.
This is a problem when using OFFSET and LIMIT, the results may be
differenly orderder between two calls of this script.

Test plan :
1) Create a OAI SET with all records
2) Run migration_tools/build_oai_sets.pl with the first half of records
3) Run migration_tools/build_oai_sets.pl with the second half of records
4) Check all records are in the OAI set

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 36083: (follow-up) add USE Branches for html customizations
Brendan Lawlor [Thu, 22 Aug 2024 19:52:23 +0000 (19:52 +0000)]
Bug 36083: (follow-up) add USE Branches for html customizations

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 36083: Fix HTML additional contents for the logged in branchcode
Brendan Lawlor [Thu, 22 Aug 2024 16:39:55 +0000 (16:39 +0000)]
Bug 36083: Fix HTML additional contents for the logged in branchcode

This patch updates the calls to AdditionalContents.get() to use
Branches.GetLoggedInBranchcode instead of the logged in users
homebranch for the library parameter.

To test:
1. In Tools > HTML Customizations
2. Choose to create an entry in StaffAcquisitionsHome
3. Assign it to a specific library
   It's helpful to test with libraries other than Centerville
4. Add text and publication date (important or it will never display)
5. Save
6. Go to the Acquisitions Home page - logged into that library, no text displays.
7. Apply patch and refresh browser
8. Notice the library specifc content displays
9. Notice content created for all libraries still displays too
10. Test HTML content for specific libraries works on all 8 pages
    IntranetmainUserBlock
    Staff AcquisitionsHome
    StaffAuthoritiesHome
    StaffCataloguing Home
    StaffListsHome
    StaffPatronsHome
    StaffPOSHome
    StaffSerialsHome

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 36049: Fix price rounding
Raphael Straub [Thu, 8 Feb 2024 14:17:56 +0000 (14:17 +0000)]
Bug 36049: Fix price rounding

This patch only fixes price rounding by using Math::BigFloat.

To test:
0) Enable syspref OrderPriceRounding
1) Create an order line in acquisitions with vendor price 18.90 and a
   discount of 5 %.
2) Verify that the total (tax excl.) in the order table on the basket
   page is 17.95.
3) Apply the patch.
4) Reload the basket page.
5) Verify that the total (tax excl.) in the order table on the basket
   page now is 17.96, which is correct.
6) Run: prove t/Number/Price.t

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 36049: Add unit test
Raphael Straub [Thu, 8 Feb 2024 14:17:56 +0000 (14:17 +0000)]
Bug 36049: Add unit test

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37961: Inventory problem resolution fails by POSTing without an op or csrf_token
Phil Ringnalda [Thu, 19 Sep 2024 04:01:56 +0000 (21:01 -0700)]
Bug 37961: Inventory problem resolution fails by POSTing without an op or csrf_token

After you upload a file or textarea of barcodes to inventory, the next step is
a list of the things that were missing, with checkboxes to check when you find
them, and buttons to Mark seen, which send a POST to
/cgi-bin/koha/tools/ajax-inventory.pl without an op param (since it doesn't
have an $op) and without a csrf_token, so the POST fails with a 403.

Test plan:
 1. Without the patch, Cataloging - Inventory - in Item location filters
    set Library to Centerville, Shelving location to Audio visual, Collection
    code to Reference, and in Optional filters for inventory list or comparing
    barcodes set Last inventory date to today.
 2. Click Submit, and you'll have a table of 23 items. Check the checkbox for
    the first item, click Mark seen and continue
 3. What was supposed to happen was that you would be taken to the next
    page, but instead you are still in the same page, and if you had the
    browser console open, you would have seen that you sent a POST to
    ajax-inventory.pl, and got a 403 error in response
 4. Apply patch, restart_all
 5. Repeat step 1 and 2, this time getting to the second page. Check the
    checkboxes for the last two items, and click Mark seen and quit
 6. Repeat step 1 and click Submit. You should now have only 20 items, since
    the three you checked now have a Last inventory date of today.

Yeah, when you did Mark seen and continue they ought to have been removed from
the list, I agree. I had to go back to 23.11.x and make sure that was really
how it was supposed to function, but that is the existing behavior. Even
though they get marked as seen, nothing changes about your list until you quit
and go back to it. Maybe because then something that wasn't on the current
page would have moved there. Another bug.

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 days agoBug 37959: Correct bug number mistake
Martin Renvoize [Mon, 30 Sep 2024 14:20:32 +0000 (15:20 +0100)]
Bug 37959: Correct bug number mistake

The commit for this bug number contained a typo ;P

5 days agoBug 37856: Add new test to test platform is correctly added to build_url
Pedro Amorim [Fri, 27 Sep 2024 18:42:58 +0000 (18:42 +0000)]
Bug 37856: Add new test to test platform is correctly added to build_url

prove t/db\_dependent/Koha/ERM/EUsage/UsageDataProvider.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: Fix existing test
Pedro Amorim [Fri, 27 Sep 2024 18:42:29 +0000 (18:42 +0000)]
Bug 37856: Fix existing test

A service_platform value was being randomly to 'service_platform' as is a new attribute.
Assign undef to that to fix existing test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37526: (QA follow-up) Tidy
Nick Clemens [Thu, 26 Sep 2024 19:53:28 +0000 (19:53 +0000)]
Bug 37526: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37526: Handle redirects in SUSHI requests
Matt Blenkinsop [Tue, 30 Jul 2024 12:54:14 +0000 (12:54 +0000)]
Bug 37526: Handle redirects in SUSHI requests

Test plan:
1) Apply test patch only. Run:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail.
3) Apply this patch. Run tests again. Verify they pass.

PA amended: Added test plan

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37526: Add tests
Pedro Amorim [Thu, 19 Sep 2024 14:28:47 +0000 (14:28 +0000)]
Bug 37526: Add tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: DBIC schema update
Katrin Fischer [Fri, 27 Sep 2024 15:58:26 +0000 (15:58 +0000)]
Bug 37856: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: DBRev 24.06.00.032
Katrin Fischer [Fri, 27 Sep 2024 15:57:49 +0000 (15:57 +0000)]
Bug 37856: DBRev 24.06.00.032

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: (QA follow-up) Tidy
Nick Clemens [Thu, 26 Sep 2024 19:20:15 +0000 (19:20 +0000)]
Bug 37856: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: Add tests
Pedro Amorim [Thu, 19 Sep 2024 14:03:40 +0000 (14:03 +0000)]
Bug 37856: Add tests

This is using the groundwork from bug 37963.
This is testing the specific error this bug is addressing:
Required parameter Platform is missing

It is also testing that the error message is correctly shown as a background
job report message to the user

Test plan:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: Consider absence of 'Report_Items'
Pedro Amorim [Thu, 19 Sep 2024 14:00:41 +0000 (14:00 +0000)]
Bug 37856: Consider absence of 'Report_Items'

The SUSHI provider in question for this patchset also does not return any
Report_Items entry. This patch accounts for that.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: Consider 'Exceptions' not being part of 'Report_Header'
Pedro Amorim [Thu, 19 Sep 2024 13:55:48 +0000 (13:55 +0000)]
Bug 37856: Consider 'Exceptions' not being part of 'Report_Header'

When fixing the issue around the missing platform parameter, we
noticed this particular provider also returns 'Exceptions' as
its own thing, not part of 'Report_Header', despite documentation:
https://countermetrics.stoplight.io/docs/counter-sushi-api/7cp0h7n1hm2en-tr-j1-journal-requests-controlled

From the link above, search for 'Exceptions'. Notice it should be under 'Report_Header'.
Either way, this patch accounts for this possibility.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: Add service_platform field
Pedro Amorim [Wed, 18 Sep 2024 15:56:19 +0000 (15:56 +0000)]
Bug 37856: Add service_platform field

The change from this patch itself should be self-explanatory.
Testing for this requires credentials to a specific provider.
But the parameter is only added to the URL if defined.

Test plan, ktd, apply patch, run:
$ yarn js:build
$ yarn api:bundle
$ koha-plack --restart kohadev

1) Enable ERMModule
2) Create a new provider, visit:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/add
3) Ensure 'Service platform' now shows. Create the provider and put something in this field.
4) View the provider, ensure the field is shown, visit:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/1

Ensure all tests are still passing:
$ cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts
$ prove t/db_dependent/api/v1/erm_usage_*

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: atomicupdate
Pedro Amorim [Wed, 18 Sep 2024 15:57:43 +0000 (15:57 +0000)]
Bug 37856: atomicupdate

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37856: Append platform parameter to SUSHI url if defined
Pedro Amorim [Wed, 18 Sep 2024 15:55:51 +0000 (15:55 +0000)]
Bug 37856: Append platform parameter to SUSHI url if defined

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37963: (QA follow-up) Tidy
Nick Clemens [Thu, 26 Sep 2024 18:34:35 +0000 (18:34 +0000)]
Bug 37963: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37963: Case 2 - Consider providers returning error messages lower cased
Pedro Amorim [Thu, 19 Sep 2024 13:49:10 +0000 (13:49 +0000)]
Bug 37963: Case 2 - Consider providers returning error messages lower cased

Test plan:
1) Apply only test patch for case 1. Run tests:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail. Apply the other patch for case 1.
3) Run tests again. Verify they now pass.
4) Repeat the test plan but using patches for case 2

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37963: Case 2 - Add tests for different case error message
Pedro Amorim [Thu, 19 Sep 2024 13:49:58 +0000 (13:49 +0000)]
Bug 37963: Case 2 - Add tests for different case error message

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37963: Case 1 - Return if sushi_errors even if response code >= 400
Pedro Amorim [Thu, 19 Sep 2024 13:39:07 +0000 (13:39 +0000)]
Bug 37963: Case 1 - Return if sushi_errors even if response code >= 400

This ensures that SUSHI errors, if present, are shown on the UI even if
response->code >= 400.
This means that if, for example, SUSHI provider returns 401 with SUSHI
error like so:
{"Code": 2020, "Severity": "Error", "Message": "API Key Invalid"}

Then, the 'API Key Invalid' will be shown to the user, without having to
check logs.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37963: Case 1 - Add tests for invalid api key use case
Pedro Amorim [Thu, 19 Sep 2024 13:45:59 +0000 (13:45 +0000)]
Bug 37963: Case 1 - Add tests for invalid api key use case

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37483: Use cud-list for extend due dates tool
Nick Clemens [Tue, 17 Sep 2024 12:14:23 +0000 (12:14 +0000)]
Bug 37483: Use cud-list for extend due dates tool

This patch switch the check in the script to 'cud-list' - we use the same form
submission if listing for preview or directly updating dates, so this may or may
not be a cud- action - assuming it is restores script functionality.

See bug 37941 for updating forms to not share actions

To test:
1 - Checkout some items to patrons of at least two libraries
2 - Tools -> Batch extend due dates
3 - Select nothing except 'preview' and submit
4 - Blank screen
5 - Apply patch, repeat
6 - It works!
7 - Filter by library and confirm it still works
8 - Sign off!

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default"
Jonathan Druart [Thu, 19 Sep 2024 07:13:21 +0000 (09:13 +0200)]
Bug 37947: (bug 37429 follow-up) Fix addbiblio and frameworkcode="Default"

On bug 37429 we reordered the global var to assign them before anything
else. The logic is correct except for $frameworkcode, we want to do some
processings (like defaulting to "" if eq "Default") BEFORE we retrieve
the MARC structure ($tagslib, $usedTagsLib).

This patch also moved this code after get_template_and_user (and so
authentication), like it should be everywhere.

Test plan:
1. Go to Cataloging
2. Click on New from Z39.50/SRU
3. Make a search in the library of congress server for anything (Caroline searched for author: shakespeare)
4. Click on one of the results and choose Import
Without this patch the basic editor appears, but not the record
With this patch applied the bug is fixed and you can edit the record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37979: Toggling item circulation alerts table cells needs to send csrf_token
Phil Ringnalda [Thu, 19 Sep 2024 02:41:50 +0000 (19:41 -0700)]
Bug 37979: Toggling item circulation alerts table cells needs to send csrf_token

When you click on a cell in the Item circulation alerts table, the page sends
a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a
csrf_token, which gets back a 403 error because that's sketchy behavior. It
needs to include the token.

Test plan:
1. Administration - Item circulation alerts
2. Open the browser devtools to the console
3. Click on any green table cell
4. It should have turned red, but instead your console turned red with a 403
5. Apply patch, reload
6. Click on any green table cell, it will turn red

Sponsored-by: Chetco Community Public Library
https://bugs.koha-community.org/show_bug.cgi?id=37959
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: Capitalization fixes in system preference descriptions
Katrin Fischer [Fri, 27 Sep 2024 15:15:48 +0000 (15:15 +0000)]
Bug 23685: Capitalization fixes in system preference descriptions

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: DBRev 24.06.00.031
Katrin Fischer [Fri, 27 Sep 2024 15:07:51 +0000 (15:07 +0000)]
Bug 23685: DBRev 24.06.00.031

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: (follow-up) Control ODS exporting
Marcel de Rooy [Fri, 6 Sep 2024 09:32:11 +0000 (09:32 +0000)]
Bug 23685: (follow-up) Control ODS exporting

The pref ReportsExportFormatODS should be true for exporting
to ODS in Reporting.

Test plan:
Set pref to false value.
Check if option is no longer available on report's Download menu.
Manipulate URL with op=export&format=ods. No data expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: (follow-up) Add export limit for guided reports
Marcel de Rooy [Fri, 6 Sep 2024 09:29:39 +0000 (09:29 +0000)]
Bug 23685: (follow-up) Add export limit for guided reports

Test plan:
Set pref ReportsExportLimit to some positive integer.
Test if exporting a report respects that limit.
Run t/db_dependent/Koha/Reports.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: (follow-up) Add prefs to Administration form
Marcel de Rooy [Fri, 6 Sep 2024 10:06:33 +0000 (10:06 +0000)]
Bug 23685: (follow-up) Add prefs to Administration form

Test plan:
Edit both prefs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: (follow-up) Dbrev for new preferences
Marcel de Rooy [Fri, 6 Sep 2024 09:58:18 +0000 (09:58 +0000)]
Bug 23685: (follow-up) Dbrev for new preferences

Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 23685: Don't store ODS content in a variable to save memory
Aleisha Amohia [Tue, 25 Jun 2024 21:43:22 +0000 (21:43 +0000)]
Bug 23685: Don't store ODS content in a variable to save memory

Just attaching this to start.

Sponsored-by: Waikato Institute of Technology
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37824: remove references to non-existent files in Makefile.PL
Mason James [Tue, 24 Sep 2024 00:47:26 +0000 (12:47 +1200)]
Bug 37824: remove references to non-existent files in Makefile.PL

to test...

0/ install debhelper tool

1/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe failure
    make: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js.LICENSE.txt', needed by 'pm_to_blib'.  Stop.
    dh_auto_build: error: make -j1 returned exit code 2

2/ apply patch

3/ run 'DEB_BUILD_OPTIONS=nocheck dh build', observe success

Signed-off-by: Blou <blou@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
13 days agoBug 37812: (QA follow-up) Add watchers for warning and confirmation prop and initiali...
Paul Derscheid [Thu, 19 Sep 2024 17:03:45 +0000 (17:03 +0000)]
Bug 37812: (QA follow-up) Add watchers for warning and confirmation prop and initialise modals with bootstrap methods on changes in Dialog.vue

- Use more targeted selectors in cypress tests Trains.ts, WaitingList.ts.
- Await result of accept_callback, then close modal.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 days agoBug 37812: (QA follow-up) Prevent cypress test failures by correcting modal selector...
Paul Derscheid [Thu, 19 Sep 2024 15:17:43 +0000 (15:17 +0000)]
Bug 37812: (QA follow-up) Prevent cypress test failures by correcting modal selector, removing ambiguity of contains calls, replace by get with respective ids

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 days agoBug 37812: (QA follow-up) Prevent cypress test failure by adjusting selector in DataP...
Paul Derscheid [Thu, 19 Sep 2024 14:30:07 +0000 (14:30 +0000)]
Bug 37812: (QA follow-up) Prevent cypress test failure by adjusting selector in DataProviders_spec.ts

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 days agoBug 37812: (QA follow-up) Prevent lots of cypress test failures by reinserting 'confi...
Paul Derscheid [Thu, 19 Sep 2024 13:29:27 +0000 (13:29 +0000)]
Bug 37812: (QA follow-up) Prevent lots of cypress test failures by reinserting 'confirmation' class on modal header

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37955: Fix table's 'configure' button to open correct column settings
Owen Leonard [Wed, 18 Sep 2024 12:57:40 +0000 (12:57 +0000)]
Bug 37955: Fix table's 'configure' button to open correct column settings

This patch updates markup and JS code on the table settings page so that
clicking a table's "configure" button will open the right panel and
scroll you to the correct table.

The patch also overrides Bootstrap's default table caption positioning
so that captions are above the table instead of below them.
Unfortunately this property isn't in Bootstrap's _variables.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface).

- Find a table in the staff interface which has a "Configure" button,
  e.g. Administration -> Libraries.
- Click the "Configure" button.
- When you arrive at the table settings page the correct panel should be
  expanded (in this example, Administration), and the page should scroll
  to the correct table (in this example, libraries).
  - The table caption ("Table id: libraries") should appear before the
    table instead of after.

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>
2 weeks agoBug 37898: Wrap some ERM api tests inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 17:48:34 +0000 (14:48 -0300)]
Bug 37898: Wrap some ERM api tests inside a transaction

Trivial ones.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37898: Wrap Patroncards.t inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 16:03:55 +0000 (13:03 -0300)]
Bug 37898: Wrap Patroncards.t inside a transaction

This tests leave data on the DB and need to be fixed. This patch does
that.

To test:
1. Run:
   $ ktd --shell
  k$ echo "SELECT COUNT(*) FROM creator_layouts \G" | koha-mysql kohadev
2. Run:
  k$ prove t/db_dependent/Patroncards.t
=> SUCCESS: Tests pass
3. Repeat 1
=> FAIL: Numbers don't match the original ones!
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Tests still pass!
=> SUCCESS: Numbers match!
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37898: Wrap Relationships.t inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 15:55:40 +0000 (12:55 -0300)]
Bug 37898: Wrap Relationships.t inside a transaction

This tests leave data on the DB and need to be fixed. This patch does
that.

To test:
1. Run:
   $ ktd --shell
  k$ echo "SELECT COUNT(*) FROM borrowers \G" | koha-mysql kohadev
  k$ echo "SELECT COUNT(*) FROM borrower_relationships \G" | koha-mysql kohadev
2. Run:
  k$ prove t/db_dependent/Patron/Relationships.t
=> SUCCESS: Tests pass
3. Repeat 1
=> FAIL: Numbers don't match the original ones!
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Tests still pass!
=> SUCCESS: Numbers match!
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37898: Wrap labels tests inside transactions
Tomas Cohen Arazi [Wed, 11 Sep 2024 15:48:28 +0000 (12:48 -0300)]
Bug 37898: Wrap labels tests inside transactions

This tests are written in a way that the cleanup is done explicitly. So
I found no evidence of them leaving the database dirty. But it felt
worth wrapping anyway, because any dev adding something could easily
introduce new data inadvertedly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37898: Wrap Indexer.t inside a transaction
Tomas Cohen Arazi [Wed, 11 Sep 2024 15:35:17 +0000 (12:35 -0300)]
Bug 37898: Wrap Indexer.t inside a transaction

This tests leave new data on the DB. This patch fixes it.

To test:
1. Run:
   $ ktd --shell
  k$ echo "SELECT COUNT(*) FROM biblio \G" | koha-mysql kohadev
2. Run:
  k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t
=> SUCCESS: Tests pass
3. Repeat 1
=> FAIL: Biblio count raised
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Tests pass
=> SUCCESS: Biblio count remains
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37330: (bug 33526 follow-up) Fix display of cover images for items
Jonathan Druart [Mon, 16 Sep 2024 09:31:45 +0000 (11:31 +0200)]
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items

The id has been modified by bug 33526. We can simply pass the table
element however.

Test plan:
Have some cover images at item level and notice that they are correctly
displayed on the bibliographic record detail page.

Note that the slider does not work correctly. If you click on the dot
(so if you have several images for an item) the scrollbar is going to
hit the top of the page and the image won't change.
Could be reported separately if not done yet.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37840: Fix item status in the Intranet detail page when the item has a item type...
Adolfo Rodríguez [Thu, 5 Sep 2024 07:22:19 +0000 (09:22 +0200)]
Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan

When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan.

Test plan:
1 Define an item type as "Not for loan"
2 Add or edit an item so that its item type is "Not for loan"
3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan"
4 Apply patch, restart services
5 Check that the status is now "Not for loan" in both Intranet and OPAC

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 35100: (follow-up) Tidy
Nick Clemens [Tue, 5 Mar 2024 12:38:02 +0000 (12:38 +0000)]
Bug 35100: (follow-up) Tidy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 35100: (follow-up) Fix test
Nick Clemens [Tue, 5 Mar 2024 12:31:12 +0000 (12:31 +0000)]
Bug 35100: (follow-up) Fix test

Previous patches changed the return values, just needed to update expectations

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 35100: Revert change to request_transfer
Martin Renvoize [Mon, 8 Jan 2024 17:34:09 +0000 (17:34 +0000)]
Bug 35100: Revert change to request_transfer

This patch reverts the change to request_transfer, opting to tackle the
StockRotationAdvance requirement to stay in place in ModItemTransfer
itself.

We also add a FIXME to RotatingCollections.. I'll look to removing that
on another bug to reduce the scope of this one.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 35100: Various fixes
Martin Renvoize [Fri, 5 Jan 2024 16:08:44 +0000 (16:08 +0000)]
Bug 35100: Various fixes

1) Don't automagically always set a transfer to in transit on checkin..
   wait for the user to actually confirm that's the case
2) New transfers triggered by a hold should take precidence, so hide
   transfers for any other reason from display
3) Update get_transfer and get_transfers to ensure ordering isn't lost
   when prefetch is used and add tests for this

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 35100: Prevent StockrotationAdvance transfers from being cancelled
Martin Renvoize [Thu, 4 Jan 2024 12:00:13 +0000 (12:00 +0000)]
Bug 35100: Prevent StockrotationAdvance transfers from being cancelled

ModItemTransfer is still very heavy handed and outright overrules
existing transfers in the queue.

For StockrotationAdvance transfers it's important that they remain in
the queue to get actioned later, even if a higher precident transfer is
actions in the interim.

This patch adds a clause to the cancellation call within
request_transfer such that StockrationAdvance transfers are left in tact
for the next time the item is checked in.

Test plan
1) Item is added to stock rotation
2) The cronjob creates a 'StockRotationAdvance' transfer
3) The item is checked in, which initiates the transfer, however, a hold is triggered
4) The hold is confirmed, which replaces the StockRotationAdvance
5) The item is checked out
6) The item is checked in, which initiates the transfer again
7) The item is checked in at it's destination and the StockrotationAdvance transfer
   has the proper date arrived date set.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 35100: Unit tests
Martin Renvoize [Thu, 4 Jan 2024 12:09:47 +0000 (12:09 +0000)]
Bug 35100: Unit tests

This patch adds a unit test to ensure StockrotationAdvance transfers are
not cancelled from request_transfer when called with 'replace'.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37812: Fix a modal in the ERM module
Jonathan Druart [Wed, 18 Sep 2024 06:37:55 +0000 (08:37 +0200)]
Bug 37812: Fix a modal in the ERM module

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37812: Prevent initialisation failure by using modal methods, not plain show...
Paul Derscheid [Tue, 17 Sep 2024 18:02:51 +0000 (18:02 +0000)]
Bug 37812: Prevent initialisation failure by using modal methods, not plain show, hide

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 weeks agoBug 37812: Prevent non-functional close buttons by using vue event handlers
Paul Derscheid [Tue, 17 Sep 2024 13:27:57 +0000 (13:27 +0000)]
Bug 37812: Prevent non-functional close buttons by using vue event handlers

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>