Commit graph

5790 commits

Author SHA1 Message Date
b5e1b2137f Bug 33117: Make dbrev idempotent
QA didn't spot the issue, nor I. So fixing now.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 951e67a1b3dd1f26eddeaecd2dc63991f9667927)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit caa46019d0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-17 15:53:02 +00:00
2d9ace29c7
RMAINT: Fix permission of .08 release db_rev
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-08-15 10:37:08 +01:00
e4ddcfa49b Increment version for 22.11.08 release
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-28 11:15:31 +00:00
80fe98aff7 Bug 33671: (follow-up) Disable FK check for column change
See also BZ report. As suggested by Tomas.

NOTE: The dbrev is extended too for removing records with a failing guarantor_id
foreign key (theoretically not present obviously).

Test plan:
1) cp installer/data/mysql/db_revs/220600048.pl installer/data/mysql/atomicupdate/
2) Run updatedatabase.pl
3) Remove copied file

Bonus:
Manually remove FK constraint before running updatedatabase.
Insert a record with bad guarantor_id into relationships manually.
Run the update again.
You should not see the message that the constraint is removed.
Is the bad record count reported and record removed?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Simplified. No longer removes the FK. Just disables during ALTER.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0397251ece)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4cdb3a57db)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-19 10:14:25 +00:00
fa3bd17476 Bug 34029: (QA follow-up) Fix slipped broken char
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 12956d3e8a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb202cc3ea)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-19 08:54:02 +00:00
fc6d2d4dd7 Bug 33720: Also flush in install
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 41c43449c6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1961490c2e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-18 13:00:03 +00:00
08d0727020 Bug 33720: Update the updatedatabase.pl script to flush caches before running
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4391e23ea5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 834245b709)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-18 13:00:03 +00:00
7ebdb10573 Bug 34029: DBRev 22.11.07.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 532cf4ab9f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a0cc737bc6)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 11:53:29 +00:00
e6d8add0b7 Bug 34029: Extend datatypes of biblioitems.columns to text to avoid breaking import
This updated the datatype of the following columns from varchar(255) to text
to avoid import problems if the mapped MARC field's data exceeds 255
characters.

This is for:
* place (260$a and 264$a)
* publishercode (260$b and 264$b)
* size (300$c)
* illus (300$b)
* pages (300$a)

To test:
* Edit a bibliographic record and enter more than 255 characters into
  the MARC fields listed above. Try to save.
* Run the updatedatabase script to modify the DB structure
* restart_all
* Edit a bibliographic record and enter more than 255 characters into
  the MARC fields listed above.
* Save
* Export the record
* Import the record using staging tools, all should work well

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 00545f8780)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ad93540d59)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 11:52:12 +00:00
da76c54dbd Bug 33117: DBRev 22.11.07.002
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5f1c5a04fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 073744284a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 11:16:36 +00:00
63bb0cbd2e Bug 33117: (follow-up) Rename preference
As it's been requested that we keep the search defaults consistent, I
think this preference is better names DefaultPatronSearchMethod and
appear next to DefaultPatronSearchFields. This patch makes that change,
though actually applying it to the other search area's (outside of
autocomplete) has been left for another bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c50fab16b5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6ea0111ef8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 11:15:45 +00:00
Laura Escamilla
d1be3c746b Bug 33117: Adding new PatronAutoCompleteSearchMethod system preference
This patch adds a new system preference called "PatronAutoCompleteSearchMethod"
which allows staff to choose between "Starts with" or "Contains" when
searching for patrons.

The "Contains" option should be useful when searching for patrons that have
multiple surnames or when searching using a patron's middle name.

New Test Plan:
 0. Ensure system preference PatronAutoComplete is set to Try
 1. Create a patron that has a first name, middle name and two surnames.
    (i.e. Adela Maria, Hernandez Acosta).
 2. In patron or checkout search, enter their first name and first
    surname without submitting.
 3. Confirm that a record is found in the autocomplete results
 4. In patron or checkout search, enter their first name and second
    surname without submitting.
 5. Confirm that no record is found.
 6. Enter their middle name and first surname. Confirm that no record is
    found.
 7. Enter their middle name and second surname. Confirm that no record
    is found.
 8. Apply the patch, update database
 9. Under Administration > Global System Preferences > search for
    "PatronAutocompleteSearchMethod"
10. Choose "Contains" instead of "Starts with" for the system
    preference, reload your search page
