Commit graph

49450 commits

Author SHA1 Message Date
5eaee314c5
Bug 33671: Update POD, remove unneeded check in relationship->guarantor
[1] Update POD for $patron->guarantor_relationships
[2] Remove check from Patron::Relationship->guarantor

Test plan:
Run t/db_dependent/Koha/Patron.t
Run t/db_dependent/Patron/Relationships.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:24 -03:00
1dee35d412
Bug 33671: Fix for 30472 - Remove null-guarantors
These guarantors cannot be added. They are of no use.

NOTE FOR QA/RM: I do not think that it is needed to add a new
db rev for this change since it happens seldom. But if you think
that it is, just copy it to atomicupdate/change bugno.

Test plan:
[1] Check your table definition and modify it:
    alter table borrower_relationships modify column `guarantor_id` int(11) NULL;
[2] Add an empty guarantor:
    insert into borrower_relationships (guarantee_id,relationship) values (SOME_PATRON_ID,'father');
[3] Run the dbrev and verify that the inserted record has been removed.
[4] Check table definition with 'show create table borrower_relationships'.
    You should see NOT NULL with guarantor_id.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:24 -03:00
6fafe5e05b
Bug 30928: DBRev 22.12.00.032
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:23 -03:00
dc6d0ca254
Bug 30928: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:23 -03:00
Aleisha Amohia
2f01be170f
Bug 30928: (QA follow-up) DB updates
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:22 -03:00
60c4611955
Bug 30928: Add interface to statistics
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:22 -03:00
ce8911a955
Bug 30928: Add tests
prove -v t/db_dependent/Koha/Statistics.t
prove -v t/db_dependent/Stats.t

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:21 -03:00
f88b2606ba
Bug 33053: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-10 14:19:21 -03:00
eef03d1436
Bug 33673: DBRev 22.12.00.031
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 12:45:02 -03:00
7c6f68f1ec
Bug 30621: Add author column to opac-readingrecord.tt
To test:
1. Have a patron with some checkout history.
2. Go to that patrons OPAC reading history page, notice author is listed in the same column as title. You cannot sort by author.
3. Apply patch and look again.
4. Now there should be an author column that allows patrons to sort by it.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:47:01 -03:00
5b7879ebf8
Bug 25379: (QA follow-up) Adjust other occurrences and add line break
This updates the other occurrences and adds html_line_break to all
except the edit page - it seems html or raw doesn't affect the value of the textarea,
but moved to raw for consistency

To test:
1 - Add an HTML note to a patron, make sure to add a line break:
<h1>Testing</h1>
<h2>Newline</h2>
2 - Checkout to patron and return
3 - Confirm note shows correctly
4 - Add patron to a list
5 - Confirm note displays correctly
6 - Edit patron, confirm note field is correct
7 - Batch modify borrower
8 - Confirm note displays correctly in batch list

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:47:01 -03:00
Katrin Fischer
2608e405de
Bug 25379: Add raw filter to circulation note on checkin page
This is a consistency patch: we already allow adding HTML tags
to the patron circulation note and the contents display
correctly in the patron account and in the patron search results
in the staff interface. But the HTML tags are printed on the
checkins page.

To test:
* Add a circulation note including HTML tags to a patron
  Example: <h1>This patron is great!</h1>
* Check an item out to this patron
* Verify that the note displays formatted in patron search results
* Verify that the note displays formatted in the patron record
* Return the item
* Verify the note shows the printed tags
* Apply patch
* Check item out again and check it in again
* Verify the note now displays correctly in list of checkins

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:47:00 -03:00
Katrin Fischer
2873847246
Bug 32917: Fix sample notice for CHANGE_PASSWORD
We've identified 3 issues:
* Name of patron is not showing up in subject line
* Name of patron is now showing in notice text
* Notice is set to be HTML, but has no line breaks and uses no HTML tags

In the database update, these issues don't occur:

$dbh->do( q{
    INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('members', 'PASSWORD_CHANGE', 'Notification of password change', 'Library account password change notification',
    "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nWe want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff.\r\n\r\nYour library.", 'email');
});

So this patch will make them match up:

