Commit graph

47926 commits

Author SHA1 Message Date
7f8156cf5c
Bug 29274: Remove z_reset.t
From the description of commit d25f3e8437

"""
    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>
2022-12-01 09:33:04 -03:00
8965615f2d Vue bundle - Add main.js.LICENSE.txt
There is a reference to it in main.js, it makes sense to include it in
our codebase

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2022-12-01 10:29:42 +01:00
a69efaa2a5
Bug 32351: Fix t/db_dependent/Koha/Charges/Sales.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:20 -03:00
3200c18e7d
Bug 32351: Fix t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:20 -03:00
8455c0b83d
Bug 32351: Fix t/db_dependent/api/v1/patrons.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:19 -03:00
11ac81782f
Bug 32351: Fix Koha/Patrons.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:19 -03:00
ca77a59a9b
Bug 32351: Fix TemplateToolkit.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:18 -03:00
cd49ab5c28
Bug 32351: Fix CourseItems.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:18 -03:00
5f07e7afff
Bug 32351: Fix Circulation.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:17 -03:00
4824bbf195
Bug 32351: Fix Reserves.t
itemtypes.notforloan already defaults to 0

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:17 -03:00
a471e6d5bc
Bug 32351: Fix Members.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:16 -03:00
ade52182c4
Bug 32351: Fix Illrequests.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:16 -03:00
d077aa2e7d
Bug 32351: Fix Budgets.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:15 -03:00
eecad982ee
Bug 32351: Fix Acquisition.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:15 -03:00
ad3d34bfd1
Bug 32351: Holds.t - remove wrong column reference
Found by bug 32350.
The test does not need this value at all..

Test plan:
Run test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:14 -03:00
f1d2ec4aa8
Bug 31381: Add tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-30 15:58:13 -03:00
f690513947
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>
2022-11-30 15:58:13 -03:00
46aa87c600
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>
2022-11-30 12:40:33 -03:00
9b9b8f1920
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>
2022-11-30 12:40:28 -03:00
3381a6463c 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
2022-11-29 09:05:15 -03:00
Katrin Fischer
dd095aa8c4
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>
2022-11-29 09:01:35 -03:00
8c36777547
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>
2022-11-28 15:37:14 -03:00
6072492693
Koha 22.12 - start of a new dev cycle
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-28 15:26:01 -03:00
7303285fe5
Koha 22.11.00 Rosalie is here!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:24 -03:00
9de934a96e
22.11.00: Vue bundle
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:23 -03:00
Koha translators
623fb377ad
Translation updates for Koha 22.11.00
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:05 -03:00
0b6837ea22
Add release notes for Koha 22.11.00
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:02 -03:00
c2d8efe461
22.11.00: Update kohastructure.sql
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:02 -03:00
2b48678233
22.11.00: Update history.txt
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:02 -03:00
b0d77a20a2
22.11.00: Update contributors.yaml
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:01 -03:00
5dd3dc830c
22.11.00: Update .mailmap
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:01 -03:00
1bf75a0094
Bug 30808: (follow-up) Minor visual glitch
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:01 -03:00
12485f6fb8
Bug 30808: Add a dedications tab to the about page
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:00 -03:00
88c2430bde
Bug 30808: Add support for version codenames
This patch adds the 'Rosalie' codename to the 22.11 release and adds
corresponding support to the about page for displaying it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:20:00 -03:00
a2e9fd25d1
Bug 30808: Add the 23.05 release team
This patch updates the teams.yaml to include the voted in 23.05 release
team and also updates the release date of 22.11 to match the actual
release.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 15:19:59 -03:00
404c88fe87 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>
2022-11-25 09:40:09 -03:00
11918dcb72
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>
2022-11-25 09:38:17 -03:00
0a1d7aa520
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>
2022-11-25 09:38:13 -03:00
509ff8f05c
Bug 32343: Prevent Koha/Patron.t to fail randomly
Highlighted by Bug 32030: fix test builder for boolean

The attribute is named "unique_id", not "unique"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-25 09:27:45 -03:00
Katrin Fischer
78ccd863fc
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>
2022-11-24 15:56:13 -03:00
Katrin Fischer
bbe63b5c45
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>
2022-11-24 15:56:13 -03:00
Katrin Fischer
dd2548c2ce
Bug 15348: (follow-up) Fix filters on input fields
With bug 30718 we on longer need the KohaDates TT filter
on the inputs. This patch removes them.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-24 15:56:08 -03:00
56e944f49b
Bug 32310: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-24 15:35:39 -03:00
2568a1c43d 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>
2022-11-24 15:29:18 -03:00
09c2b96e04
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>
2022-11-23 09:45:21 -03:00
4e5776d1ad
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>
2022-11-23 09:35:40 -03:00
270715d9b7
Bug 32046: Compiled CSS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-23 09:35:02 -03:00
ff7ad7aaa6
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:

 - Item add/edit
 - Batch item modification
 - Batch item deletion

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>
2022-11-23 09:34:04 -03:00
26ca471424
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>
2022-11-23 09:34:00 -03:00
1672bd3ed2
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>
2022-11-23 09:29:45 -03:00