11. Repeat steps 2-4. The patron record should appear for all search
    methods.
12. Sign off!

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>
(cherry picked from commit 7b675997b4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e5e9f2c203)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 11:15:34 +00:00
a1c0c3ec6b Bug 34033: (bug 30649 follow-up) Fix update typos
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96794db659)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d636c81cd6)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 10:30:09 +00:00
7fc1d88641 Bug 32478: DBRev 22.11.07.001
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 233094521e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 09:00:47 +00:00
David Gustafsson
90ff0af534 Bug 32478: Fix handling of undef values in ItemsDeniedRenewal
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9c89bf1956)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-07-18 08:57:43 +00:00
86ecefe829 Bug 30649: (follow-up) Improve database update
This patch implements the proposed switch to use the standard DB handle
and only require Koha::Encryption if necessary.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8d2291f2e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f742b2a84a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-12 09:41:28 +00:00
e7aab76191 Increment version for 22.11.07 release
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-23 14:52:49 +00:00
9d327f5496 Bug 21983: DBRev 22.11.00.005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa32188553)
2023-06-12 11:16:18 +00:00
b60671cff3 Bug 21983: DB update
This patch:
- Adds a illrequests.deleted_biblio_id column
- Adjusts existing db_rev so people upgrading have the biblio_id value
  moved to the also created column, before attempting to add the FK
  constraint on the biblios table.
- Adds a new db_rev for those who unfortunately already updated, it
  should be idempotent.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1346c2025)
2023-06-12 12:03:49 +01:00
31120931d3 Bug 33697: DBRev 22.06.00.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d196b9b619)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-12 10:28:25 +00:00
ac012ea98c Bug 33697: Remove RecordedBooks (rbdigital) integration
RecordedBooks search API integration is now obsolete following
rbdigital's incorporation into OverDrive. Associated code should be
removed.

https://company.overdrive.com/2020/06/23/overdrive-to-acquire-rbdigital-from-rbmedia/

Test plan:
use git grep extensively and confirm that this patch removes all
occurrences of this feature.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8b9355088a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33fdf290bb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-12 10:28:24 +00:00
4d85db4e51 Bug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers'
This patch updates instances in the code and templates where the term
"Authentication providers" is used, replacing it with the preferred
"Identity provider."

Most of the instances of this change are in module or API documentation,
but you can see a couple of the changes in the interface:

- Administration -> Identity providers:
  - The sidebar menu should show "Identity providers" instead of
    "Authentication providers."
- Patrons -> Patron details -> More -> Set permissions
  - Under " Manage Koha system settings (Administration panel)" you
    should see "Manage identity providers (manage_identity_providers)"

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d634c1971f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-12 10:14:43 +00:00
dd07b44968 Bug 22440: (QA follow-up) Fix wrong check in db_rev
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a1924bb31d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:28:45 +00:00
Phil Ringnalda
202f376c42 Bug 33138: Don't copy tag 147 to authority MARC frameworks
We shouldn't be including tag 147 in every authority MARC framework we
install, since like all 1xx authority tags there should only be
one per record. It only belongs in a NAME_EVENT framework, which we
don't install.

Test plan:

1. Apply patch, kd && ku or however you like to restart
2. Administration - Authority types - Actions button for Default
   - MARC structure
3. In the search box below the text "Select an authority framework"
   enter 147 and click OK
4. Once you see that it exists in Default, switch the dropdown to
   each of the other frameworks and verify it doesn't appear in
   any.

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>
(cherry picked from commit 409891ed50)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:20 +00:00
97aa23c7f3 Bug 33489: (QA follow-up) Add missing index prefix in DBRev
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c69b7c69ca)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:28:07 +00:00
61c4f25542 Bug 33297: DBRev 22.11.06.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9633c0a7de)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
9811b13bc7 Bug 33297: (follow-up) DBRev check wrong preference exists
Better db upgrade messages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fdd8ca72e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
f45c85e8e0 Bug 33297: (follow-up) DBRev for existing databases
Test plan :
1.1) Start from a Koha 22.05
1.2) Upgrade to master
=> Check the upgrade says :
   Wrong system preference 'RetainPatronSearchTerms' renamed 'RetainPatronsSearchTerms'