* Remove HTML flag
* Update patron. to borrower. in message text
* Remove patron name from subject (it won't work even with the correct variables)

To test:
* Add an email address to your favourite sample user
* Make sure NotifyPasswordChange is set to "Notify"
* Update the sample user's password using the "change password" feature
* Verify a notice is shown in the notices tabs
  Note: you won't see the line break issue there because of bug 30287
* Apply patch
* Recreate your database/run web installer so sample notices are loaded
* Repeat the test, it should generate a nice lookig notice now

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>
2023-05-09 11:46:59 -03:00
Katrin Fischer
2496f6373a
Bug 33253: Turn off autocompletion for 2FA authentication code
The form for entering your authentication code shoudl not suggest
previous codes.

To test:
* Activate TwoFactorAuthentication
* Go to your patron account in staff
* More > Manage 2-factor authentication
* I used "Google authenticator" on my phone, so:
* Open app on your phone, add new and scan the QR code
* Enter activation code
* Log out of staff interface
* Log back in, you are now also asked for an authentication code
  as second step
* Look up code in app, enter, get logged in
* Log out, log back in - the form now suggests the previous code
  when you click on it
* Apply patch
* Reload things (restart_all on ktd)
* Verify that you no longer get the suggestion

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>
2023-05-09 11:46:59 -03:00
1ba08f87f8
Bug 32548: Replace while with map
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:58 -03:00
ca37cbf6ca
Bug 32548: Add tests
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:58 -03:00
76cddd74b1
Bug 32548: Make illrequestattributes available in ILL emails
Without this ILL module only provides very limited data to
be included in the notices sent about the request itself.

We have the columns illrequests, but not the illrequestattributes,
that often will contain the more useful information needed.

This patch enables to use values of the illrequestattributs using
[% illrequestattributes.<attributname> %] in the notices.

To test:
* Apply patch
* First you'll need to activate the ILL module and install a
  backend to use it with. FreeForm was used for this test plan,
  BLDSS is usually also good for testing.
  See: https://wiki.koha-community.org/wiki/ILL_backends
* Also set up an SMTP server to use for notices and make
  sure the email address is set in KohaAdminEmailAddress
  and the user you are using for testing this with.
* Make sure your user has an email address and will receive
  ILL notices by seleting them in the messaging preferences.
* Create an ILL request with the FreeForm backend for your user.
* On the ILL request detail page: "Display supplier metadata"
  Pick some attributes you want to use in the notice
* Go to Tools > Notices and slips and edit ILL_REQUEST_UNAVAIL
* Add some of the attributes you picked. Example:
  [% illrequestattributes.type %]
  [% illrequestattributes.title %]
* Back to the ILL request detail page: Send notice to patron >
  ILL request unavailable
* Go to your patron's account and check the notices tab
* The generated notice shoudl show and include the information
  from the illrequestattributes you picked.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:57 -03:00
Janusz Kaczmarek
c8012d4104
Bug 33037: Koha does not display difference between enumchron and serialseq in record detail view (OPAC and intranet)
Patch 32555 tries to resolve the issue caused by bug 31313.  But the way it is fixed seems to be
at least problematic.  With patch 32555 we will never see the difference between
`serial`.`serialseq` and `items`.`enumchron` which is still intended in opac-detail.tt
(line ~ 1332) and [intranet] catalogue/detail.tt (line ~ 446).  This is because
ITEM_RESULT.serialitem (in opac-detail.tt) and item.itemserial.serial (in catalogue/detail.tt)
refer to non-existing things.  (and therefor the problem described in 32555 no longer emerge).
The original problem is caused by mixing up serialitem with serial in [opac-]detail.pl
and passing serialitem instead of serial to both templates.

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. IN ITEM DETAILS BELOW CHANGE h - Serial enumeration / chronology
        from No. 42 to some different string
   3.3. Click Save
4. Check the items in OPAC and Intranet – you will see only the value from the
   item $h subfield (enumchron) instead of desired "enumchron -- serialseq"
   in case of a difference between `serial`.`serialseq` and `items`.`enumchron`.
5. Apply this patch
6. Repeat 4
7. Check the items in OPAC and Intranet – you should now see the desired
   "enumchron -- serialseq" string.
8. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:57 -03:00
af2792379c
Bug 33672: Don't show item group holds on OPAC if not enabled
This patch adds a check of the syspref 'EnbaleItemGroupHolds' to the
opac request form

To test:
1 - Enable 'EnableItemGroups' system preference
2 - On staff client, view a record details
3 - Go to 'Item groups' tab, add a enw group
4 - On holdings tab, select one or more items and add to group
5 - View record in OPAC
6 - PLace a hold
7 - Note group option is visible
8 - Apply patch
9 - Refresh, no group option
10 - Enable 'EnableItemGroupHolds' system preference
11 - Refresh opac page, note group option is visible

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:56 -03:00
Katrin Fischer
0d888fc419
Bug 22375: (follow-up) Format even more due dates consistently
To test:
Create some checkouts in future and past, make sure to include
some with a time != 23:59.CirculateILL

Verify that the due date is displayed correctly on:
* Catalog detail page > Items tab > Checkout status
* Circulation start page > Renew > Renew one of your checkouts > dialog message
* ILL request page: requires ILL setup and CirculateILL system preference
* Patron acccount in staff > Print > Print summary
* Catalog detail page > Holds > search for patron > due date on checked out items
* Recalls:
  * Activate UseRecalls system preference, set up circulation rules to allow recalls
  * Checkout an item to another user
  * In the OPAC, place a recall on that record with yor use
  * Check "Recall a specific item"
  * Verify due date in item list
  * Place recall on checked out item
  * Patron account in OPAC > Recalls history (due date might have been changed through recall)
* OPAC patron account > Summary > Overdue tab
* Self checkout:
  * Activate WebBasedSelfCheck
  * Go to <opacbaseurl>/cgi-bin/koha/sco/sco-main.pl
  * Log in > Tab checkouts

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

JD amended patch - removed 'fda'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:56 -03:00
e80d5fc0d0
Bug 22375: Format due date consistantly
Test plan:
Make some daily an hourly checkouts and confirm the right display
(hourly with hours and minutes, daily only date) of due date on these
places:
1) catalogue -> checkout history
2) circulation -> overdues with fines
3) <already fixed>
4) circulation -> pending on site checkouts
5) patrons circulation history
6) opac -> account summary ->  relatives checkouts

