Aleisha Amohia [Sun, 27 Nov 2022 21:24:59 +0000 (21:24 +0000)]
Bug 32354: Accept session_state param given by OAuth IdP
This patch ensures Koha doesn't throw an error if the IdP hands back a
session_state parameter.
To test:
1) Set up an identity provider
2) On the IdP's configuration, make it hand back a session_state
3) Confirm authentication using OIDC works with and without the
session_state
Sponsored-by: Plant & Food Research Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Fri, 2 Dec 2022 10:10:09 +0000 (10:10 +0000)]
Bug 32074: Edit vendor has two save buttons
When editing a vendor there is a floating toolbar with options to save
and cancel. There is also an additional save and cancel button set at
the bottom of the page and this is superfluous. This has now been
removed to leave the floating toolbar as the only toolbar.
Test plan:
1) Navigate to Acquisitions and select a Vendor.
2) Click edit vendor
3) Scroll down the page and observe that there is a floating
save/cancel toolbar as well as the buttons to save/cancel at the
bottom of the page
4) Apply patch
5) Observe that the duplicate buttons at the bottom of the page are now
gone
Signed-off-by: Owen <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Nind [Wed, 23 Nov 2022 00:05:28 +0000 (00:05 +0000)]
Bug 32283: (follow-up) Fix in two other places
Fix two other occurences where the capitalization of OPAC
is incorrect:
- Identity provider email domains table column heading
- 'New email domain' form label
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>
Andrew Auld [Tue, 22 Nov 2022 14:34:51 +0000 (14:34 +0000)]
Bug 32283: Correct capitalisation of opac > OPAC
Test plan
Step 1: Navigate to admin>Identity Providers
Step 2: Add new domain
Step 3: For 'Allow opac' setting, verify that opac is lower case in both label and description
Step 4: Apply patch
Step 5: Navigate to admin>Identity Providers
Step 6: Add new domain
Step 7: For 'Allow OPAC' setting, verify that OPAC is upper case in both label and description
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>
Andrew Auld [Tue, 22 Nov 2022 14:16:21 +0000 (14:16 +0000)]
Bug 32282: Fixed capitalisation of ID in User ID
Test plan
Step 1: go to admin>identity providers
Step 2: click 'new identity provider'
Step 3: check map point drop-down
Step 4: verify that User id is written 'User id'
Step 5: apply patch
Step 6: repeat 1-3
Step 7: verify that User ID is written 'User ID'
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 18 Nov 2022 14:02:13 +0000 (14:02 +0000)]
Bug 28235: Correct CSS governing max width of custom cover images
Images shown in the OPAC and staff interface when the
OPACCustomCoverImages and CustomCoverImages preferences are enabled
should be getting a max-width set in the current CSS, but the order of
the declarations is preventing the correct specificity.
This patch moves the CSS to the correct place in each file so that the
max-width is applied.
To test, apply the patch and rebuild both the staff and OPAC CSS. If you
get an error during the build process you may need to run 'yarn
install.'
- Go to Administration -> System preferences, and enable the
OPACCustomCoverImages and CustomCoverImages preferences.
- If you're testing with the default test database you can set the
CustomCoverImagesURL preference to
https://static.myacpl.org/public/covers/{normalized_isbn}.jpg
- Perform a catalog search in both OPAC and staff client limiting by
itemtype = 'Book'.
- The search results in both interface should show several covers
supplied from the external URL.
- In the staff client, these images should be limited to 140px wide even
if the source image is larger.
- In the OPAC, view the detail page for one of the results with cover
images. The image shown on the detail page should be constrained to
140px wide even if the source image is larger.
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>
Jonathan Druart [Fri, 18 Nov 2022 08:55:06 +0000 (09:55 +0100)]
Bug 32261: Add more UI feedback when selecting patron from autocomplete
There is only a tiny change in the color of the selected item, but it's
not obvious.
Test plan:
Regenerate the css files using `yarn build`
Search for patrons and note that the down/up keys let you select a
patron and the background color change.
Note that the background color is not on the container and so is not
similar as the hover rule (when using the mouse). We could change that,
but then the behaviour is weird when you have both the mouse and the
keyboard selecting items in the item list.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 18 Nov 2022 08:52:35 +0000 (09:52 +0100)]
Bug 32261: Patron autocomplete - do not empty text field
The jQuery UI autocomplete is supposed to replace the text field with
the 'value' attribute of the selected item. As it does not exist it's
emptied. We should not replace what the user typed in.
Test plan:
Go to the Koha home page
Select "Search patrons" in the header
Type 'edn', it will return 1 result
Use the down key to select the item (it is not obvious but there is a
little change in the color when you select the item)
=> Without this patch the search field is emptied
=> With this patch applied the search field is not modified
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 4 Nov 2022 15:33:44 +0000 (16:33 +0100)]
Bug 30963: Automatically refresh the curbside pickups list
Librarians would like the page to be automatically refreshed every X minutes.
This patch is suggesting to have a checkbox at the top of the page to
let the user refresh the page given the delay they want.
We could later improve this by setting this value in a localStorage
variable.
Test plan:
Go to the curbside pickup page
Notice the new checkbox at the top
Notice that the "Refresh" button has been moved at the top as well
Play with the checkbox and the input, and confirm that the behaviour is
consistent
Sponsored-by: Association KohaLa - https://koha-fr.org/ 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>
Katrin Fischer [Wed, 16 Nov 2022 21:49:17 +0000 (21:49 +0000)]
Bug 32236: Fix alignment of checkbox "Use default values" for item batch modification
This moves the label to the right in front of the checkbox.
It also shortens the label by adding an additional longer hint text.
To test:
* Go to cataloguing > item batch modification
* On the first page of the tool, look at the checkbox at the bottom
* Apply the patch
* Verify changes
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
"""
Bug 22709: (RM follow-up) Clean up plugin tests
The plugin tests were failing due to failed rollbacks and run order.
This patch moves them into their own directory and adds a reset test to
restore the original state of the plugin system after the tests have
run.
"""
This is wrong, the tests are run in a random order.
We don't need this file.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Tue, 22 Nov 2022 19:21:22 +0000 (19:21 +0000)]
Bug 31381: Handle null attributes in list
This patch allows null values to be returned in patron attributes
to prevent a crash when searching patrons
To test:
1 - Add a NULL attribute to a borrower, in sample data, Edna Acosta
sudo koha-mysql kohadev
INSERT INTO borrower_attributes (borrowernumber,code,attribute) VALUES (5,'SHOW_BCODE',NULL);
2 - Browse to 'Home->Patrons'
http://localhost:8081/cgi-bin/koha/members/members-home.pl
3 - Click 'Browse by last name: A'
4 - Datatables error:
Expected string - got null
5 - Apply patch
6 - Restart all
7 - Browse by last name: A
8 - Success!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 25 Nov 2022 10:09:57 +0000 (10:09 +0000)]
Bug 32350: Add subtest for bad columns
Test plan:
Run t/db_dependent/TestBuilder.t
And now run the whole test suite :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 25 Nov 2022 10:02:24 +0000 (10:02 +0000)]
Bug 32350: Use array_minus and ignore nesting
Note: Test will be extended in follow-up. This fixes the
module_bit hash to follow the FK path from user_permissions
to permissions to userflags. One step was missed in the
existing test, although it did not fail. The change here
revealed that now.
Test plan:
Run t/db_dependent/TestBuilder.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 17 Nov 2022 15:26:48 +0000 (15:26 +0000)]
Bug 32213: Reindent item search fields templates
This patch reindents three item search field templates so that they have
consistent indentation.
To test, apply the patch and go to Administration -> Item search fields.
Test all aspects of viewing, adding, and deleting item search fields.
Everything should look correct and work correctly.
Signed-off-by: David <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: changed intendation on a tiny bit
Katrin Fischer [Tue, 15 Nov 2022 16:06:09 +0000 (16:06 +0000)]
Bug 32126: Fix missing div breaking the form for adding more search fields
The missing div caused a problem with the JS that controls
visibility of the list of search fields, the form and the toolbar.
With the div added, everything should now work as expected.
To test:
* Add a item search field, everything should work.
* Add a second item search field - intead of the form, you'll see an empty page.
* Apply patch.
* Add second and more search fields, all should work.
* Edit search fields.
* Delete search fields.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 25 Nov 2022 11:24:26 +0000 (12:24 +0100)]
Bug 32352: Make xt/check_makefile.t check directories in git index
It's failing if 'node_modules' exists. We could simply skip it, but it
seems that it would be better to actually list directories that are part
of the git index only.
The question is: do we actually support test execution outside of a git
directory?
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 23 Nov 2022 08:53:31 +0000 (09:53 +0100)]
Bug 31969: Use filter_by_last_update
This script has a pattern to delete rows depending on a given
date/number of days, we should use the filter_by_last_update
Koha::Objects method.
No need for another method and tests, everything is already tested
there.
This patch also suggests to rename the reference to "background" and
"bg" with "jobs", which seems more appropriate and not an abbreviation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Mon, 21 Nov 2022 09:53:31 +0000 (09:53 +0000)]
Bug 32304: BackgroundJobs.t: Fix subtest purge
Instead of deleting, I added a count :)
Note that one of the purges eventually deletes my
older jobs..
Test plan:
Run t/db_dependent/Koha/BackgroundJobs.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 25 Nov 2022 08:13:04 +0000 (08:13 +0000)]
Bug 32304: Fix subtest search_limited
Jenkins reported:
not ok 1 - No jobs found without userenv
We need to check if there are jobs without borrowernumber.
Test plan:
Run test again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Tue, 15 Nov 2022 13:32:43 +0000 (13:32 +0000)]
Bug 15348: (follow-up) Fix modals to pre-set input with stored date
Makes sure that when an estimated delivery day is edited using
the modals on the basket summary or late order pages, the
date input is pre-set to the stored estimated delivery date.
To test:
* Create some order lines with and without estimated delivery date set
* Make sure that on the basket summary the edit link comes up with an
empty modal
* Close the basket
* Check that on late orders the dates are pre-filled incorrectly as well
* Apply patch
* Refresh basket summary and late order pages
* All edit links now should bring up the modal with the correct date filled in
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Tue, 15 Nov 2022 12:22:31 +0000 (12:22 +0000)]
Bug 15348: Store estimated delivery date when adding an order
When the estimated delivery date was entered on adding or modifying
and order, it was not saved to the database.
To test:
* Add new order, fill in estimated delivery date
* Save
* Verify the estimated delivery date is empty
* Modify order line, date will also not be saved
* Apply patch
* The date should now save and update correctly
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 21 Nov 2022 18:17:45 +0000 (18:17 +0000)]
Bug 32310: Correct CSS in the staff interface which still uses old color scheme
This patch updates staff interface CSS so that it better conforms to the
color scheme of the updated staff interface.
To test, apply the patch and rebuild the staff interface CSS.
- Go to Tools -> Calendar. Corrected are the borders around the calendar
and around the "Add new holiday" panel which appears when you click a
date on the calendar.
- Go to Patrons and perform a search which will return multiple results.
- Check the checkbox for some patrons. The color of the "Patrons
selected" box have been updated.
- Incorrect padding values have also been removed from the adjacent
patron list and merge buttons.
- Locate a multi-paged DataTable, e.g. Administration -> Authorized
values. The style of the "Next" and "Previous" buttons have been
updated.
- View a patron record and choose More -> Set permissions from the
toolbar. In the table of permissions, when you hover your mouse over
one of the headings ("Check out and check in items," "Edit
authorities," etc.) the color should be correct.
- I don't think this is ever visible in the staff interface, but the
template has markup in it to display a "Log in" link in the header
menu if the user isn't logged in. I've removed some redundant CSS
corresponding to this link and corrected some markup just in case
there is a situation in which is appears.
Signed-off-by: Amit Gupta <amitddng135@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 18 Nov 2022 07:00:24 +0000 (08:00 +0100)]
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Not sure what is going on exactly, neither if this patch is the correct
way to fix this.
The request is "rejected" at some point (by the browser?), when we
search for patrons using the autocomplete and DT "at the same time".
To recreate:
Don't apply this patch
Go to /cgi-bin/koha/reserve/request.pl?biblionumber=1&borrowernumber=5
Search for "edn" then hit enter
You may see an alert, that will disappear
If you don't see the alert, repeat
This patch suggests to ignore the alert if the status of the request is
"rejected".
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 22 Nov 2022 15:19:52 +0000 (15:19 +0000)]
Bug 32303: Remove DT pagination on system preference search result
This patch updates the way we retrieve a DataTable's saved state during
initialization. The change is to prevent cases where making a duplicate
call to DataTables() initializes the table again.
To recreate the bug, search system preferences for the term "last."
Scroll down to the "OPAC preferences" section and observe that there are
two filter forms displayed above it.
Apply the patch and perform the same search again. The extra forms
should be gone.
Confirm that DataTables behavior is still the same:
- Test pages which use the "saveState" option in DataTables.
- Type text in the table's search field
- Reload the page. The search field should still have the string you
entered, and the "Clear filter" button should be active.
- Administration -> Libraries
- Acquisitions -> Vendor -> Receive shipments -> Receive orders
- Circulation -> Overdues
- Test pages which don't use the "saveState" option, e.g. the checkout
screen, patron search results, list of saved reports, etc. The
behavior of the search form and table operations in general should be
unchanged.
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>
Owen Leonard [Wed, 16 Nov 2022 15:26:29 +0000 (15:26 +0000)]
Bug 32046: (follow-up) Accommodate the inclusion of item information
If you have item information configured in the MarcItemFieldsToOrder
system preference, the "Select to import" tab will display a basic item
information form which needs to use the same style as other item edit
forms.
In order to make the CSS in addbiblio.css more generic, I've changed
some styles to use a class, .item_edit_form, instead of an ID. This lets
us have multiple <div class="item_edit_form"> in this template without
duplicating IDs. Other instances of <div
id="cataloguing_additem_newitem"> have haa the .item_edit_form class
added.
To test you must have a staged MARC file which includes items and you
must configure the MarcItemFieldsToOrder preference to map those items
in the ordering interface.
As you follow the previous patch's test plan you'll find that when you
click a checkbox or title to expand the information about that title
you'll see "Item record X" headings following by a properly-styled form.
To confirm that the changes to addbiblio.css are not too far-reaching,
test the other affected pages:
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 16 Nov 2022 12:08:56 +0000 (12:08 +0000)]
Bug 32046: When adding a new records from a staged files, there are style issues
This patch modifies the template for adding a record from a staged file
in order to resolve some layout problems introduced by the staff
redesign.
This patch also corrects an problem with addorderiso2709.js: It included
some template markup. The template variables are converted to a JS
variable to prevent a JS error.
Note that the QA tool's js_in_body error is invalid for this template
which requires that the JS stay inside <head>.
To test you must have at least one MARC file staged for import.
- Apply the patch and go to Acquisitions.
- Locate a vendor and create a basket if necessary.
- Add to the basket and choose the option of adding an order from a
staged file.
- Click "Add orders" next to one of the staged files.
- On the Add orders from MARC file page, test that everything looks
correct and works correctly:
- In the first tab, expanding and collapsing order details by checking
the checkbox or clicking the title.
- Test the "MARC" and "Card" preview buttons.
- Under the Item information tab, confirm that the layout looks
correct and that the form works correctly, including plugin
operations like auto barcode fill.
- Test that, under the Default accounting details tab, changing the
fund automatically sets the fund for each title in the first tab.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 18 Nov 2022 14:31:10 +0000 (15:31 +0100)]
Bug 32269: Prevent Circulation.t to fail randomly
Highlighted by Bug 32030: fix test builder for boolean
# Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
# at t/db_dependent/Circulation.t line 343.
# got: '2022-11-18T14:16:12'
# expected: '2022-12-02T00:00:00'
# Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
# at t/db_dependent/Circulation.t line 349.
# got: '2022-11-18T14:16:12'
# expected: '2022-12-02T23:59:00'
# Looks like you failed 2 tests of 5
We were reaching return $now
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Andrew Auld [Tue, 22 Nov 2022 13:56:22 +0000 (13:56 +0000)]
Bug 32299: Add page-section to Z39.50 results
Test plan
Step 1: Navigate to Cataloguing module and click 'New from Z39.50/SRU' to start a search
Step 2: Carry out a search
Step 3: Confirm that the white background to the table of results is missing
Step 4: Apply patch
Step 6: Repeat search
Step 7: Confirm that the white background is now showing.
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 17 Nov 2022 19:13:33 +0000 (19:13 +0000)]
Bug 32241: Add page-section to list of records in batch record modificaton (tool)
This patch modifies the batch record modification page template so that
the preview of submitted records is contained in a .page-section
container.
To test, apply the patch and go to Cataloging -> Batch record
modification.
Submit a batch of bibliographic record numbers and a batch of authority
record numbers. In both cases the page which previews the list of
submitted records in a table should be correctly styled.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 17 Nov 2022 18:50:07 +0000 (18:50 +0000)]
Bug 32198: Add page-section to stock rotation stages list (cat)
This patch adds a .page-section container around relevant areas of the
stock rotation management interface.
Also changed: Removed a .dialog.message container which was not correct.
To test, apply the patch and go to Cataloging -> Stock rotation.
- If necessary, add a rota.
- Click Manage -> Stages on your rota.
- If neccesary, create one or more stages.
- The display of stages should look correct.
- From the list of rotas click Manage -> Items.
- Click "Add items" and use a barcode file to add multiple items at
once.
- The page confirming your submission, with a list of items, should
have a page-section.
- Return to the view of items in the rota. The display of items should
look correct.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 17 Nov 2022 19:28:48 +0000 (19:28 +0000)]
Bug 32238: Add page-section to label creator pages
This patch modifies two label creator templates so that a .page-section
container is used to wrap main content.
To test, apply the patch and go to Cataloging -> Label creator.
- Click Manage -> Label batches.
- The display of existing batches should look correct.
- Click "Edit" on one of the label batches.
- If necessary, submit a set of barcodes or item numbers to add to
the batch.
- The display of items in the table of items should look correct.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 18 Nov 2022 16:29:46 +0000 (16:29 +0000)]
Bug 32254: (follow-up) Add missing div around "Older transactions"
To test:
- Tools -> Cash summary for <library> and Tools -> Transaction history
for <register>
- In the "Older transactions" section, submit start and end dates
which will return results.
- The table of results should be styled correctly.
Signed-off-by: David <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Thu, 17 Nov 2022 18:45:33 +0000 (18:45 +0000)]
Bug 32254: (follow-up) Add page section to Cashup history
Adds one missing page section on the last table of the
POS transactions page.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 17 Nov 2022 17:24:03 +0000 (17:24 +0000)]
Bug 32254: Add 'page-section' to various tools pages
This patch adds a .page-section div to various pages in the tools
section in order to provide a consistent page structure.
Also changed: Corrected a couple of templates which were missing some
<tr> tags.
This patch includes indentation changes, so please ignore whitespace
when looking at the diff.
To test, apply the patch and view the following pages to confirm that
the primary page content is wrapped in a container with a white
background:
- Tools -> Access files
- Tools -> HTML customizations
- Additional contents, news or pages-- all use the same template.
- Check the list of existing entries.
- Tools -> Batch extend due dates
- Choose a set of criteria that will return results and click
"Continue".
- Check the list of checkouts to be updated.
- Tools -> Batch patron modification
- Submit a batch of patrons for modification.
- Check the list of patrons to be modified.
- Tools -> Upload patron images
- Upload one or more patron images
- Check the view of results
- Tools -> Upload
- Upload a file and view the results, or perform a search and check
the view of results.
- Tools -> Patron card creator -> New patron card batch.
- Submit a set of patrons and check the display of patrons in the
resulting batch.
- Tools -> Cash summary for <library> and Tools -> Transaction history
for <register>
- Confirm that the table of data looks correct
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 1 Jul 2022 14:02:58 +0000 (15:02 +0100)]
Bug 31080: Prevent bundles from being nested
This is a follow-up for bug 28854 to prevent bundle type items from
being nested in to other bundles.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 4 Jul 2022 10:20:31 +0000 (11:20 +0100)]
Bug 31080: Unit tests
Unit tests for add_to_bundle functionality that prevents bundle nesting.
Test plan
1) Run t/db_dependent/Koha/Item.t
2) The test should fail
3) Apply the second patch
4) Re-run the test and watch it pass.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Géraud Frappier [Wed, 16 Nov 2022 21:54:41 +0000 (16:54 -0500)]
Bug 32237: Fix using a list as base for batch record deletion
When a list was used to select records for batch deletion, the
record IDs were no longer found.
To test:
1. Go to Lists in the intranet.
2. Add a list by clicking on "New list". Choose a random name for it and select private or public and save.
3.Add one or more items into it and save.
4.Go back to the main page and select "Cataloging".
5.Go to "Batch record deletion".
6.In "upload a file" select "Select a list of records" and choose a list and keep the Bibliographic on.
7.Select continue and see that the list of records is not shown.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 10 Nov 2022 19:24:25 +0000 (19:24 +0000)]
Bug 32167: (bug 14860 follow-up) Populate price fields even if no discount on vendor
On bug 14860 an 'else' was removed, assuming the price fields were set before discount,
this was incorrect. This patch renames the variable and always set the price, only discounting
ecost if a discount, but setting the values even if not
To test:
0 - Have a vendor with a discount of 0% specified (no discount)
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 $0 order line
6 - Repeat with another vendor with a 10% discount and confirm that is correct
7 - Apply patch
8 - Repeat 2-4
9 - Add the order and confirm $10 price
10 - Repeat with discounted vendor, confirm prices are set discounted correctly
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 16 Nov 2022 06:40:59 +0000 (07:40 +0100)]
Bug 31891: (bug 27421 follow-up) Remove one additional click
From comment 0
"""
Moving marc batch import actions to background jobs has introduced some confusing
clicks to the process. Before this change, after staging a batch one was taken
to a "MARC staging results" page with details of how the staging went and, most
importantly, a link straight to the batch you'd just staged
(at manage-marc-import.pl?import_batch_id).
Now, however, one must click the status bar to get to details of the job
and then click "View batch" from there. Not only is that an extra click
and page load, but neither of those links are particularly large or
obvious.
"""
Test plan:
- Stage a record for import, notice that the "View batch" link appears
when the job is finished
- Add order to basket from a new file, select a file and import
Notice that the "Add staged files to basket" link is displayed when the
job is finished
Note for QA: We should have a js_callback in the background_job include
file instead.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 21 Nov 2022 16:30:33 +0000 (16:30 +0000)]
Bug 32308: Update Chocolat image viewer CSS to conform to redesign color scheme
This patch makes minor modifications to the Chocolat CSS so that the
buttons (next, previous, close) are styled with colors that conform to
the new interface color scheme.
Note: You may encounter Bug 32307 when testing.
To test, apply the patch and enable at least two cover image services in
the staff interface: Amazon, Local cover images, and/or Coce.
Locate a bibliographic record which has at least two cover images and
view the detail page. Click on the cover image to trigger the image
viewer overlay.
Confirm that the controls in this view are colored green, matching the
current color scheme.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Tue, 15 Nov 2022 14:13:53 +0000 (14:13 +0000)]
Bug 32045: Use bootstrap tabs to select item tab
When the form to add orders from a staged file is validated, we use
toptabs functionality to switch to the item tab if there are missing fields.
The display now uses bootstrap tabs, so the JS is throwing an error:
Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option'
This patch simply switches the call to switch tabs
To test:
1 - Stage a file for import
2 - Either use Marc(Item)FieldsToOrder to populate the orders
or select a budget on the third tab
3 - View the second tab, items info, confirm itemtype is required, but don't populate it
4 - Attempt to save order, nothing happens
5 - Check the JS console (F12)
6 - Note the error:
Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option'
7 - Apply patch
8 - Cancel and add from staged file again
9 - Select a budget and save
10 - You now get an error popup: Some required item subfields are not set
11 - Confirm after the error you are shown the items tab
12 - Select itemtype
13 - Save
14 - Confirm orders added successfully
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 17 Nov 2022 08:28:39 +0000 (09:28 +0100)]
Bug 30794: Insert blank rule (unlimited) for max_holds
Related to bug 24669, why didn't we use strip_non_numeric for one occurrence?
Note that there is still a problem, if none of the 3 inputs is filled,
no rule will be created (ie. action ignored)
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Mon, 21 Nov 2022 15:20:02 +0000 (15:20 +0000)]
Bug 32298: Page section added to cataloguing search
Added div to "Records found in this catalog".
Added page-section class to "Records found in the reservoir".
Corrected level two heading and removed horizontal line as it is now superfluous.
Test plan:
1) Apply patch from bug 32298
2) Navigate to Cataloging
3) Enter a search into the search field and run the search
4) Verify that the white page section identifier is now visible around both sections
Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Sponsored-by: PTFS Europe Signed-off-by: Hammat Wele <hammat.wele@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jacob O'Mara [Fri, 18 Nov 2022 16:13:07 +0000 (16:13 +0000)]
Bug 32270: Add page section to label layouts
Test plan:
1) Navigate to `Cataloguing > Label creator > Manage label layouts`
2) Observe the missing page section surrounding the table
3) Apply patch
4) Observe that missing page section has now appeared
Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Sponsored-by: PTFS Europe Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 2 Nov 2022 08:08:46 +0000 (09:08 +0100)]
Bug 32010: Make sure the alert will be displayed after the ajax call
There is a missing wait_for_ajax call at after we click but wait_for_ajax
is waiting for the return of success, and the alert is there.
22:01:57 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
22:01:57 koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
22:01:57 koha_1 | (eval 541):1 in Selenium::Remote::Driver::__ANON__
22:01:57 koha_1 | (eval 543):2 in Selenium::Remote::Driver::__ANON__
22:01:57 koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:654 in Selenium::Remote::Driver::_execute_command
22:01:57 koha_1 | t/db_dependent/selenium/authentication_2fa.t:282 in Selenium::Remote::Driver::get_alert_text
22:01:57 koha_1 | /usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
22:01:57 koha_1 | /usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
22:01:57 koha_1 | /usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
22:01:57 koha_1 | t/db_dependent/selenium/authentication_2fa.t:291 in Test::More::subtest
22:01:57 koha_1 |
22:01:57 koha_1 | # Looks like you planned 7 tests but ran 4.
22:01:57 koha_1 |
22:01:57 koha_1 | # Failed test 'Enforce 2FA setup on first login'
22:01:57 koha_1 | # at t/db_dependent/selenium/authentication_2fa.t line 291.
22:01:57 koha_1 | Error while executing command: no such alert at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.
22:01:57 koha_1 | at /usr/share/perl5/Selenium/Remote/Driver.pm line 356.
22:01:57 koha_1 | # Looks like your test exited with 255 just after 4.
22:01:57 koha_1 | [20:59:37] t/db_dependent/selenium/authentication_2fa.t
Test plan:
Confirm that the test pass (execute it in a loop, hundreds of times)
Confirm that the behaviour of 2FA "enforced" (see bug 30588) is still
working as expected.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 17 Nov 2022 10:15:30 +0000 (10:15 +0000)]
Bug 24606: (QA follow-up) Add test for encoding/decoding
NOTE: I have the impression that this unit test is quite
rudimentary. I do not see the apply function tested?
Test plan:
Run t/db_dependent/Koha/Item/Templates.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
tcohen amended: stray deps Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 18 Nov 2022 13:02:06 +0000 (14:02 +0100)]
Bug 32267: (bug 32154 follow-up) Fix Agreements.t
# Failed test at t/db_dependent/Koha/ERM/Agreements.t line 111.
# Structures begin differing at:
# $got->[0]{user_role_id} = '2'
# $expected->[0]{user_role_id} = Does not exist
# Looks like you failed 1 test of 4.
Another fix may be better, please suggest if you disagree
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Thu, 3 Nov 2022 22:20:57 +0000 (22:20 +0000)]
Bug 32104: Prevent console error on additonal-contents.pl
To test:
1. Make a new HTML customization, news item, or page with the text editor ( CodeMirror ).
2. Save the content ( not Save and continue )
3. Notice the console error:
4. Apply patch
5. Try 1 & 2 again.
6. No error.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 11 Nov 2022 15:31:40 +0000 (16:31 +0100)]
Bug 32181: ERM - Fix 'filter by expired' when adding an agreement to EBSCO's package
We shouldn't change the current route (which will lead to change the
view) when we are adding an agreement to a EBSCO's package
Test plan:
Go to E-Resource management / eHoldings / EBSCO / Packages
Search for a package, select one
Click "Add new agreement"
Use the "Filter by expired" filter
=> Without this patch you are redirected to the package list view
=> With this patch applied the table is filtered as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Tue, 15 Nov 2022 16:54:47 +0000 (16:54 +0000)]
Bug 32093: Make help and code match for bg-days in cleanup_database.pl
There as a mismatch between the parameter name in documentation (bg-days)
and what was checked in the code (bg-jobs). This makes both match.
To test:
* Apply patch
* Make sure you have some background_jobs older than one day
* Verify the help of the script documents the parameter bg-days
* Run the cleanup_database.pl job
Example: ./misc/cronjobs/cleanup_database.pl --bg-days --confirm -v
* Verify there are no errors and the lines have been deleted as expected
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
During the development of the eRM module I've tried to use bootstrap 5
(and vue-bootstrap), but I didn't manage to make it work without
modifying the version used in Koha. This change is actually not needed
and we can keep version 4.
See commit 8c32f186d5a62e742621c35cfacff5b22bb42b71
Bug 32030: ERM - Remove BootstrapVue3
Test plan:
% yarn install
% git diff
you should notice the version change in yarn.lock
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 17 Nov 2022 09:29:42 +0000 (09:29 +0000)]
Bug 32242: Resolve encoding issue when sending to Net::Stomp
This is meant as a quick fix. It should be enhanced later on by
letting Net::Stomp do the UTF8 conversion.
Test plan:
Run batch mod items. Add a Unicode char in the notes.
Check if job runs and results are correct.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 16 Nov 2022 08:19:12 +0000 (09:19 +0100)]
Bug 32224: Add cypress to yarn commands
Either I am missing something obvious, or we need to add cypress to the scripts of package.json
With /kohadevbox/node_modules only (ie. without $SYNC_REPO/node_modules), I cannot run
yarn run cypress run
`cypress run` is working with an adjusted PATH (see https://gitlab.com/koha-community/koha-testing-docker/-/issues/313#note_1173792905) but I think both should work.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 17 Nov 2022 13:52:25 +0000 (14:52 +0100)]
Bug 32248: Remove t/00-checkdatabase-version.t
Since bug 25078 we do no longer use updatedatabase.pl. This test was
there to make sure the RM(aints) was replacing the XXX correctly.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The condition is fine as long as we only have GDPR consents.
But if you dont, you would have trouble. I know :)
Lets prevent that here, although the table still has an ENUM. So
double safety.
Test plan:
Run t/db_dependent/Koha/Patrons.t
Bonus: Run cleanup_database.pl and check for unusual number of
locked accounts:
misc/cronjobs/cleanup_database.pl --confirm -v --sessions
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>