2.1) Start from a Koha 22.05
2.2) Upgrade to 22.11
2.3) Via interface change system preference 'RetainPatronsSearchTerms' and save
2.4) Upgrade to master
=> Check the upgrade says :
   Wrong system preference 'RetainPatronSearchTerms' deleted

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>
(cherry picked from commit 72d88cab9e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
247f2e23de Bug 33297: Fix typo system preference RetainPatronSearchTerms in DB revs 220600044.pl
Bug 26247 added system preference RetainPatronsSearchTerms.
There is a typo in DB revs 220600044.pl : RetainPatronSearchTerms instead of RetainPatronsSearchTerms.

Test plan :
Upgrade from 22.05 to 22.11 and check there is a system preference named 'RetainPatronsSearchTerms'

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>
(cherry picked from commit c5bf76b19e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
37449d4dd2 Bug 21330: DBRev 22.11.06.002
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88989f44a3)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 09:05:01 +00:00
af9a88a10b Bug 21330: (follow-up) Fix new preference text and place
Atomic updated fixed : intranet => OPAC
Changed to be more like the one adding AuthorityXSLTOpacResultsDisplay

New preference moved to opac.pref

Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edd6d7d066)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 09:05:01 +00:00
jeremy breuillard
406f5eff3c Bug 21330: Allow XSLT for authority detail view in OPAC
This patch adds a syspref that allow to customize the authority detail
view in OPAC with XSLT.

Test plan:
1. Make sure to have at least one or more authorities
2. OPAC: Home > Authority search(Submit) > Authority search results
3. Click details on a result and notice the view
4. Apply patch
5. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacDetailsDisplay"
6. Write the path where your file is. You can try with the XSLT for
   biblio for instance:
   .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl
7. Save changes
8. Repeat 2-3 and notice the display

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 287b55f33b)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 09:05:01 +00:00
61a583a2a8 Bug 30649: DBRev 22.11.06.001
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d86786401a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-02 11:49:09 +00:00
a5d01aac49 Bug 30649: Vendor EDI account passwords should be encrypted in the database
We are storing edi vendor acccount passwords in clear text in the
database. Now that Koha has the Koha::Encryption module, we should
use that to encrypt passwords for all existing and new EDI accounts.

Test Plan:
1) Apply this patch
2) Create one or more EDI vendor accounts
3) Run a report to view the account passwords, note they are in clear
   text
4) Run updatedatabase.pl
5) Re-run the report, account passwords should be encrypted now
6) Edit a vendor EDI account, note you can still view and update the
   password for an account

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40b1b61cbf)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-02 11:49:09 +00:00
469e4b26f2
Increment version for 22.11.06 release
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-23 09:13:47 +01:00
dc4b3a09f4
Bug 33488: DBRev 22.11.05.012
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17cd6180cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:49:07 +01:00
99608d8bea
Bug 33488: (QA follow-up) Fix index name
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 828a571067)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:48:30 +01:00
0f22cce94b
Bug 33488: Add fromBranch index to branch_transfer_limits
To test:
1 - Enable UseBranchTransferLimits by item type
2 - Set some limits for book
3 - Place a hold, verify that pikcup dropdown reflects the limits before and after patch

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c2b33e4c56)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:48:30 +01:00
7e301dd2ae
Bug 32357: DBRev 22.11.05.011
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8ff7196c26)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:44:53 +01:00
Lari Taskula
7e8cad7ee3
Bug 32357: Set borrower_message_preferences.days_in_advance default to NULL
To test:
1. prove t/db_dependent/cronjobs/advance_notices_digest.t
2. prove t/db_dependent/Letters/TemplateToolkit.t
3. prove t/db_dependent/Koha/CurbsidePickups.t
4. prove t/db_dependent/Koha/Patrons.t
5. prove t/db_dependent/Patron/Messaging.t

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>
(cherry picked from commit 6871dc7b35)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:44:53 +01:00
e6e3113842
Bug 33489: DBRev 22.11.05.010
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a84d74102)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:44:53 +01:00
281292e33d
Bug 33489: Add indices to default patron search fields
This patch adds indices to the borrowers table to match the default
search fields for patrons.