Note: I suspect the moremember-receipt.tt template is not used anymore
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>
2023-05-09 11:46:55 -03:00
4e599c790f
Bug 33302: (QA follow-up) Rephrase errors to be more user friendly
These error message will show within the patron account. The goal
of this patch is to make them a little more user friendly avoiding
'patron' and 'hold group' terminology :)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:55 -03:00
ee318d20f5
Bug 33302: Send and display errors when a hold cannot be placed on the OPAC
This patch changes opac-reserve.pl to return the error(s) when placing
a hold as a pipe delimited list which is then translated to a message for the
user

To test:
1 - Find a record with items available on the opac
2 - Click 'place hold' and set things up, but do not confirm
3 - In staff client, do something to make hold invalid:
    - Make item damaged
    - Make library not a pickup location
    - Place other holds for patron up to limit
    - etc.
4 - Confirm hold on OPAC
5 - You are sent to patron's account, hold is not placed
6 - There is little or no message to explain why
7 - Apply patch
8 - Repeat
9 - Now errors are clear

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:54 -03:00
1e5c55176e
Bug 33622: Notice content does not show on default tab if TranslateNotices enabled
This patch fixes a conflict between the template-generated markup and
Bootstrap JS which were both competing to show the correct default tab.
It's simpler to rely on JavaScript.

To test, apply the patch and enable the TranslateNotices system
preference if necessary.

- Go to Tools -> Notices & slips
- Go to edit any notice e.g. DUEDGST
- The page should load with the "Default" tab selected by default.
- Enter unique titles and contents under each tab to confirm that the
  data you see under the "Default" or "English (en)" tab is being shown
  in the right place.
- Save your modified notice and edit it again to confirm that the tabs
  correspond correctly to your data.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:53 -03:00
82eb5d7d26
Bug 33206: Unit test
Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:53 -03:00
Janusz Kaczmarek
1330bd7c8d
Bug 33206: Bad title__sort made of multifield 245
In MARC 21, having title search field defined in mappings.yaml as 245abp
(more than one subfield), the Koha generated title__sort will have not
only $a, but also other subfields cut by ind2 characters, i.e.:

