Owen Leonard [Mon, 4 Apr 2022 16:40:20 +0000 (16:40 +0000)]
Bug 30453: Convert offline circulation tabs to Bootstrap
This patch updates the offline circulation page in the staff interface
to use Bootstrap tabs instead of jQueryUI.
To test, apply the patch and make sure the AllowOfflineCirculation
system preference is enabled.
- Go to Circulation -> Built-in offline circulation interface
- Submit a patron barcode in the "Check out" field.
- Under the barcode input field you should see two tabs: Checkouts and
Fines. Confirm that they look correct and work correctly.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 1 Apr 2022 14:30:49 +0000 (14:30 +0000)]
Bug 30434: Convert catalog merge page tabs to Bootstrap
This patch updates the catalog merge template so that it uses Bootstrap
tabs instead of jQueryUI. Some JavaScript is modified to accommodate the
new DOM structure.
The patch also makes a minor HTML correction, adding a missing "</ol>".
To test, apply the patch and search the catalog in the staff client.
- In the search results, check the checkbox for two records.
- Choose Edit -> Merge records.
- Click next to accept the merge reference selection.
- On the next page you should see two tabs under "Source records."
Confirm that they work correctly.
- All checkboxes in the first tab should be checked by default.
- Confirm that tag and subfield selection still works correctly.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 28 Apr 2022 08:32:28 +0000 (10:32 +0200)]
Bug 30628: Fix patron selection in batch patron modification tool
bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.
Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables
Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Arthur Suzuki [Wed, 20 Feb 2019 20:15:44 +0000 (21:15 +0100)]
Bug 22379: Fix checks not made by ILS-DI method CancelHold
Disable the possibility for a borrower to cancel a reservation
which is either in a Transit or Waiting state.
This reproduce the behaviour seen on the OPAC.
Also replaces previous checks on the borrowernumber
since CanReserveBeCanceledFromOpac already checks this.
--------------------------------
Test plan (before patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
-> Should fail and reply "RecordNotFound"
-> Reserve still appears in the list of holds.
-Try to cancel the reserve providing the borrowernumber the reserve is
for.
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower
-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower
-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower
--------------------------------
Test plan (after patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.
-Try to cancel the reserve providing the borrowernumber the reserve is
for.
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower
-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.
-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.
Bug 30597: Update RestrictionBlockRenewing description to include auto renew
To test:
- apply the patch, find the syspref, see the new wording
To confirm the behavior:
- set the syspref to Block
- give a patron an auto-renewing checkout and a restriction
- run automatic_renewal.pl, see item does not renew
- switch syspref to allow, repeat, see renewal
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30366: Remove warn when running automatic_item_modification_by_age.pl
When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v
after setting up rules under Tools > Automatic item modifications by
age the script outputs several lines of warnings:
Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm
line 1864.
This is because even when there is no condition defined, modification
rule is stored with empty hash, like :
[{"substitutions":[{"field":"items.new_status","value":"0"}],"conditions":[{}],"age":"60","agefield":"items.dateaccessioned"}]
Test plan :
1) Go to Tools > Automatic item modifications by age
2) Create a rule with no conditions, just a substitution
3) Run misc/cronjobs/automatic_item_modification_by_age.pl -v
4) Check there is no warning
5) Edit the rule to add a condition
6) Run misc/cronjobs/automatic_item_modification_by_age.pl -v
7) Check the condition is applied
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30449: (QA follow-up) Report back on problematic situations
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30449: Add missing FK constraint on borrower_attribute_types
Old Koha databases probably have it, newer ones might not.
See also BZ description.
Test plan:
[1} Check SHOW CREATE TABLE borrower_attribute_types to see if you
have any index and FK constraint on category_code.
[2] Run updatedatabase.
[3] If you had category_code_fk, it should be replaced.
[4] Remove index and constraint again using things like:
alter table borrower_attribute_types drop constraint `borrower_attribute_types_ibfk_1`;
alter table borrower_attribute_types drop index category_code;
[5] Run updatedatabase.
[6] You should have KEY category_code and FK borrower_attribute_types_ibfk_1.
[7] Run updatedatabase. Idempotent, no changes.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 25 Apr 2022 14:37:33 +0000 (15:37 +0100)]
Bug 30610: Update on click binding for print receipt
This patch updates the binding for the on click even of the print
receipt button so that subsequent pages in the datatable work with the
reciept printing button.
Test plan
1) Enable cash management and process enough transactions to display
more than one page of transactions in the register details page.
2) Confirm the 'Print receipt' button works on the first page of
transactions
3) Confirm the 'Print receipt' button works on subsequent transactions
pages in the datatable.
4) Confirm the same for the past transactions table.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30565: DBIx schema change for stockrotationrotas
No test plan.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30565: Database revision for stockrotationrotas
Add unique key if needed.
Adjust description column to make it NOT NULL.
Test plan:
(Optionally:) Drop unique key, make description nullable.
Run dbrev.
Check if unique key present, and description not-nullable.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The unique key was added in a dbrev and is referred to in code.
But forgotten in kohastructure.
Test plan:
Run new install or kohastructure.sql on empty db.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 22 Apr 2022 14:19:29 +0000 (15:19 +0100)]
Bug 30576: (follow-up) Corrections to behaviour to reflect unit tests
The unit tests highlighted my original patch didn't cover the full
preference description.
We now replace the 'standard' option with the fields from the preference
and we also add those fields as options to the field selection in
advanced searches.
This patch also adjusts the tests to test for that and reflects the
expected changes to the number of options displayed in the select boxes.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 21 Apr 2022 11:52:32 +0000 (12:52 +0100)]
Bug 30576: Use DefaultPatronSearchFields in patron search
This patch corrects the handling of the 'Standard' search field in
patron searches such that it accurately reflects the contents of the
DefaultPatronSearchFields system preference and falls back to a hard
coded list instead of always using the hard coded list.
To test:
1) Empty the contents of DefaultPatronSearchFields systempreference
2) Perform a patron search from the header search
3) Inspect the patrons API request and note that we search on the
default fallback fields of firstname, surname, othernames,
cardnumber and userid (and some extended attributes which are
historically hard coded).
4) Navigate to the memebers-home by clicking the 'Patrons' button from
the main page
5) Perform another search using the filters on the left with 'Standard'
selected.
6) Note the same list of search fields used as above in the patrons API
request.
7) Update the DefaultPatronSearchFields systempreference adding one or
more borrower fields in a comma delimited list.
8) Repeat steps 2 -> 6 but this time upon inspecting the API request you
should find that only the fields in your DefaultPatronSearchFields
list are searched (along with the hard coded extended attributes
list).
9) Signoff
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 27 Apr 2022 10:34:11 +0000 (12:34 +0200)]
Bug 30626: Fix test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 27 Apr 2022 10:33:03 +0000 (12:33 +0200)]
Bug 30626: DT REST API wrapper - Fix general search
The general search query is not built correctly.
Say you have a table with column filters, like the main patron search:
General filter: henry
Specific filter on the 'Name' column: h
The generated query will be (= are actually LIKE):
{ Column1="henry" AND Column3="henry", ...} AND { Column2="h" }
The first term does not contain the Column2 attribute.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 28 Apr 2022 07:43:06 +0000 (09:43 +0200)]
Bug 30630: Prevent crash on check-in if HoldsAutoFill is ON
RevertWaitingStatus has already removed the itemnumber from the hold, passing $itemnumber (from scanned item) should work, as it will reattach the hold to the item
Test plan:
1 - Enable HoldsAutoFill
2 - Place a title level hold
3 - Check in an item and confirm hold
4 - Switch to another branch
5 - Checkin the item
Without this patch you got
Can't call method "biblionumber" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 1577.
at /kohadevbox/koha/C4/Reserves.pm line 1576
With this patch applied the operation succeeds
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 4 Mar 2022 16:19:35 +0000 (16:19 +0000)]
Bug 24001: Fix Card template/rpinter profile creation and edit
This patch adjusts the template/profiles to use the default of '0'
This should probably be NULL, and the columns foreign keys, this code
could use a further rewrite, but this should fix a long standing bug
To test:
1 - Using the fresh install, with all the sample data.
2 - Go to Home › Tools › Patron card creator › Templates
3 - New > Card template
4 - Save
5 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'profile_id' at row 1
6 - Edit an existing template
7 - Save
8 - Error: Can't bless non-reference value at /kohadevbox/koha/C4/Creators/Profile.pm line 89
9 - Create a new 'Printer profile'
10 - Save
11 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'template_id' at row 1
12 - Apply the attached patch.
13 - Verify you can create a new 'Card template' and 'Printer profile' with no errors
14 - Verify you can edit and save both of the newly created objects above
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Blou [Tue, 30 Jun 2020 16:50:09 +0000 (12:50 -0400)]
Bug 24001: Fix patron card template edition
Error when saving Patron card Template:
Can't bless non-reference value at
/home/vagrant/kohaclone/C4/Creators/Profile.pm line 89
This is caused by the profile dropdown offering invalid choices and is
fixed by adding a filter to limit options to creator = 'Patroncards'.
The UI already handles the case where no valid profile is avaiable.
Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29092: Add timestamp to account-fines table column settings
Table settings for the account_fines table (in the Patrons section, the
"Transactions" table in a patron account) are missing a checkbox for the
"Updated On" column. Because of this, one cannot hide the Updated On
column and any other values one sets here get applied to the wrong
columns.
This patch adds timestamp to account-fines column settings.
To test:
1) Navigate to columns settings page and modify account-fines tables
column.
=> Note that if you hide e.g. account_type column, column
credit_number is hidden on patrons account page
2) Apply patch and update database.
=> Account-fines column settings has now a option to hide timestamp.
=> Correct columns should now be hidden.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Fri, 18 Feb 2022 20:44:14 +0000 (10:44 -1000)]
Bug 30136: Add back to top button to OPAC
Like in many websites, when scrolling down the page make a button appear to go back to top.
This can be very useful specially in search results page.
This patch adds to OPAC using Javascript a button with id "backtotop".
Button appears when 300 pixels from top are hidden.
This value may be adapted.
Test plan
1) Go to OPAC
2) Perform a search with many results
3) Scroll down
=> Back to top button appears
4) Manually scroll back to top
=> Button disappears
5) Scroll down and click on Back to top button
=> You get to top
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 12 Jan 2022 14:47:59 +0000 (15:47 +0100)]
Bug 29648: Remove default sort order for detail
On the detail view the number of columns changed, we cannot use the
default sort order here.
It certainly can be done on a different way but I prefer to postpone it
for now and see later.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 16 Dec 2021 13:07:05 +0000 (14:07 +0100)]
Bug 29648: Item lost report - no change
hum, there is no sort on this table, so it's displayed like it's coming
from the controller, but perl code does not sort either.
This could be improved and we could make it configurable easily
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 16 Dec 2021 11:48:57 +0000 (12:48 +0100)]
Bug 29648: Catalogue detail - no default_display_length
On the acquisition table the sort option is not available as we don't
offer the ability to selection asc/desc and default to asc.
We cannot offer default_display_length for those tables.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 16 Dec 2021 11:11:57 +0000 (12:11 +0100)]
Bug 29648: Order search view - normal
"normal" means that we are expecting the table to have the 2 options
implemented and working.
You can select "Default display length" and "Default sort order"
in the "table settings" administration view, then go the the view
and confirm that the table has the configured values pre-selected.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 16 Dec 2021 10:50:58 +0000 (11:50 +0100)]
Bug 29648: Move NumSavedReports to the table settings
The syspref NumSavedReports can be moved to the table settings config
Test plan:
1. Set the syspref to a given value
2. updatedatabase # execute the atomic update
3. Go to the table settings page and confirm that the syspref's value
has been retrieved
4. Select a specific colonne for the default sort
5. Go to the report list view and confirm that the "Show X entries" has
the correct selected value and that the table is sorted as you expect.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 16 Dec 2021 10:34:02 +0000 (11:34 +0100)]
Bug 29648: Improve existing code
We already have 2 tables that are configurable, on acqui/basket and
reports/orders_by_budget.
This patch is modifying a bit the existing code to transfer the
responsability/logic to the KohaTable constructor instead of the
template that is creating the object.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch reinstates the authorised value 'qualif'
to it's corresponding place
This authorized value is used in UNIMARC default bibliographic
framework.
To test:
1) Do a clean install or load the YAML file
2) Verify 'qualif' authorised_value is present in subfield $4 of
fields 700/1/2/3, 710/1/2/3, 720/1/2/3 and 730
This authorized value is used in UNIMARC default bibliographic
framework.
To test:
1) Do a clean install with optional files or load the YAML file
2) Verify new SUGGEST values are in the database
SELECT * FROM authorised_values WHERE category = 'SUGGEST';
This patch adds UNIMARC relator codes into
mandatory auth_values.yml
This authorized value is used in UNIMARC default bibliographic
framework.
To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
SELECT * FROM authorised_values WHERE category = 'qualif';
This patch adds language codes (ISO 639-2) into
mandatory auth_values.yml
This authorized value is used in UNIMARC default bibliographic
framework.
To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
SELECT * FROM authorised_values WHERE category = 'LANG';
This patch adds COUNTRY codes (ISO 3166-1) into
mandatory auth_values.yml
This authorized value is used in UNIMARC default bibliographic
framework.
To test:
1) Do a clean install or load the YAML file
2) Verify new country codes are in the database
SELECT * FROM authorised_values WHERE category = 'COUNTRY';
Nick Clemens [Wed, 22 Sep 2021 12:55:19 +0000 (12:55 +0000)]
Bug 29077: Remove blank indexes before convert
To test:
1 - Be using Elasticsearch
2 - Search on OPAC with dropdown set to 'Library catalog'
3 - Warns in plack-opac-error.log
4 - Apply patch
5 - Repeat
6 - No warns
7 - Search returns correct results
Adam Styles [Fri, 4 Mar 2022 00:22:38 +0000 (11:22 +1100)]
Bug 30224: Show correct important field in cataloguing validation
This patch fxes the cataloguing validation messages to show the correct tag, when the whole field is important (not just a subfield).
Note: Look at Bug 30159 to fix the formatting of the validation popup.
1. Go to Administration -> MARC bibliographic frameworks
2. Click Actions next to a framework, view MARC structure
3. Edit multiple tags (at least 2) and check the Important checkbox.
4. Go to cataloguing and create a new record using the framework you just edited
5. Don't fill any of the important fields. Click Save to force the validation for the important tags
6. Notice that the error message shows that an important field isn't filled, but the tag number shown is repeated for each message. The 'Go to field' link goes to the right tag, but the tag number shown is incorrect.
7. Apply patch and refresh page
8. Click Save to force validation again.
9. Confirm the correct tag number is now showing for each error message.
Sponsored-by: Education Services Australia SCIS Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 7 Apr 2022 09:36:00 +0000 (09:36 +0000)]
Bug 30482: Potential for bad string concatenation in cataloging validation error message
In validating the basic MARC editor form before submission, we run
AreFieldsNotOk() twice (once with the parameter "false") and concatenate
the result for output. This creates the potential for the error string
to be appended with "0" if AreFieldsNotOk() returns false.
This patch improves the logic around building the error string.
To test, apply the patch and make sure one of your MARC frameworks
contains at least one mandatory field and at least one important field.
- Edit or create a MARC record in the basic MARC editor.
- Submit the form in various states of completion:
- If a mandatory and an important field are empty, you should see two
error messages at the top. "The following mandatory subfields aren't
filled" and "The following important subfields aren’t filled."
- If a mandatory OR an important field is empty, you should see a
single message.
- If it's the important field which is empty, a confirmation will
ask if you want to save the record anyway. Test that both answers
to this confirmation work correctly.
- If no mandatory or important fields are empty the form should
submit.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1. Run:
$ kshell
k$ cd misc/translator
k$ perl translate update es-ES
2. On your git checkout run:
$ git diff | grep '\[% limit or'
=> FAIL: That shouldn't be translated
3. Run:
$ git reset --hard HEAD
4. Apply this patch
5. Repeat 1 and 2
=> SUCCESS: No attempt to translate that tag
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Wed, 2 Mar 2022 16:21:41 +0000 (16:21 +0000)]
Bug 30191: Authority search result list in the OPAC should use 'record' instead of 'biblios'
This patch updates the OPAC authority search results page so that it
uses the term "record" instead of "biblio."
The patch also changes how the template outputs the count of records so
that it is correctly pluralized, e.g. "1 record" vs. "2 records."
To test, apply the patch and perform an authority search in the OPAC.
In the search results, confirm that the last table header reads
"Records." The information in that column should be correct, using the
word record or records.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30534: Remove guarantor_id attribute from the patron object
This patch removes an attribute that was actually removed 3 years ago
and causes an exception when trying to search for it. The API responses
don't include it anyways.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 8 Apr 2022 08:22:05 +0000 (10:22 +0200)]
Bug 30405: Reduce font-size for address in patron search result
The address has a font-size: 110%, it's not needed here, 100% is enough.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 15 Apr 2022 11:45:08 +0000 (11:45 +0000)]
Bug 29155: (follow-up) Work around change to jQueryUI tab API
For some reason, with the combination of jQuery 3.6.0 and jQueryUI
1.13.1, the way to access the current active tab's link has changed.
Previously the tab activate event would provide information about the
link as "ui.newTab.context." It appears that "context" is no longer
available.
This patch updates the two instances in Koha where this process is
broken.
To test, apply the patch and check out to a patron with holds on their
account.
- When the checkout page loads, confirm that each tab loads its contents
correctly when clicked.
- Check that the correct tab is activated when you append the tab link
to the page url, e.g.