To test:
1 - Apply patch
2 - Update database
3 - Ensure patron searching works as before

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>
(cherry picked from commit 1faf3bcf2a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:44:53 +01:00
548e022f87
Bug 33557: DBRev 22.11.05.009
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e791b3b6a6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:32:50 +01:00
9019528b6f
Bug 33557: Add LinkerConsiderThesaurus system preference
Bug 30280 added the ability to use multiple thesauri for authorities in Koha.
This is a large change, and many libraries use authorities in a ess strict manner.
This patch simply adds a preference, disabled by default, to enable this new feature

To test:
1 - Find or create a record with a 650 heading, second indicator 0 (LOC)
2 - Ensure this links to an authority in your system
3 - Disable AutoCreateAuthorities, enable CatalogModuleRelink
4 - Edit the heading to second indicator 2
5 - Save, the heading does not link
6 - Apply patch, updatedatabase, restart all
7 - Edit and save record again
8 - Heading should now link to the LOC authority, despite different second indicator value for source

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf7389d601)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-16 07:32:11 +01:00
e859b6fed5
Bug 28328: DBRev 22.11.05.008
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a487bb847a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-15 19:39:02 +01:00
c0954dc49d
Bug 28328: Extend biblioitems.lccn to longtext
Same sa issn and isbn, we want lccn to allow longer values.

Test plan:
Run the updatedatabase script to modify the DB structure
restart_all
Edit a bibliographic record and enter a long (more than 25 chars) lccn
Save

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a537e57909)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-15 19:38:09 +01:00
Caroline Cyr La Rose
6bc445bdf8 Bug 26403: (follow-up) Deleted old SQL files
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan. Works as advertised.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c07407a82)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:26:14 +00:00
Caroline Cyr La Rose
613671e2d1 Bug 26403: Move credit and debit types into translatable YAML files
This patch moves account debit and credit types, as well as the CASH
payment type, into YAML files under
installer/data/en/mandatory. This should make the debit and credit types
translatable (for new installations only).

To test:
1. Apply patch
2. Update po files
   ./misc/translator/translate update xx-XX
3. View the xx-XX-installer.po file
   -->The default account debit and credit types (and cash payment type)
      should be available to be translated
4. Translate the strings
5. Apply the translations
   ./misc/translator/translate install xx-XX
6. Load the new translated YAML files (with a fresh install, or by deleting
   the values in the db and using ./misc/load_yaml.pl to load the files)
7. In the staff interface, go to Administration > Credit types
   --> They should be translated