245 04 $a Die Renaissance : $b Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

becomes as title__sort:

Renaissance : itektur, Plastik, Malerei, Illustrationen, Zeichnungen

instead of:

Renaissance : Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

This is because copying an array of pointers in Perl causes you to
point to the same (anonymous) element.  Therefore, the intended
modification only for subfield "a"
(Koha/SearchEngine/Elasticsearch.pm, ~line 1157) causes in fact
modification for all the subfields sharing the same mapping
definition and introduction of the nonfiling_characters_indicator to
all subfields 245 when processing 245abp.  And this is obviously not
what is intended and results (in some cases) with bad sort order
when sorting by titles.

Test plan
=========
1. Have a standard Koha ES installation. In mappings.yaml
   you should have 245abp for title search field.

2. Insert / download / modify a record with 245 $b or $p,
    an article at the beginning of the title, and correctly
    set 2nd indicator. For instance:

245 04 $a Die Renaissance : $b Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

3. In ES, with Kibana or culr, control the content of
   title__sort field for the related document.  It will be:

Renaissance : itektur, Plastik, Malerei, Illustrationen, Zeichnungen

4. Apply the patch, full reindex ES (--rebuild -r -d -a -b)

5. In ES, with Kibana or culr, control the content of
   title__sort field for the related document.  It should
   be now correct, i.e.:

Renaissance : Architektur, Plastik, Malerei, Illustrationen, Zeichnungen

Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:52 -03:00
3bb7ea2dab
Bug 33569: Fix sort by relevance in catalog search
When ordering catalog search by relevance from advanced search, this is not visible in sort order combobox in staff interface.

This is because sort by relevance is a special case not using sort
order.
This patch add a new method C4::Context->default_catalog_sort_by to use
in both staff interface and OPAC.

Test plan :
1.0) On staff interface
1.1) Define system preferences defaultSortField = 'relevance' and defaultSortOrder = 'descending'
1.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected (with a check icon)
1.3) Perform an advanced search on any term, ie 'perl', with sort by relevance
=> Without patch : you see in sort combobox 'relevance' not selected (no check icon)
=> With patch : you see in sort combobox 'relevance' selected (with a check icon)
2.0) On OPAC
2.1) Define system preferences OPACdefaultSortField = 'relevance' and OPACdefaultSortOrder = 'descending'
2.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected
3.0) Run prove t/Context.t

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>
2023-05-09 11:46:47 -03:00
7323a56823
Bug 33653: Use filter_by_active instead
This patch makes `filter_by_lates` use the `filter_by_active` method
instead of an ad-hoc query filter. It has the advantage that it
considers standing orders too.

No behavior change, tests should still pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:07 -03:00
64c4f115cd
Bug 33653: Never consider received orders as late
We should not list received orders on the late orders page.

Test plan:
* Create a basket
* Create a normal order (not from a subscription, no standing order)
* Leave estimated delivery date empty
* Close the basket
* Create a new invoice and receive the order line
* Go to acq > late orders
* Verify the order is not in the list
* Set filter for 'To' date into the future, i.e. 01/01/2025
=> Without this patch the order shows up
=> With this patch applied the received order does not show up

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:07 -03:00
f7b1c85f73
Bug 33576: (QA follow-up) Polish comment, typo
No test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:06 -03:00
9af2f3d12c
Bug 33576: Index records after import transaction is committed
This patch simply moves our indexing call after the transaction is committed so
that the job will exist in the DB when called.

To test:
 1 - Have Koha using Elasticsearch
 2 - Stage and import a file of records
 3 - View the job in Admin->Manage jobs
 4 - Note it is not finished
 5 - Check log: /var/log/koha/kohadev/es-indexer-output.log
 6 - Note: [WARN] No job found for id=###
 7 - Apply patch
 8 - Stage and import
 9 - Note no error in log