8. Go to Administration > Debit types
   --> They should be translated

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 002dbcdc7f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:25:56 +00:00
b6ac9e6b10 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>
(cherry picked from commit 1dee35d412)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:23:14 +00:00
Katrin Fischer
512a31dfff 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>
(cherry picked from commit 2873847246)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:18:19 +00:00
9210083511
Bug 33053: DBRev 22.11.05.007
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 98ed8fe352)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 16:29:50 +01:00
Aleisha Amohia
dba91616e3
Bug 33053: (QA follow-up) fix syntax error
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba88442f41)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 16:29:14 +01:00
59734ea3b3
Bug 33053: Remove default value for tables item_groups and recalls
These default biblio_ids of 0 are harmless but incorrect. The default values should be removed.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Biblio.t
3) prove t/db_dependent/Koha/Recalls.t

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>
(cherry picked from commit ec66ac97f0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 16:29:14 +01:00
07d55778a6
Bug 33197: DBRev 22.11.05.006
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e38df2d6f7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 15:52:18 +01:00
Katrin Fischer
c2c248fc23
Bug 33197: Rename GDPR_Policy system preference
GDPR is a European Union (and, at time of writing, UK) law.
The GDPR_Policy system preference is about a patron
giving consent to their personal data being processed in
line with the library's privacy policy.

The name of the preference is vague: there could be
many policies implemented by libraries to comply with
GDPR. It also makes the preference look irrelevant for
libraries outside the areas where GDPR applies, while
it may be useful for libraries anywhere.

This renames GDPR_Policy to PrivacyPolicyConsent and
adjusts the system preference descriptions.

To test:
* Apply the patch
* Run database update
* Search for GDPR_Policy in the system preference
  - you should not find anything.
* Search for DataPrivacyConsent in the system preferences
  - you should find it and be able to activate it
* Verify the feature works as expected
  - If the preference is set to "enforced", you will be
    asked to give consent to the data privacy agreement
    in the OPAC when you log in
* Verify the page is now phrased neutrally using 'privacy policy'

Bonus: Consent date is now formatted according to DateFormat
       system preference.
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>
(cherry picked from commit bd75309933)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 15:50:56 +01:00
Laura Escamilla
d227910167
Bug 33419: Make home library and current library mandatory by default
Items without a home and current library can cause errors in Koha.
On the bibliographic page, items appear without the "edit" drop-down
or the selection check box. On a bulk delete page, items without
a home library create a red error that says "Cannot delete".

Making the home and current library values mandatory
helps avoid these issues.

Test plan (using koha-testing-docker (KTD)):
1. Reset KTD so that the web installer is used to setup Koha.[1]
2. Setup Koha using the web installer
   -> When setting up the default settings, don't add any of the
      optional data.
3. Once setup and logged in, check the two frameworks (default and ACQ)
    and note that $952$a and $952$b are not mandatory.
4. Apply the patch.
5. Repeat steps 1-2.
6. Once setup and logged in, check the two frameworks (default and ACQ)
   and note that $952$a and $952$b are now mandatory.

[1] How to access the web installer to setup Koha in KTD:
1. Access the database server:
   mysql -uroot -ppassword -hkoha-db-1
2. Drop the koha_kohadev database: drop database koha_kohadev;
3. Create the database: create database koha_kohadev;
4. Add privileges (for a real installation this would be limited):
   grant all on koha_kohadev.* to koha_kohadev;
5. Restart everything (there may be some errors listed):
   flush_memcached and then restart_all
6. Access the web installer: go to 127.0.0.1:8081
7. Use the database user name and password:
   get from /etc/koha/sites/kohadev/koha-conf.xml
   (default: koha_kohadev, password)
8. Continue through the installation process.

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>
(cherry picked from commit a6caabfd2b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 15:36:59 +01:00
fa42d94221
Bug 28267: Simplify things
We don't need:
* a separate Koha::Installer module when we already have
C4::Installer
* the tests as they are actually modifying the DB structure
without rolling back
* An unecessary complicated subroutine, just make is simple

WNC amended patch: Remove change to Koha.pm

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f394bf61cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 15:02:26 +01:00
0abb866b49
Bug 28267: Add warnings for database row formats
This patch adds a warning on about.pl regarding database row formats
other than "DYNAMIC". It points to the Koha community wiki for more
information on how to resolve the problem.

This patch also stops the installer if there are any database tables
with a row format other than "DYNAMIC". It points to the Koha community
wiki for more information on how to resolve the problem.

Test plan:
0a. Apply the patch
0b. koha-plack --restart kohadev
1a. koha-mysql kohadev
1b. ALTER TABLE tags ROW_FORMAT=COMPACT;
2. Go to http://localhost:8081/cgi-bin/koha/about.pl
3. Note that there is a warning about database row formats
4a. koha-mysql kohadev
4b. ALTER TABLE tags ROW_FORMAT=DYNAMIC;
5. Go to http://localhost:8081/cgi-bin/koha/about.pl
6. Note that there is no warning about database row formats

7a. Manually change the version in Koha.pm to a higher version
7b. koha-plack --restart kohadev
8a. koha-mysql kohadev
8b. ALTER TABLE tags ROW_FORMAT=COMPACT;
9. Go to http://localhost:8081/
10. Log into the web installer and click through until you reach
a warning telling you that you have database row formats other
than 'DYNAMIC'
11. Note that you can't progress with the installer until
this problem is resolved
12a. koha-mysql kohadev
12b. ALTER TABLE tags ROW_FORMAT=DYNAMIC;
13. Refresh the page or redo the web installer process
14. Note that you're no longer blocked from running the installer
due to database row format
15. Undo your change to Koha.pm
16. Profit

Note: Due to bug 32665 you'll see an unrelated warning on
step 3

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b76fb9cf46)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 15:02:21 +01:00
7921b0fdbc
Bug 33262: DBRev 22.11.05.005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0587d32386)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 14:59:04 +01:00
16464ef656
Bug 33262: Add deleted_biblionumber column to aqorders table
This adds a new column deleted_biblionumber to the aqorders table.
This will allow us to store the biblionumber of a deleted record,
so we will still be able to tell what has been ordered once the
record is deleted.

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>
(cherry picked from commit 0cf7687e83)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 14:54:05 +01:00
90522198d8
Bug 22440: DBRev 22.11.05.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95520f0fb5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 08:30:55 +01:00
02f7c41ee9
Bug 22440: Add missing foreign key
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f66322194)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-12 08:16:29 +01:00
eefacd1ea9
Bug 32745: DBRev 22.11.05.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 601c597726)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-11 13:20:31 +01:00
4634494df3
Bug 32745: Adjust context for invalid background jobs
We had some problems recently and it's possible to have
background_jobs.context=NULL
But the REST API specs is expecting an object.
We could either modify the specs, or adjust the incorrect entries in DB,
which is IMO better.

Test plan:
0. Don't apply the patch
1. Create some background jobs
2. Set context to NULL
UPDATE background_jobs SET context=NULL;
3. List the jobs and note the datatable error, and the error in Koha log
  OpenAPI >>> GET api/v1/jobs [{"message":"Expected object - got null.","path":"\/body\/0\/context"},{"message":"Expected object - got null.","path":"\/body\/1\/context"}]

4. Apply the patch
5. Run `updatedatabase`
6. Confirm that the list and detail view are not working correctly

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>
(cherry picked from commit 15e234e596)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-11 13:19:06 +01:00
998cc703cd
Bug 33128: DBRev 22.12.00.024
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-11 11:51:15 +01:00
Janusz Kaczmarek
f06de109a1
Bug 33128: Add Polish translations for language descriptions
This adds the Polish translations for the different languages to
subtag_registry.sql that is used by all languages during installation.

* Apply patch
* Run database update
* Install pl-PL and activate it for the OPAC
* Go to advanced search
* Look at the language pull down - it shows the languages in their
  language and then translated to English
* Switch to Polish - verify the Polish translations are used now
  There are 2-3 cases where the translation = name, so only name is shown.
* Drop your database, create your database
* Run the web installer
* Everything should complete without error and the language pull down
  should look exactly the same and be translated

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>
(cherry picked from commit 0b4e73cd7b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-11 11:49:28 +01:00
cc5a6f838b Bug 33300: DBRev 22.12.00.023
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3d239bca6)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:46:31 +01:00
eb72a8d486 Bug 33300: Wrong system preference name AutomaticWrongTransfer
Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'.

But name in installer/data/mysql/mandatory/sysprefs.sql is wrong 'AutomaticWrongTransfer'

Test plan :
Create a new database and check there is in table systempreferences an
entry with variable='AutomaticConfirmTransfer'

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

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

Bug 33300: (follow-up) DBRev for existing databases

Test plan :
1.1) Start from a Koha 22.05
1.2) Upgrade to master
=> Check the upgrade says :
   Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer'
2.1) Start from a Koha 22.05
2.2) Upgrade to 22.11
2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save
2.4) Upgrade to master
=> Check the upgrade says :
   Wrong system preference 'AutomaticWrongTransfer' deleted

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>
(cherry picked from commit eec4921552)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:43:52 +01:00
Katrin Fischer
bc4b29dfaa Bug 31432: Make 245$n$p visible by default in frameworks
$n (part_number) and $p (part_name) now have their own
columns in the database, but we are still hiding them
by default. It woudl ease testing and cataloguig if
we changed them to be visible by default in new installations.

To test:
* Check that in your current frameworks when adding a new
  record, 245 n and p are hidden
* Apply the patch and start over: drop your db and run the
  web installer
* Verify that the fields are now visible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3408802530)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:42:34 +01:00
0c53c5146d
Increment version for 22.11.05 release
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-02 15:17:47 +01:00
d5e12d95c2 Bug 33368: DBRev 22.12.00.019
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba601ca37f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:56:33 +01:00
d978e86b2d Bug 33368: Extends borrowers.flags to bigint
it's a int(11) which means its limit is 2^31

We have currently 29 permissions, there is only one remaining, at 31 permissions
the permission system won't support a case where a patron has all permissions.

Test plan:
Don't apply this patch
Add another permission
INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (30, 'new permission 1', '', 0) ;
Go to the interface, tick all the boxes
select flags from borrowers where borrowernumber=5;
=> 2113928830
Remember:
2^31  2147483648
2^32  4294967296

Add another one
INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (31, 'new permission 2', '', 0) ;
Repeat the step before
=> boom
CGI::Compile::ROOT::kohadevbox_koha_members_member_2dflags_2epl::member_2dflags_2epl(): DBI Exception: DBD::mysql::st execute failed: Out of range value for column 'flags' at row 1 at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30

Apply the patch, try again