10 - Note successful completion of indexing job

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:05 -03:00
ff93ce714b
Bug 33613: Use prop() to evaluate checkbox
To test:
1. Have an item with a replacement cost checked out to a patron
2. Set the ClaimReturnedChargeFee sys pref to "Ask if a lost fee should be charged"
3. Make a claim and check the box for charging.
4. Claim happens but no charge occurs.
5. Apply patch and try again.
6. A charge should now occur.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:05 -03:00
4ea2f11718
Bug 33412: Fix comparison when checking for overlay framework
TO test:
 1 - Cataloging -> Export catalog data
 2 - Export a record fom your catalog
 3 - Cataloging -> Stage record for import
 4 - Import the record, use Record matchign rule: KohaBiblio (999c)
 5 - Stage, view batch
 6 - Record should match the one that was exported
 7 - When replacing record use this framework, choose a different value than current framework of record
 8 - Import this batch
 9 - View and edit record - note framework did not change
10 - Apply patch
11 - Restart all
12 - Repeat 4-8
13 - View and edit record, confirm framework has changed
14 - Sign off

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>
2023-05-09 10:58:04 -03:00
ca784d740d
Bug 33611: Ensure dt_from_string always returns a new object
This patch alters dt_from_string to pass a cloned object if called
on an existing date time object

This resolves an issue where a holds reserve date was being altered when
the default expiration date was set

To test:
1 - Set DefaultHoldExpiration to Set
2 - Set DefaultHoldExpirationPeriod to 365
3 - Set DefaultHoldExpirationunitOfTimeToDays
4 - Place a hold
5 - Note reserve date is 1 year in the future, same as expiration
6 - Apply patch
7 - Restart all
8 - Place another hold
9 - Note reserve date is set to today

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:04 -03:00
3551ef41a0
Bug 33611: Unit test
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:03 -03:00
b614146972
Bug 33591: Restore auto-select of checkboxes of src record when merging
When merging bib records the first tab (the source record) should have
all the checkboxes checked by default.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:03 -03:00
Didier Gautheron
0c1d7fe0fb
Bug 33513: Remove whitespace in batch report lists
Bug 32368 added whitespaces, remove them.

To test:
 1 - Create a report like:
    SELECT biblionumber FROM biblio
 2 - Run it
 3 - Try the various options from the 'Batch operations' button
 4 - The operations don't find the biblios
 5 - Create a report like:
    SELECT cardnumber FROM borrowers
 6 - Run it
 7 - Test the batch operations
 8 - They fail
 9 - Apply patch
10 - Run each report again and test batch operations
11 - They work!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:02 -03:00
Katrin Fischer
2ef95d9142
Bug 33586: Fix sequence of fields for memberresultst in table configuration
The sequence of options actually matters, not the name.
Library and category were switched, this patch fixes it and
now it should all hide/show as expected:

* Go to administration > table configuration
* Hide library in memberresultst
* Go to patron search and search
* Verify that category was hidden instead
* Apply patch
* Verify now label and columns for library and category
  match with configuration.

Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:02 -03:00
David Nind
d6b5a7f7df
Bug 33673: Change "global system preferences" to "system preferences"
The Koha Community normally refers to "global system preferences"
as just "system preferences".

This updates the staff interface and other occurences to refelect
this, including:
- Administration > Global system preferences and the description
- Patrons > [a patron] > More > Set permissions > Manage Koha
  system settings > Manage global system preferences
  (manage_sysprefs)
- The installer files and the database (permissions table)

Test plan:
1. Note that in the staff interface "Global system preferences"
   is dispalyed in two places:
   1.1 Administration: Go to Administration. There is a section
       called "Global system preferences" with a description
       and a search box.
   1.2 User permissions: View the details for a patron > More >
       Set permissions > expand 'Manage Koha system settings' >
       scroll down to 'Manage global system preferences
       (manage_sysprefs)'
2. Apply the patch.
3. Update the database.
4. Revisit the pages in step 1 - these should now show as
   "System prefereneces" or "system preferences" as appropriate.
5. Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
I agree with this change, consistency is good. As far as I can see
this patch cathes all the occurrences of "global".
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:01 -03:00
Katrin Fischer
79188de0cd
Bug 33356: Add mana-kb hint to reports start page
An alternate placement of the Mana KB hint on the reports start page.