QA note: That's ofc not the best solution, but the easiest for now

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e81612c719)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:52:33 +01:00
028af5b7a6 Bug 32437: DBRev 22.12.00.016
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92fbb49af7)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 17:52:58 +01:00
1541885aa4 Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88cf3c76e9)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 17:48:29 +01:00
ccb0ce027b Bug 32437: Add Objects for ImportAuths
This patch:
1 - Adds an atomic update to add a primary key to import_auths table
2 - Adds objects for Koha::Import::Records::Auths
3 - Adds tests for import auth and biblio objects

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>
(cherry picked from commit f41f272ff0)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 17:47:32 +01:00
c1c5420afa Bug 33341: Address some perlcritic errors in 5.36
Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

To test:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10d12f999f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 10:54:27 +00:00
12c2ecb40f
Increment version for 22.11.04 release
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-30 13:25:45 +01:00
Katrin Fischer
b2e509bfcc Bug 33059: Fix capitalizatoin of AV sample category descriptions
* Fixes capitalization
* Standardizes on e-book (see https://www.oxfordlearnersdictionaries.com/definition/english/e-book)
* Standardizes on audiobook (see https://www.oxfordlearnersdictionaries.com/definition/english/audiobook)

To test:
* This is a little difficult to test. What you'd need to do:
* Apply the patch
* Drop your database, recreate it, run the web installer
* Make sure to select the optional AV along with the mandatory to install
* Log into Koha after finishing the installer and go to administration >
  authorised values
* Review the existing sample values for incorrect capitalization in
  the different categories

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e4d527970)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:18:07 +00:00
c0c8009fd9 Bug 32799: DBRev 22.12.00.009
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d6f4edca00)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:41:18 +00:00
Katrin Fischer
b4996bbc11 Bug 32799: Rename ILLSTATUS authorised value category to ILL_STATUS_ALIAS
To test:
1) Activate the IllModule system preference
2) Install a backend (BLDSS or FreeForm) following the wiki instructions:
3) Configure some authorised values for ILLSTATUS
4) Apply patch
5) Run database update
6) Verify your configured values have been updated to ILL_STATUS_ALIAS
7) Add another ILL_STATUS_ALIAS: there should now be an explanation in the
   categories list
8) Go to the ILL module and add a new request
9) Edit the request, verify that your status alias show in the status list
10) Set one of your status and save
11) Verify that the ILL requests list search filters show your status alias
12) Manage the request again and verify that the ILL request log shows the
    status descriptions correctly
13) Verify the description of the ILLHiddenRequestStatuses has
    been updated with the new authorised value category

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 412c026101)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:38:27 +00:00
a0a3b9809b Bug 32967: DBRev 22.12.00.007
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3de0da88a0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:36:06 +00:00
Aleisha Amohia
2390d252b9 Bug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices
This patch fixes two recalls notices which are referencing old column
names, so they leave empty fields when the notices are generated.

To test:

1) Apply database updates and restart services
2) Go to Tools -> Notices
3) Find the RECALL_REQUESTER_DET notice, open the Print tab
4) Confirm there are no references to recalls.waitingdate or
recalls.recallnotes. Confirm the reference is fixed to
recalls.waiting_date and recalls.notes
5) Find the PICKUP_RECALLED_ITEM notice, open the Email tab
6) Confirm there are no references to recalls.branchcode or
recalls.expirationdate. Confirm the reference is fixed to
recalls.pickup_library_id and recalls.expiration_date

Sponsored-by: Catalyst IT

https://bugs.koha-community.org/show_bug.cgi?id=32697
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>
(cherry picked from commit f7e05c3263)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:33:26 +00:00
dfc61d419b Bug 22428: DBRev 22.12.00.006
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5926e7246b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:32:30 +00:00
e2b439fbb0 Bug 22428: Change datatype of field_value to text
This patch changes the datatype of the field_value column in
marc_modification_template_actions to "text". This is to stop text
strings longer than 100 characters from being chopped short and allow
longer strings up to 65,000 characters.

Test plan:
1) Follow the same steps outlined by Caroline in the problem statement
2) Apply patch
3) Follow the steps again and this time the text should upload with no
   problem

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cce48fc7d4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 15:27:23 +00:00
a079ac0312 Bug 33004: DBRev 22.12.00.008
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit da6d7171e3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 14:20:26 +00:00
Katrin Fischer
70dc8a3ebe Bug 33004: Add VENDOR_TYPE to default authorised value categories
To test:
* Go to administration > authorised values
* Verify that VENDOR_TYPE doesn't show in the list
* Apply patch
* Run database update
* Verify that VENDOR_TYPE does now appear and has a nice
  description (not added by this patch)
* Bonus: start over and run the web installer, VENDOR_TYPE
  should now be already there

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f3a82f09c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-01 14:15:04 +00:00
e7056634a5
Bug 33051: Make 22600075.pl idempotent
As there is no check, this dbrev could cause trouble if run twice. It
doesn't look like it is going to get backported to 22.05, but just in
case...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4a28d42959)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-02-27 13:37:01 +00:00
Katrin Fischer
cf40278d99
Bug 32918: (follow-up) Add new lines for formatting consistency
This adds new lines between each authorised value for better
readability and to match the formatting of the rest of the file.

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>
(cherry picked from commit 18f3b7619b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-02-27 13:33:40 +00:00
Caroline Cyr La Rose
9a8146e44a
Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml
This patch moves the authorized value insertions for ERM categories into
the language-specific auth_values.yml file.

To test:
1. Count the number of authorized values in the mandatory categories

select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif');

--> There should be 929

2. Delete the authorized values from these categories

delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif');

3. Apply patch
4. Load the mandatory authorized values

./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load

5. Redo step 1
   --> There should be the same number (929)
6. Update translations

cd misc/translator
./translate update xx-XX

7. Search the po/xx-XX-installer.po file for any of the loaded
   authorized values

   For example,

   grep "Abstract and index" po/xx-XX-installer.po

   --> descriptions should be translatable

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>
(cherry picked from commit ff18e46ca6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-02-27 13:33:12 +00:00
4c9a69e4bd
RMaint: Release follow-up - Fix db_rev permissions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-02-27 08:18:49 +00:00
464819344e
Increment version for 22.11.03 release
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-02-23 17:37:21 +00:00
c63d16789b
Bug 30642: (RMaint follow-up) Fix db_revs name
We got our version numbering a bit muddled here.. fixed before anything
bad happened ;P

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-02-14 15:43:40 +00:00
7ba7608c69 Bug 30642: Fix dbrev permissions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a637666d3e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-02-14 15:25:10 +00:00
aaccbf171b Bug 30642: DBRev 22.12.00.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 178e40ae9f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-02-13 09:43:33 +00:00
65b2c90f58 Bug 30642: (follow-up) Change sql and adapt for translations
New column has now been changed to an enum in line with comments and the strings have been amended to be picked up for translation. The file koha-tmpl/intranet-tmpl/prog/en/includes/str/checkout_renewals.inc has been removed as the variables can be included within the javascript file.

Test plan:
1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal
2) Apply patch
3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column.
4) Create some checkouts
5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual"
6) Create some checkouts that can be automatically renewed
7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic"
8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response
9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7fe9e76af8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-02-13 09:28:58 +00:00
5b69dec4e9 Bug 30642: Record renewal type
A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. The API has also been updated to reflect this new column and return the data when requested. The renewals modal view has also been updated to show what type the renewal was.

Test plan:
1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal
2) Apply patch
3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column.
4) Create some checkouts
5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual"
6) Create some checkouts that can be automatically renewed
7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic"
8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response
9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5045da59f1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-02-13 09:28:38 +00:00
Katrin Fischer
5abff11e1a Bug 28674: Fix typo 'hlpd' in schema comments
Fixes the lines for old_reserves.item_level_hold and
reserves.item_level_hold comments to read 'hold'
instead of 'hpld'

To test:
* The easiest way to verify this change is by looking
at the patch itself

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 241ea08348)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-02-08 16:28:55 +00:00
Katrin Fischer
a298a4ac1e Bug 31860: Standardize capitalization used for item subfield descriptions
This standardizes "Total Holds" to "Total holds" etc.
Also changed is UNIMARC
* "Collection code" to "Collection" like MARC21
* "Current Location" to "Current library" like MARC21 (holdingbranch)
* "Permanent Location" to "Home library" like MARC21 (homebranch)

To test:
* You'll need to apply the patch and then run the web installer to
  create your frameworks
* Once you got a fresh installation, got to
  Administration > Bibliographic frameworks > Choose any
* Go to 995 (for UNIMARC) or 952 (for MARC21)
* Check the descriptions of the subfields for capitalization and
  spelling errors

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4dba323ec3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-02-08 16:25:46 +00:00
faf0375bee Increment version for 22.11.02 release
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-01-25 16:41:59 +00:00
69f9805c63
Add executable flag to 221101000.pl
The 221101000 database revision was not correctly set as executable

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-01-12 10:56:05 +00:00