To test:
* Go to Reports module
* Verify the hint shows when you haven't decided on Mana KB
* Once you set yes or no, it will no longer show

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:01 -03:00
Philip Orr
a2b880e57b
Bug 28315: Remove duplicate function definition
This patch removes the unnecessary second definition of the JS function PopupMARCFieldDoc from addbiblio.tt.
To test:
1. Apply the patch
2. Check that addbiblio.tt contains only one function definition for PopupMARCFieldDoc
3. Navigate to "Cataloging" -> "Add MARC record"
4. Check that after clicking on the question mark symbol next to any MARC field, the loc description of that MARC field is opened in a new tab

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:58:00 -03:00
5771e6f463
Bug 32232: Ignore DST when calculating patron age
This change calculates patron age using the floating timezone, so that
datetimes missing midnight don't cause fatal errors in the comparison.

Test plan:
0. Apply patch
1. Change <timezone></timezone> in koha-conf.xml to include Canada/Eastern
2. koha-plack --restart kohadev
3. Create a patron, setting the date of birth to one of these three dates
- 1947-04-27
- 1948-04-25
- 1949-04-24
4. Save the patron
5. Patron detail page loads instead of producing fatal error

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:59 -03:00
b1f623218a
Bug 33696: Fix doubled up home icon in budgets page
To test:
1. Go to the Administration > Budgets page
=> FAIL: Breadcrumbs show two little house icons
2. Apply this patch
3. Reload page
=> SUCCESS: Only one icon
4. Sign off :-D

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>
2023-05-09 10:57:59 -03:00
Janusz Kaczmarek
eb5cc8d708
Bug 33093: (Bug 27546 follow-up) With ES searching within results does not work for 'Keyword' and 'Keyword as phrase'
The feature of searching within search results in librarian
interface has some problems with with elastic: 'Keyword' and
'Keyword as phrase' searches give no results.  This is because
elastic is unaware of the search field 'kw' and 'kw' is not
transformed nor removed for limits.

Test plan
=========
1. Have a Koha instance with reasonable number of biblio records
1. Set SearchEngine to Elasticsearch
3. In librarian interface, perform a search that would give
   you a list of results
4. With the new search box 'Search within results', having 'Keyword'
   and 'Keyword as phrase' active, try to perform a search within
   search results with a term that should give you some results
5. You should get no results
6. Apply the patch
7. Repeat steps 3 and 4
8. You should get expected results.  Note the difference between
   'Keyword' and 'Keyword as phrase' in results
9. Sign off

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:58 -03:00
2553dcef23
Bug 33601: Use template wrapper for breadcrumbs: Tools, part 8
This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Tools home page
    - Log viewer
      - Search result
    - Uploads
      - Upload results
- Cataloging ->
  - Upload local cover image
    - Upload result
    - Test uploading an biblio-level image from the bibliographic detail
      page
    - Test uploading an item-level image from the bibliograhpic detail
      page's holdings table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:58 -03:00
db488358fe
Bug 33600: Use template wrapper for breadcrumbs: Tools, part 7
This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Task scheduler
- Cataloging ->
  - Stage MARC records for import (use a batch of MARC records which
    will match existing records)
    - View batch ->
      - View diff of records with a match
  - Stock rotation (must have StockRotation enabled)
    - New rota
    - Edit rota
    - Manage stages
    - Manage items

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:57 -03:00
Katrin Fischer
fc9ca425c8
Bug 33643: Add page-section to 'scan index' page in staff interface
This adds the white background. As we do on other pages I have
chosen to include the h2 heading within the page-section.

To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* On the result list verify there is no white background/page section
* Apply patch
* Repeat test - background should be present now

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nicolas Giraud <nicolas.giraud@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:57 -03:00
b7c1f3cf58
Bug 31799: (follow-up) Add 409 error to spec
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:56 -03:00
Agustin Moyano
ead5f5c2f4
Bug 31799: (follow-up) Tidy up and fix duplicate barcode handling
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:56 -03:00
Agustin Moyano
51d50810fa
Bug 31799: Add REST endpoint to modify a biblio's item
To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Get a biblio with an item
4. Make a PUT request to /api/v1/biblios/:biblio_id/items/:item_id with a json body that represents an item to replace
5. Check that the item was modified
6. Sign off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 10:57:55 -03:00