]> git.koha-community.org Git - koha.git/log
koha.git
12 months agoBug 34677: (follow-up) Additional updates to match the LOC list
David Nind [Sat, 23 Sep 2023 20:16:08 +0000 (20:16 +0000)]
Bug 34677: (follow-up) Additional updates to match the LOC list

This patch makes additional updates to the RELTERMS authorized
value list to make it match the MARC Code List for Relators
at https://www.loc.gov/marc/relators/relaterm.html and
https://www.loc.gov/marc/relators/relacode.html

It also updates the description displayed in the
authorized values list.

Test plan:
1. Apply the patch.
2. Reload the values (reset_all if using KTD).
3. Go to Administration > Authorized values.
4. Note that the description for RELTERMS is changed
   (now says 'MARC Code List for Relators
    (https://www.loc.gov/marc/relators/).' instead of
    'French terms of relations').
5. Check that the changes listed are incorporated
   into the RELTERMS authorized values list.

Additions:
prv - Provider
rcd - Recordist
stg - Setting

Changes:
aui - Author of introduction -> Author of introduction, etc.
aus - Author of screenplay -> Screenwriter
coe - Contestant -appellee -> Contestant-appellee
cot - Contestant -appellant -> Contestant-appellant
cou - Court-governed -> Court governed
dpb -> dbp - Distribution place
dgg - Degree grantor -> Degree granting institution
osp - On-screen presenter -> Onscreen presenter
pte - Plaintiff -appellee -> Plaintiff-appellee
rcp - Recipient -> Addressee
red - Redactor -> Redaktor
wde - Wood-engraver -> Wood engraver

Removals:
-grt - Graphic technician

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>
12 months agoBug 34677: (follow-up) Update transposed value
David Nind [Fri, 1 Sep 2023 19:47:37 +0000 (19:47 +0000)]
Bug 34677: (follow-up) Update transposed value

Update sdg Stage director to sgd (May 31, 2013 technical notice).

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>
12 months agoBug 34677: Update to MARC21 relator terms list (August 8, 2023 technical notice)
Caroline Cyr La Rose [Thu, 31 Aug 2023 17:20:47 +0000 (13:20 -0400)]
Bug 34677: Update to MARC21 relator terms list (August 8, 2023 technical notice)

This patch adds missing relator codes/terms to the marc21_relatorterms.yaml file in accordance with the August 8, 2023 technical notice.

https://www.loc.gov/marc/relators/tn230808rel.html

To test:
1. Apply patch and restart
2. Go to Administration > Authorized values > RELTERMS
   --> New terms should be there

anc - Announcer
aue - Audio engineer
aup - Audio producer
bka - Book artist
cad - Casting director
cop - Camera operator
dbd - Dubbing director
djo - DJ
edd - Editorial director
fon - Founder
mka - Makeup artist
mup - Music programmer
mxe - Mixing engineer
nan - News anchor
onp - Onscreen participant
rap - Rapporteur
rxa - Remix artist
sde - Sound engineer
sfx - Special effects provider
swd - Software developer
tau - Television writer
tlg - Television guest
tlh - Television host
vfx - Visual effects provider

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>
12 months agoBug 34677: Update to MARC21 relator terms list (Apr. 26, 2021 technical notice)
Caroline Cyr La Rose [Thu, 31 Aug 2023 17:08:54 +0000 (13:08 -0400)]
Bug 34677: Update to MARC21 relator terms list (Apr. 26, 2021 technical notice)

This patch adds missing relator codes/terms to the marc21_relatorterms.yaml file in accordance with the April 26, 2021 technical notice.

https://www.loc.gov/marc/relators/tn210426rel.html

To test:
1. Apply patch and restart
2. Go to Administration > Authorized values > RELTERMS
   --> New term should be there

Addition:
pad - Place of address

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>
12 months agoBug 34677: Update to MARC21 relator terms list (Dec. 14, 2020 technical notice)
Caroline Cyr La Rose [Thu, 31 Aug 2023 17:04:52 +0000 (13:04 -0400)]
Bug 34677: Update to MARC21 relator terms list (Dec. 14, 2020 technical notice)

This patch adds missing relator codes/terms to the marc21_relatorterms.yaml file in accordance with the December 21, 2020 technical notice.

https://www.loc.gov/marc/relators/tn201214src.html

To test:
1. Apply patch and restart
2. Go to Administration > Authorized values > RELTERMS
   --> New term should be there

Addition:
dgc - Degree committee member

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>
12 months agoBug 34677: Update to MARC21 relator terms list (Feb 21, 2014 technical notice)
Caroline Cyr La Rose [Thu, 31 Aug 2023 17:01:15 +0000 (13:01 -0400)]
Bug 34677: Update to MARC21 relator terms list (Feb 21, 2014 technical notice)

This patch adds missing relator codes/terms to the marc21_relatorterms.yaml file in accordance with the February 21, 2014 technical notice.

https://www.loc.gov/marc/relators/tn140221rel.html

To test:
1. Apply patch and restart
2. Go to Administration > Authorized values > RELTERMS
   --> New terms should be there and modified terms should be changed

Additions:
dgs - Degree supervisor
med - Medium
mtk - Minute taker
vac - Voice actor
wst - Writer of supplementary textual content
win - Writer of introduction
wpr - Writer of preface

Changes:
orm - Organizer

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>
12 months agoBug 34677: Update to MARC21 relator terms list (May 31, 2013 technical notice)
Caroline Cyr La Rose [Thu, 31 Aug 2023 16:53:30 +0000 (12:53 -0400)]
Bug 34677: Update to MARC21 relator terms list (May 31, 2013 technical notice)

This patch adds missing relator codes/terms to the marc21_relatorterms.yaml file in accordance with the May 31, 2013 technical notice.

https://www.loc.gov/marc/relators/tn130531rel.html

To test:
1. Apply patch and restart
2. Go to Administration > Authorized values > RELTERMS
   --> New terms should be there and deprecated terms should have been removed

Additions:
abr - Abridger
apl - Appellant
ape - Appellee
adi - Art director
ato - Autographer
brl - Braille embosser
brd - Broadcaster
cas - Caster
cor - Collection registrar
cou - Court-governed
crt - Court reporter
edc - Editor of compilation
edm - Editor of moving image work
enj - Enacting jurisdiction
fds - Film distributor
fmk - Filmmaker
fmd - Film director
fmp - Film producer
his - Host institution
isb - Issuing body
jud - Judge
jug - Jurisdiction governed
osp - On-screen presenter
pan - Panelist
pra - Praeses
pre - Presenter
prn - Production company
prs - Production designer
rdd - Radio director
rpc - Radio producer
rsr - Restorationist
sll - Seller
sgd - Stage director
tld - Television director
tlp - Television producer
wac - Writer of added commentary
wat - Writer of added text
wal - Writer of added lyrics

Deprecated relators:
clb - Collaborator
voc - Vocalist

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34562: Update more pop-up windows with consistent footer markup
Owen Leonard [Thu, 17 Aug 2023 10:52:12 +0000 (10:52 +0000)]
Bug 34562: Update more pop-up windows with consistent footer markup

This patch updates a few more pop-up window templates to standardize the
markup of footer controls. The patch also updates the way catalog.js
triggers the "Add to list" pop-up so that it uses the same
window-opening JS function that similar pages do, since the default
gives us consistent popup features.

To test, apply the patch and perform a catalog search in the staff
interface which will return multiple results.

- Check the box next to one or more results.
- Click the "Add to list" button.
  - Test the various options here: Add to an existing list, a new list,
    or choose "More lists."
  - In each case the pop-up window which appears should have a
    consistent fixed footer with "Save" and "Cancel" buttons.
  - Confirm that these controls can be navigated to using the tab key.
  - Confirm that each one works correctly.

- Go to Administration -> Z39.50/SRU servers -> New SRU server.
  - Click the "Modify" button by the "SRU Search fields mapping" field.
  - Inspect and test the resulting pop-up window.
  - Switch the "Record type" dropdown to "Authority," click the
    "Modify" button again, and test this version of the pop-up window
    too.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34390: (follow-up) Add single quotes around credit type
David Nind [Tue, 3 Oct 2023 00:00:13 +0000 (00:00 +0000)]
Bug 34390: (follow-up) Add single quotes around credit type

For consistency with other bugs - adds single quotes around the
credit type code.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34390: Fix inconsistencies in credit types titles, breadcrumbs, and header
Owen Leonard [Mon, 2 Oct 2023 15:59:08 +0000 (15:59 +0000)]
Bug 34390: Fix inconsistencies in credit types titles, breadcrumbs, and header

Fix inconsistencies in credit types titles, breadcrumbs, and header

This patch fixes a couple of inconsistencies in the credit types
administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.

To test, apply the patch and go to Administration -> Credit types. Test
each variation of the page:

- Main page
- New credit type
- Modify credit type

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>
12 months agoBug 34873: Fix inconsistencies between "Sending your cart/list" headings
Owen Leonard [Fri, 22 Sep 2023 18:33:36 +0000 (18:33 +0000)]
Bug 34873: Fix inconsistencies between "Sending your cart/list" headings

This patch modifies the templates for the popup windows which are shown
when you send a cart or a list via email in the staff interface.

To test, apply the patch and log into the staff interface.

- Perform a catalog search which will return results.
- Select one or more results and add them to the cart.
- Click the cart icon in the header menu to open the Cart popup.
- Click "Send". Compare this pop-up window to the version shown when
  sending a list:

- Open the Lists page and view the contents of a list.
- Click the "Send list" button in the toolbar.
- This popup should look correct and be consistent with the Cart
  version.

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>
12 months agoBug 34796: Improve translation of title tags: Tools - Additional tools
Owen Leonard [Thu, 14 Sep 2023 16:33:48 +0000 (16:33 +0000)]
Bug 34796: Improve translation of title tags: Tools - Additional tools

This patch modifies templates for tools under the "Additional tools"
heading so that title tags can be more easily translated. The patch also
makes some modifications to titles, breadcrumb navigation, and page
headers in order to make them more consistent with each other and with
other similar pages.

To test, apply the patch and go to Tools. Test each page below and each
variation of the page to confirm that titles, breadcrumbs, and page
headers look correct.

- Calendar
- CSV profiles
  - Main page
    - New CSV profile
    - Modify CSV profile
    - Confirm deletion of CSV profile
- Log viewer
  - Search results
- News, HTML customizations, and pages
  - Create and modify each content type: news, pages, HTML
    customizations
- Task scheduler
- Quote editor
  - Main page
  - New quote
  - Edit quote
  - Import quotes
- Uploads
  - Main page
  - Upload file
  - Delete file
  - Search for file
- Access files
- OPAC problem reports (with OPACReportProblem enabled)

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33819: Add page numbers to opac results breadcrumb
Matt Blenkinsop [Wed, 24 May 2023 14:57:20 +0000 (14:57 +0000)]
Bug 33819: Add page numbers to opac results breadcrumb

This patch adds the page number to the breadcrumb in the opac search results to ensure that it is unique to the content on the page. Currently it is not compliant to Accessibility guidelines as the breadcrumb is identical on every page despite the content being different.

To test:
1) Apply patch
2) Run a search in the OPAC that will return more than 20 results.
3) The breadcrumb should say "Results of search for 'search term', page x of y"
4) Run a search that will return less than 20 results
5) The breadcrumb should say "Results of search for 'search term'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34661: Update UNIMARC cataloging plugins with consistent footers
Owen Leonard [Wed, 30 Aug 2023 16:31:03 +0000 (16:31 +0000)]
Bug 34661: Update UNIMARC cataloging plugins with consistent footers

This patch updates UNIMARC cataloging plugin templates so that they have
consistent fixed footers in the plugin popup window. Plugins for the
following UNIMARC fields have been updated:

000 (Leader) 123$f    128$a    181$b
100$a        123$g    128$b    182$2
105$a        123$i    128$c    182$a
106$a        123$j    130$a    182$c
110$a        124$a    135$a    183$2
115$a        124$b    140$a    183$a
115$b        124$c    141$a    210$c
116$a        124$d    146$a    225$a
117$a        124$e    146$c    225$a
120$a        124$f    146$d    283$2
121$a        124$g    146$e    283$a
121$b        125$a    146$f    325$h
122$a        125$b    146$h    325$j
123$a        126$a    146$i
123$d        126$b    181$2
123$e        127$a    181$a

Most of these will be pre-configured in a test system with default
UNIMARC data. In KTD you can use the 'reset_all_unimarc' command.

Go to Cataloging -> New record and test the plugin link for each of the
fields listed above.

  - In each case, confirm that the correct popup window is shown when
    you click the plugin link.
  - Confirm that clicking the "Cancel" button closes the window without
    copying any data to the field in the MARC editor.
    * Note that if the plugin is also triggered by cursor focus in the
      input field, some data may be automatically filled anyway.
  - Confirm that filing in data and clicking "Submit" will copy the
    correct information into the field.

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>
12 months agoBug 34566: Update MARC21 cataloging plugins with consistent footers
Owen Leonard [Wed, 30 Aug 2023 16:00:15 +0000 (16:00 +0000)]
Bug 34566: Update MARC21 cataloging plugins with consistent footers

This patch updates MARC21 cataloging plugin templates so that submit and
cancel controls are consistently displayed in a fixed footer.

To test, apply the patch and go to Cataloging.

- Create or edit a bibliographic record
- Test the cataloging plugins for these fields:
  - 000 (Leader)
  - 006
  - 007
  - 008
  - In each case, confirm that the correct popup window is shown when
    you click the plugin link.
  - Confirm that clicking the "Cancel" button closes the window without
    copying any data to the field in the MARC editor.
    * Note that if the plugin is also triggered by cursor focus in the
      input field, some data may be automatically filled anyway.
  - Confirm that filing in data and clicking "Submit" will copy the
    correct information into the field.

- Go to Authorities and create or edit an authority record.
- Test the plugin for these fields:
  - 000 (Leader)
  - 008
 - Perform the same tests as above.

I don't think the marc21_field_008_classifications is used at all, but
the template has been updated anyway. To test, edit your authority
record to use the plugin:

 - Administration -> Authority types -> Default -> MARC structure -> 008
   -> Subfields -> Edit.
 - Under Advanced constraints -> Plugin, select
   "marc21_field_008_classifcations.pl"
 - Re-test the behavior of the authority editor's tag 008 plugin to
   confirm that this plugin is used and works correctly.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34630: Update MARC21 cataloging plugin templates with consistent body class
Owen Leonard [Wed, 30 Aug 2023 15:41:28 +0000 (15:41 +0000)]
Bug 34630: Update MARC21 cataloging plugin templates with consistent body class

This patch updates cataloging plugin templates to remove the inline
style "padding:1em" from the body tag. This style conflicts with fixed
Bootstrap footers.

A "value_builder" class is added to the body tag instead, the style
added to staff-global.scss. There shouldn't be any visible change to the
appearance of the pages.

To test, apply the patch and rebuild the staff interface CSS and clear
your browser cache if necessary.

- Go to Cataloging -> New record.
- In a default MARC21 installation you can test various plugin popups to
    confirm that they display correctly:
    - 000
    - 006
    - 007
    - 008

To visually confirm each affected template, the plugins can be loaded in
their own tab for testing the appearance of the page. I have a list of
direct links here:

https://gitlab.com/-/snippets/2555254
Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34657: (QA follow-up) Fix plugin link in UNIMARC default framework
Katrin Fischer [Sat, 7 Oct 2023 15:41:36 +0000 (15:41 +0000)]
Bug 34657: (QA follow-up) Fix plugin link in UNIMARC default framework

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34657: Merge cataloging plugins for UNIMARC 123d, e, f, and g
Owen Leonard [Wed, 30 Aug 2023 14:53:01 +0000 (14:53 +0000)]
Bug 34657: Merge cataloging plugins for UNIMARC 123d, e, f, and g

This patch removes some UNIMARC cataloging plugins which were
essentially duplicates of each other and renaming the remaining version
to reflect that it's for use with multiple subfields.

UNIMARC 123$d, e, f, and g can all be filled with
unimarc_field_123defg.pl

It's easiest to test if you have UNIMARC sample data. In KTD, run
'reset_all_unimarc'

- Apply the patch and run the database update process.
- Go to Cataloging and create or edit a bibliographic record.
- Under tab 1, look for tag 123.
- Test the plugin link for subfields d, e, f, and g
  - In each case the popup window should have the heading "UNIMARC field
    123d/e/f/g builder"
  - Fill out the form each time and confirm that the values are copied
    to the correct field in the MARC editor window.

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>
12 months agoBug 34270: Upgrade and prune jQueryUI assets in the staff interface
Owen Leonard [Thu, 13 Jul 2023 13:41:21 +0000 (13:41 +0000)]
Bug 34270: Upgrade and prune jQueryUI assets in the staff interface

This patch updates jQueryUI assets in the staff interface with an
upgraded and trimmed version which includes only support for jQueryUI
autocomplete.

Global staff interface CSS has been modified to remove unused
jQueryUI-related styles and to accommodate the updated assets.

The patch also removes some unused jQueryUI image assets from the OPAC
templates.

To test, apply the patch and rebuild the staff interface CSS. Test the
"Check out" form in the header to confirm that it still looks correct
and works correctly.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34457: Added cardnumber view to hold details page
Laura Escamilla [Fri, 4 Aug 2023 17:29:20 +0000 (17:29 +0000)]
Bug 34457: Added cardnumber view to hold details page

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34035: Move translatable strings out of opac-bottom.inc: Tags
Owen Leonard [Fri, 16 Jun 2023 13:39:40 +0000 (13:39 +0000)]
Bug 34035: Move translatable strings out of opac-bottom.inc: Tags

This patch removes the definition of JS variables in opac-bottom.inc
related to the tags feature. These strings can be wrapped in the __()
function inside tags.js and they'll get picked up for translation.

Some other tags-related JS variable definitions are removed from
templates in favor of embedding them directly in the <script> block.

To test you must have TagsEnabled set to "Allow." Apply the patch and
log in to the OPAC.

- Perform a catalog search and select some items in the result list.
  - Add the items to the cart and open the cart.
    - Check a box next to one of the titles in the cart.
    - Click the "Tag" link
    - Submit the "New tag" form without entering a tag. You should see
      "No tag was specified."
    - Perform the same test on the search results page both using the
      checkboxes and by clicking the "Add tag" link on an individual
      result.
  - Perform the same test on the bibliographic detail page.
  - When adding tags from the cart, result list, or detail page, confirm
    that the "Tags added: X" message is always displayed.
  - Test adding a tag to a title which is already attached to that
    title.
  - Test adding HTML markup, e.g. "<script>"
  - Test adding HTML markup and plain text, e.g. "<script>Foo"

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>
12 months agoBug 34035: (preparatory cleanup) Convert indentation to spaces.
Owen Leonard [Fri, 16 Jun 2023 13:05:58 +0000 (13:05 +0000)]
Bug 34035: (preparatory cleanup) Convert indentation to spaces.

This patch converts tabs to spaces in tags.js. No other changes are
made.

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>
12 months agoBug 34034: Move translatable strings out of opac-bottom.inc: OverDrive and OpenLibrary
Owen Leonard [Fri, 16 Jun 2023 12:47:29 +0000 (12:47 +0000)]
Bug 34034: Move translatable strings out of opac-bottom.inc: OverDrive and OpenLibrary

This patch removes some string variable definitions from
opac-bottom.inc. The strings can now be picked up for translation from
the corresponding <script> block.

To test you must enable OpenLibrarySearch and enter OverDrive
credentials to enable OverDrive search integration.

- Perform a search in the OPAC.
- As the results page loads you should see at the top "Searching
  OverDrive..." and "Searching OpenLibrary..."
- When the searches complete you should see "Found X results in the
  library's Y collection" for each service.
- Try to trigger an error message by entering the wrong (non-zero) value
  for the OverDriveLibraryID preference.
- The search results page should show "Error searching OverDrive
  collection"

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>
12 months agoBug 34031: Move various translatable strings out of opac-bottom.inc
Owen Leonard [Fri, 16 Jun 2023 11:36:10 +0000 (11:36 +0000)]
Bug 34031: Move various translatable strings out of opac-bottom.inc

This patch moves some JS variable definitions out of opac-bottom.inc.
These variables where defined so that they could be picked up for
translation, but they can now be moved to the corresponding <script>
blocks.

Many other of these variables are not used at all and have been removed.

To test you should have EnableOpacSearchHistory, OPACPrivacy, and
opacreadinghistory enabled. Apply the patch and log into the OPAC as a
user with suggestions, search history, and checkout history.

- Click your user menu at the top of the page and click the "Clear" link
  for search history. You should see a confirmation, "Are you sure you
  want to delete your search history?" Confirming should trigger your
  search history deletion.
- From your user summary page, click "Privacy." Under "Immediate
  deletion," clicking any of the delete buttons should trigger a
  confirmation, "Warning: Cannot be undone. Please confirm once again"
- From your user summary page, click "Purchase suggestions."
  - Without checking any checkbox, click the "Delete selected" button at
    the bottom. You should see an alert, "No suggestion was selected."

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>
12 months agoBug 34026: (QA follow-up) Remove NO_COCE_JACKET
Katrin Fischer [Sun, 8 Oct 2023 13:54:00 +0000 (13:54 +0000)]
Bug 34026: (QA follow-up) Remove NO_COCE_JACKET

As already noted in Owen's commit message, this variable
appears to be unused.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34026: Move translatable cover-handling strings out of opac-bottom.inc
Owen Leonard [Thu, 15 Jun 2023 18:56:25 +0000 (18:56 +0000)]
Bug 34026: Move translatable cover-handling strings out of opac-bottom.inc

This patch removes several instances from opac-bottom.inc where we
define strings for translation and use in separate JavaScript files. The
JavaScript files are updated to use the __() function to mark strings
for translation.

Note: Definition of the variable NO_COCE_JACKET is removed because it is
unused.

To test, apply the patch and clear your browser cache if necessary.

- In the staff interface, enable OPAC cover image services:
  - OPACAmazonCoverImages
  - BakerTaylorEnabled
  - GoogleJackets
  - OpenLibraryCovers

- In the OPAC, perform a search and confirm that there are no JS errors
  on the search results page related to cover images.
- Check the bibliographic detail page as well.

To confirm that the strings are being picked up for translation, run the
update process for another language, e.g.

perl misc/translator/translate update fr-FR

Then check the newly-built po file: fr-FR-messages-js.po. It should
list the updated files:

 koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js:8
 koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js:10
 koha-tmpl/opac-tmpl/bootstrap/js/bakertaylorimages.js:7
 koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js:77
 koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js:63

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>
12 months agoBug 33983: Move translatable strings out of OPAC's datatables.inc into JavaScript
Owen Leonard [Fri, 16 Jun 2023 14:22:08 +0000 (14:22 +0000)]
Bug 33983: Move translatable strings out of OPAC's datatables.inc into JavaScript

This patch removes the definition of translatable strings out of
the OPAC datatables.inc file and into datatables.js using the new JS
i81n function.

To test apply the patch and test some DataTable-driven tables in the
OPAC. A list of possible examples:

- Cart
- Bibliographic detail page
  - Place hold (with OPAC item level holds enabled in circulation rules)
    - Show more options ->
      - A specific item
- Bibliographic detail page for a serial record ->
  - More details ->
    - Full history
- Most popular
- Self checkout
- Logged in user ->
  - Charges
  - Curbside pickups
  - Messaging
  - Checkout history
  - Suggestions
  - Holds history
  - Tags
  - Recalls history
  - Search history
  - ILL requests

DataTables functionality should be unaffected. Check that the strings
defined for translation are still working. For instance the "Clear
filter" label on user summary checkouts, or the "No matching records
found" text displayed when you search a table for a string that doesn't
exist.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.:

  msgid "Clear filter"

- Edit the corresponding "msgstr" string however you want (it's just for
  testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language and repeat the test plan
  above. The translated strings should appear.

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>
12 months agoBug 34921: Tabs on Additional Content page need space above
Owen Leonard [Wed, 27 Sep 2023 12:36:15 +0000 (12:36 +0000)]
Bug 34921: Tabs on Additional Content page need space above

This patch adds a separator element, <hr /> between the additional
contents form and the tabs for visual clarity. Using an element is a
little hackish but it's a simple solution.

To test, apply the patch and go to Tools -> News -> New entry.

There should be a clear gap between the top form and the tabs below.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34153: (QA follow-up) Tidy code
Kyle M Hall [Wed, 20 Sep 2023 10:23:36 +0000 (06:23 -0400)]
Bug 34153: (QA follow-up) Tidy code

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34153: Add ability to allow items with additional materials notes to be checked...
Kyle M Hall [Thu, 29 Jun 2023 12:06:51 +0000 (08:06 -0400)]
Bug 34153: Add ability to allow items with additional materials notes to be checked out via SIP

At this time, any item with an additional materials date is blocked from checkout via SIP with a screen message to take the item to a circulation desk for checkout.
Some libraries wish to allow patrons to check out items via SIP even if the item has additional materials.

Test Plan:
1) Create an item with an additional materials note
2) Attempt to check it out via SIP
3) Note the failure and message
4) Enable the new SIP account option "allow_additional_materials_checkout"
5) Restart the SIP server
6) Attempt the checkout again
7) Note the checkout success and new AF field message!
8) prove t/db_dependent/SIP/Message.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34153: Add tests
Kyle M Hall [Wed, 20 Sep 2023 06:47:48 +0000 (08:47 +0200)]
Bug 34153: Add tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34722: Prevent other items from displaying to fill item-level recalls
Aleisha Amohia [Wed, 6 Sep 2023 00:13:48 +0000 (00:13 +0000)]
Bug 34722: Prevent other items from displaying to fill item-level recalls

This patch prevents other items attached to a record from being displayed as 'recalled' by item-level recalls.

To test:
1. Ensure UseRecalls system preference is enabled and circulation rules relevant to recalls are configured. Set 'on shelf recalls allowed' circulation rule 'if any unavailable' for ease of testing.
2. Search for a record that has multiple items, or create one with multiple items. Check out two of the items (Item A and Item B) to a patron, Patron A.
3. Log into the OPAC as another patron, Patron B. Search for the record and place a recall. Choose to recall a specific item and select Item A.
4. Go back to the staff interface and view the catalogue detail page for the record. Notice that every item has a 'recalled by...' message, even though Item A was specifically recalled.
5. Log into the OPAC as another patron, Patron C. Search for the record and place a recall. Choose to recall a specific item, notice every item has a 'recalled by...' message. Select Item B and Confirm.
6. In your terminal, the 'Other items are not returned for item-level recalls' test should fail when running
prove t/db_dependent/Koha/Item.t

7. Apply the patch and restart services

8. Confirm tests at t/db_dependent/Koha/Item.t now pass
9. Refresh the staff interface, confirm only Items A and B have the recalled message and the recall patron information for each item is accurate
10. Log into the OPAC as another patron, Patron D. Search for the record and place a recall. Choose to recall a specific item. Confirm only Items A and B have the recalled message.

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Perltidied new code.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34923: Allow direct input of hold dates on opac-reserve.tt
Lucas Gass [Tue, 26 Sep 2023 19:04:17 +0000 (19:04 +0000)]
Bug 34923: Allow direct input of hold dates on opac-reserve.tt

To test:
1. Turn on AllowHoldDateInFuture and OPACAllowHoldDateInFuture
2. Make a hold in OPAC and notice you cannot directly input a date in either the "Hold starts on date:" field or the "Hold not needed after:" field.
3. APPLY PATCH
4. Clear your browser cache and try again. You should be able to directly input dates.

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>
12 months agoBug 34859: Remove unnecessary params from reports-home.pl
David Cook [Thu, 21 Sep 2023 01:27:45 +0000 (01:27 +0000)]
Bug 34859: Remove unnecessary params from reports-home.pl

This change removes unnecessary syspref template parameters
and tidies the code.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=IntranetNav
2. Add the following and save:
<li><a href="#">Awesome</a></li>
3. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetstylesheet
4. Add the following and save:
http://bad
5. Go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=intranetcolorstylesheet
6. Add the following and save:
http://bad2
7. Go to /cgi-bin/koha/reports/reports-home.pl
8. Note the "Awesome" link in the top navbar
9. Note in the console that there are two errors where http://bad
and http://bad2 can't be resolved

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33395: Patron search results - show number of overdues and checkouts when patrons...
David Nind [Sat, 23 Sep 2023 01:10:31 +0000 (01:10 +0000)]
Bug 33395: Patron search results - show number of overdues and checkouts when patrons have overdues

This fixes the display of patron search results, so that it shows
the number of checkouts when a patron has overdue items. For
example: 1 / 2

Bug 30063 changed the display to show only the number of overdue
items in bold and red, without the total number of items checked
out.

Test plan:
1. Check out two items to a patron - make one overdue (click the
   checkout setting options and then specify a due date a month
   ago).
2. Check out another item to another patron.
3. Search for patrons so that the two patrons you checked out
   items to are listed in the results.
4. Note the display for the 'Checkouts' column:
   4.1 For patrons without any checkouts: 0 / 0
   4.2 For the patron from step 2 with one checkout: 0 / 1
   4.3 For the patron from step 1 with one overdue and one
       checkout: 1 (in bold and red)
5. Apply the patch.
6. Refresh the page of results (step 3).
7. Note that for the patron from step 1, the display now shows:
   1 / 2 (with the 1 in bold and red).
8. Sign off! 8-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34300: Add holds column to order table
Wainui Witika-Park [Tue, 18 Jul 2023 01:24:16 +0000 (01:24 +0000)]
Bug 34300: Add holds column to order table

Adds the ability to easily place a hold on an ordered item from a basket

To test:
    1) Apply patch
    2) Go to acquisitions
    3) Go to an existing basket, or create a new one
    4) Add an order to the basket
    4) Notice there is a "Place hold" column in the Orders table
    5) Click the link for an item which allows you to place a hold easily on the biblio
    6) On the columns settings, toggle the "Place hold" column to hide it, and make sure it gets hidden

Sponsored-by: Pymble Ladies’ College
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: DBRev 23.06.00.028
Tomas Cohen Arazi [Wed, 4 Oct 2023 18:07:38 +0000 (14:07 -0400)]
Bug 9525: DBRev 23.06.00.028

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: DBIC schema
Tomas Cohen Arazi [Wed, 4 Oct 2023 18:03:10 +0000 (14:03 -0400)]
Bug 9525: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: Atomic update fixes
Tomas Cohen Arazi [Wed, 4 Oct 2023 17:59:26 +0000 (13:59 -0400)]
Bug 9525: Atomic update fixes

This patch modernizes the atomic update, makes it follow the current
pattern of checking the column existence, and printing a message about
the column being created.

It also adds the COMMENT statement so tests pass later.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: (QA follow-up) Tidy
Nick Clemens [Thu, 28 Sep 2023 13:59:24 +0000 (13:59 +0000)]
Bug 9525: (QA follow-up) Tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: (QA follow-up) Clarify how float groups are selected in circulation rules
Nick Clemens [Wed, 26 Apr 2023 15:06:53 +0000 (15:06 +0000)]
Bug 9525: (QA follow-up) Clarify how float groups are selected in circulation rules

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: (QA follow-up) Fix QA complaints
Nick Clemens [Wed, 26 Apr 2023 15:02:54 +0000 (15:02 +0000)]
Bug 9525: (QA follow-up) Fix QA complaints

Add boolean to schema
Remove stray console.log
Fix subroutine name in POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: Fix tests
Emmi Takkinen [Fri, 11 Nov 2022 07:24:37 +0000 (09:24 +0200)]
Bug 9525: Fix tests

To test prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: Add option to define float groups and rules for float
Emmi Takkinen [Wed, 8 Sep 2021 05:58:14 +0000 (08:58 +0300)]
Bug 9525: Add option to define float groups and rules for float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 9525: Add ft_local_float_group column
Emmi Takkinen [Tue, 7 Sep 2021 06:33:44 +0000 (09:33 +0300)]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33958: (QA follow-up) tidy normalized_oclc
Kyle M Hall [Fri, 15 Sep 2023 17:00:54 +0000 (13:00 -0400)]
Bug 33958: (QA follow-up) tidy normalized_oclc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33958: Koha::Biblio::normalized_oclc
Jonathan Druart [Thu, 8 Jun 2023 12:15:16 +0000 (14:15 +0200)]
Bug 33958: Koha::Biblio::normalized_oclc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33958: Add tests
Jonathan Druart [Thu, 8 Jun 2023 12:14:43 +0000 (14:14 +0200)]
Bug 33958: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34870: Perform UTF8 encoding before redirection
emilyrose [Fri, 22 Sep 2023 15:58:23 +0000 (11:58 -0400)]
Bug 34870: Perform UTF8 encoding before redirection

Display special characters correctly when writing off an invoice.

The issue arises because pay.pl does not perform UTF-8 encoding on the “notes” parameter before redirecting the page. By using uri_escape_utf8, characters with a code above 255 are also UTF-8 encoded. Then, paycollect.pl can collect the information without any trouble.

This patch work with “;” and “:” characters.

TEST PLAN
1) Go to any patron profile > Accounting
2) Click “Create manual invoice”
3) Fill the fields and click the “Save” button
4) Repeat steps 2 and 3
5) Click “Make a payment”
6) Add a note with special characters for each one (e.g., éçö)
7) Select the created invoices and click the “Write off selected” button
8) In the note field, you should see “�” symbols where the special characters are supposed to be
9) Click the “Cancel” button
10) Now add a note with “:;” for one of the invoices
11) Select the invoices and click the “Write off selected” button
12) You should see a page with an error 500
13) Go back to the “Make a payment” page
14) Apply the patch
15) Add a note with special characters for each one (e.g., éçö)
16) Add “:;” to one of the note fields
17) Select the invoices and click the “Write off selected” button
18) Now the special characters are displayed correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34961: Add sort parameter to OPAC search results RSS feed link
Owen Leonard [Fri, 29 Sep 2023 18:33:59 +0000 (18:33 +0000)]
Bug 34961: Add sort parameter to OPAC search results RSS feed link

This patch corrects two RSS links in the OPAC search results template so
that they include the correct parameters, including the descending sort
by acquisition date.

To test, apply the patch and go to the OPAC.

- Perform a catalog search which will return search results.
- Next to the page heading "Your search returned X results" is an RSS
  link. Check the link to confirm that it has all the expected
  parameters:

  opac-search.pl?idx=kw&q=nude&count=50&sort_by=acqdate_dsc&format=rss

- Perform a search which will return no results and check the RSS link
  on that page. It should be the same.

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>
12 months agoBug 33690: Convert to x-koha-override
Martin Renvoize [Fri, 8 Sep 2023 11:06:26 +0000 (12:06 +0100)]
Bug 33690: Convert to x-koha-override

This patch converts the existing work to use x-koha-override instead of
introducing an entirely new header and we default to the system
preference value if the override isn't passed.

I believe this is more consistent with our approach in other areas of
koha to date.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33690: (QA follow-up) Mock C4::Letters subroutines for unit tests
Kyle M Hall [Fri, 23 Jun 2023 14:50:33 +0000 (10:50 -0400)]
Bug 33690: (QA follow-up) Mock C4::Letters subroutines for unit tests

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33690: Add ability to send welcome notice when creating patrons using the REST API
Kyle M Hall [Fri, 5 May 2023 16:22:53 +0000 (12:22 -0400)]
Bug 33690: Add ability to send welcome notice when creating patrons using the REST API

It would be nice to have the ability to send a welcome notice when creating patrons via the API.

Test Plan:
1) Apply this patch
2) Ensure you have a WELCOME notice
3) Create a new patron using the REST API ( api/v1/patrons )
4) Note no welcome notice is sent to the patron ( you can check the
   notices tab for the patron )
5) Repeat step 3, but send the header X-Koha-SendWelcomeEmail with a
   value of 1 as part of the POST
6) Note the welcome message for the patron is in their notices!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 33690: Tidy test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34737: (follow-up) Code more defensively
Martin Renvoize [Mon, 25 Sep 2023 10:29:20 +0000 (11:29 +0100)]
Bug 34737: (follow-up) Code more defensively

This patch adds some defense for errant preference lines, allowing for
empty lines, comment lines and even skipping easily identified malformed
lines.

Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34737: (follow-up) Unit test for skipping bad lines
Martin Renvoize [Mon, 25 Sep 2023 10:39:22 +0000 (11:39 +0100)]
Bug 34737: (follow-up) Unit test for skipping bad lines

We update the test rules set to include some malformed, empty and
comment lines. No actual tests are added, but the skipping is checked by
all other tests in this way.

Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34737: Tidy t/db_dependent/SIP/Transaction.t
Kyle M Hall [Thu, 14 Sep 2023 17:59:42 +0000 (13:59 -0400)]
Bug 34737: Tidy t/db_dependent/SIP/Transaction.t

Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34737: (follow-up) Squelch a warning
Martin Renvoize [Thu, 7 Sep 2023 16:24:24 +0000 (17:24 +0100)]
Bug 34737: (follow-up) Squelch a warning

We weren't checking whether an item property was defined or not and as
such the new test highlighted a new warning.

Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34737: Unit tests
Martin Renvoize [Thu, 7 Sep 2023 16:23:42 +0000 (17:23 +0100)]
Bug 34737: Unit tests

This patch adds unit test to prove the multi-field match functionality
added in this patchset.

Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34737: Add ability to match on combinations of item fields
Martin Renvoize [Thu, 7 Sep 2023 15:53:00 +0000 (16:53 +0100)]
Bug 34737: Add ability to match on combinations of item fields

This patch updates the sort bin selection logic to allow for multiple
item field comparisons in a single config rule line.

Test plan
1) Run the unit tests before and after applying this patch and confirm
   they pass in both cases (prove -v t/db_debendant/SIP/Transaction.t
2) Check out an item and return it via SIP2:
     $ telnet localhost 8023
     9300CNterm1|COterm1|CPCPL|
     09N20200422    12430020200422    124300APCPL|AOCPL|AB001|AC|
   (Where 001 in |AB001| is the barcode of the item in question)
4) Check there is no CL field in the last response
5) Apply the patch, fill in SIP2SortBinMapping with e.g.:
       CPL:itype:eq:BK:ccode:eq:TEEN:3
6) Repeat the first step
7) Check the response contains a CL field with a value of 3 (or what
   you put in the config). The field should look like |CL3|

Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33522: (follow-up) Do not rely on fallback
Marcel de Rooy [Sat, 2 Sep 2023 07:05:22 +0000 (07:05 +0000)]
Bug 33522: (follow-up) Do not rely on fallback

Bug 33245 has been adjusted; the fallback has been removed.
We should check now if the -active or -inactive parameter
actually has been passed.

Test plan:
See earlier test plan.
Run the script without active/inactive.
Run the script with active.

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>
12 months agoBug 33522: Add active and inactive parameter to membership_expiry.pl
Marcel de Rooy [Tue, 30 May 2023 15:04:28 +0000 (15:04 +0000)]
Bug 33522: Add active and inactive parameter to membership_expiry.pl

Test plan:
Enable TrackLastPatronActivity.
Set MembershipExpiryDaysNotice to X days.
Pick a patron, make it expire in X days. Add email address.
Update borrowers.lastseen for this patron to make it active.
Run membership_expiry.pl -c -v -active 6
You should see at least one enqueued notice.
Run membership_expiry.pl -c -v -inactive 6
You should see that it skipped a number of active patrons (>=1).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33245: Add unit test
Marcel de Rooy [Thu, 16 Mar 2023 15:41:55 +0000 (15:41 +0000)]
Bug 33245: Add unit test

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
JD amended patch: Adjust number of tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33245: Introduce patron->is_active
Marcel de Rooy [Thu, 16 Mar 2023 14:34:58 +0000 (14:34 +0000)]
Bug 33245: Introduce patron->is_active

Does only add the new patron method.

NOTE: We may define additional criteria at some point, but I think
that this is a good starting point.

Test plan:
Run perl -MKoha::Patron -e'print Koha::Patrons->find(X)->is_active(Y);'
Note: replace X by a valid borrowernumber and Y by date criterium.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33245: TestBuilder: Default value for anonymized
Marcel de Rooy [Thu, 16 Mar 2023 15:41:33 +0000 (15:41 +0000)]
Bug 33245: TestBuilder: Default value for anonymized

When we create a patron with TestBuilder, we normally
do not expect an anonymized status. This will certainly
hold for the patrons we are creating for testing is_active
in a following patch.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34891: Correct link on view restrictions button
Owen Leonard [Fri, 22 Sep 2023 16:31:08 +0000 (16:31 +0000)]
Bug 34891: Correct link on view restrictions button

This patch updates the button which appears on the circulation page
when a patron is restricted. Before this patch, clicking the button
would activate the restrictions tab but wouldn't scroll the page to make
the tab visible.

To test, apply the patch and check out to a patron who has one or more
restrictions.

- There should be a message on the page, "Restricted since..."
- Click the "View restrictions" button.
- The page should jump down so that the tabs are visible and the
  restrictions tab should be active.
- Test on the patron details page too.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 32676: Fix EDI message status case
Kyle Hall [Tue, 31 Jan 2023 17:42:46 +0000 (12:42 -0500)]
Bug 32676: Fix EDI message status case

Edifact status appear to vary between all lower case and being
capitalized. This breaks the switch in the edi_status block of the
basket.tt template. We should make this switch case-insensitive.

Test Plan:
1) View the basket for a sent EDI order, note the Sent status does not
   display.
2) Apply this patch
3) Reloate the page, note the status is now visible!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34820: (QA follow-up) Fix span tag
Katrin Fischer [Tue, 3 Oct 2023 12:34:11 +0000 (12:34 +0000)]
Bug 34820: (QA follow-up) Fix span tag

One span tag was missing a <.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34820: (QA follow-up) Replace em tags with quotes
Kyle M Hall [Wed, 20 Sep 2023 17:43:56 +0000 (13:43 -0400)]
Bug 34820: (QA follow-up) Replace em tags with quotes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34820: (QA follow-up) add filter, update CSV output
Kyle M Hall [Wed, 20 Sep 2023 10:40:08 +0000 (06:40 -0400)]
Bug 34820: (QA follow-up) add filter, update CSV output

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34820: Clarify inventory tool message for items with non-matching notforloan...
Kyle M Hall [Mon, 18 Sep 2023 16:02:34 +0000 (12:02 -0400)]
Bug 34820: Clarify inventory tool message for items with non-matching notforloan value

In the inventory tool, if one or more not for loan values are selected, and an item is scanned that has no NFL status or an unselected NFL status, the error message reads "Unknown not-for-loan status". This can be interpreted as the item having an NFL status value that is not defined in the system, but that is not accurate. This should be reworded to remove ambiguity.

Test plan:
1) Create two items, one of which has the NFL status of "Ordered", the
   other having no NFL status
2) Enter those two barcodes in the inventory tool barcodes list
3) Check only "Ordered" in items.notforloan
4) Note the problem messages
5) Apply this patch
6) Re-run the inventory tool
7) Note the new clarified messages!

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>
12 months agoBug 34945: Remove the use of event attributes from OPAC clubs tab
Owen Leonard [Thu, 28 Sep 2023 11:30:35 +0000 (11:30 +0000)]
Bug 34945: Remove the use of event attributes from OPAC clubs tab

This patch removes the use of event attributes (onclick) from the
template for the clubs tab shown in the OPAC to a logged-in user.
These events are defined now along with the other in-page JS.

The patch also makes some general improvements to the template for
consistency:

- Adding Bootstrap color classes to the "Enroll" and "Cancel enrollment"
  buttons.
- Enhancing the responsive configuration to the DataTable.

To test you should have a few patron clubs defined (Tools -> Patron
clubs).

- Apply the patch and log in to the OPAC.
- On the user summary page, click the "Clubs" tab.
- The "Enroll" and "Cancel enrollment" buttons should look correct and
  work as expected:
  - Click the "Enroll" button.
    - On the enrollment confirmation view, test both the "Finish
      enrollment" button and the "Cancel" link.
  - Test "Cancel enrollment" button.
- Test the responsive behavior of the page to confirm that it adjusts
  well to narrow browser widths.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 22873: Add comment to explain what disallow_overpayment is for
Kyle M Hall [Mon, 25 Sep 2023 14:11:03 +0000 (10:11 -0400)]
Bug 22873: Add comment to explain what disallow_overpayment is for

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34833: (follow-up): remove redundant spaces
Victor Grousset/tuxayo [Mon, 25 Sep 2023 06:47:36 +0000 (08:47 +0200)]
Bug 34833: (follow-up): remove redundant spaces

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34833: Make "order number" in acq modal translatable
Katrin Fischer [Tue, 19 Sep 2023 19:53:38 +0000 (19:53 +0000)]
Bug 34833: Make "order number" in acq modal translatable

The 'order number' was not translatable when editing the
estimated delivery date or notes from basket summary or
when editing the estimated delivery date from late orders.

To get there:
0. Make sure you have budgets and vendors set up

1. Create a basket (skip this if you already have an open basket)
   1.1. Go to acquisitions
   1.2. Search for a vendor
   1.3. Click New > basket
   1.4. Enter a name for the basket
   1.5. To make the tests easier, choose to create items when : cataloging the record
   1.6. Click save

2. Add an order
   2.1. Click add to basket > From a new (empty) record
   2.2. Fill out the form, minimally
        - Enter a title
        - Enter a quantity
        - Choose a fund
        - Enter a vendor price
   2.3. Click Save

3. Next to the order line, click Edit under Estimated delivery date
4. Verify that the 'order number <ordernumber>' shows on top of the modal
5. Edit internal/vendor note, verify it shows there as well
6. Close basket
7. Go to late orders
8. Edit estimated delivery date, text should show there as well
9. Apply patch
10. Run translation update script
11. Verify the string now appears in po files
12. Translate it
13. Install translation
14. Verify it shows nicely translated in all 3 mentioned spots

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34619: Show debug mode column in list of SMTP servers
Owen Leonard [Mon, 28 Aug 2023 12:49:43 +0000 (12:49 +0000)]
Bug 34619: Show debug mode column in list of SMTP servers

This patch adds a column to the table of SMTP servers which shows
whether debug mode is on or off. This information was previously only
conveyed through the color of the text in the table row.

To test, apply the patch and go to Administration -> SMTP servers.

- If necessary, add one or more SMTP servers so that there are more than
  one: At least one with debug mode on, at least one with debug mode
  off.
- In the table listing SMTP servers you should see a column for "Debug
  mode," where the rows indicate "On" or "Off."
- Each row which is highlighted in red should show "On" for debug mode.

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34511: Typo in manage_staged_records permission description
Caroline Cyr La Rose [Wed, 9 Aug 2023 20:22:39 +0000 (16:22 -0400)]
Bug 34511: Typo in manage_staged_records permission description

This patch corrects a typo in the description of the manage_staged_records permission. All other permission descriptions are in the present tense, but this one is in the past tense.

To test:
0. Apply the patch
1. Go to any patron record
2. Click More > Set permissions
3. Click Show details next to the Use all tools permission
4. Read the description for the manage_staged_records permission, make sure the spelling and grammar are correct

Signed-off-by: hebah <hebah@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33812: Checkboxes need labels in opac-messaging.tt
Matt Blenkinsop [Tue, 23 May 2023 16:08:31 +0000 (16:08 +0000)]
Bug 33812: Checkboxes need labels in opac-messaging.tt

Aria-labels have been added to checkboxes in the OPAC messaging preferences table to assist with screen reading. The relevant preference has been mentioned in each label to identify what the checkbox is for.

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>
12 months agoBug 34865: Use OPACURLOpenInNewWindow for library URLs
Owen Leonard [Mon, 25 Sep 2023 12:46:08 +0000 (12:46 +0000)]
Bug 34865: Use OPACURLOpenInNewWindow for library URLs

If a library has a URL defined it is shown in the OPAC under the
libraries page. This patch updates the template so that the link
respects the OPACURLOpenInNewWindow system preference.

To test, apply the patch and go to Administration -> Libraries and edit
a library if necessary so that it has a URL defined.

In the OPAC, go to the Libraries page. Test that the library link
respects whichever setting you have for OPACURLOpenInNewWindow

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34679: Change description for RELTERMS authorized value category
Caroline Cyr La Rose [Thu, 31 Aug 2023 16:40:45 +0000 (12:40 -0400)]
Bug 34679: Change description for RELTERMS authorized value category

This patch changes the description of the RELTERMS authorized value
category to "List of relator codes and terms".

To test:
1. Apply patch
2. Go to Administration > Authorized values
3. Search for category RELTERMS
   --> The description should read "List of relator codes and terms"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34887: Merge with db_dependent Patron.t
Marcel de Rooy [Sat, 23 Sep 2023 07:08:27 +0000 (07:08 +0000)]
Bug 34887: Merge with db_dependent Patron.t

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: Fixed QA failures
 FAIL   t/db_dependent/Koha/Patron.t
   FAIL   spelling
                 personnal ==> personal
                 personnal ==> personal
                 personnal ==> personal
                 personnal ==> personal
   WARN   tidiness
                The file is less tidy than before (bad/messy lines before: 361, now: 382)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34887: Fix transactions in db dependent Patron.t
Marcel de Rooy [Fri, 22 Sep 2023 14:14:02 +0000 (14:14 +0000)]
Bug 34887: Fix transactions in db dependent Patron.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34887: Remove Test::DBIx::Class from Patron.t
Marcel de Rooy [Fri, 22 Sep 2023 13:54:31 +0000 (13:54 +0000)]
Bug 34887: Remove Test::DBIx::Class from Patron.t

Moving all tests into one subtest with two underlying
subtests for checking accessors after new or set.
This will make it more easy to merge with the db
dependent counterpart.

Test plan:
Run t/Patron.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34825: Merge Letters.t into t/db/Letters.t
Marcel de Rooy [Tue, 19 Sep 2023 07:09:54 +0000 (07:09 +0000)]
Bug 34825: Merge Letters.t into t/db/Letters.t

Test plan:
Run t/db_dependent/Letters.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>
12 months agoBug 34825: Remove Test::DBIx::Class from Letters.t
Marcel de Rooy [Tue, 19 Sep 2023 06:50:52 +0000 (06:50 +0000)]
Bug 34825: Remove Test::DBIx::Class from Letters.t

Includes a tidy.

Test plan:
Run t/Letters.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>
12 months agoBug 34968: Remove unneeded module from Search.t
Marcel de Rooy [Sat, 30 Sep 2023 06:40:50 +0000 (06:40 +0000)]
Bug 34968: Remove unneeded module from Search.t

Test::DBIx::Class is not even used here.
Just like C4::Biblio.
We should remove TestBuilder too (this is t not t/db)!

Test plan:
Run t/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34969: Remove unneeded module from buildQuery.t
Marcel de Rooy [Sat, 30 Sep 2023 06:52:08 +0000 (06:52 +0000)]
Bug 34969: Remove unneeded module from buildQuery.t

Test plan:
Run t/Search/buildQuery.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34905: Fix icon
Pedro Amorim [Mon, 25 Sep 2023 16:10:06 +0000 (16:10 +0000)]
Bug 34905: Fix icon

Test plan, on k-t-d:
1) Install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)

2) Create a new FreeForm ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm

3) Pick a request type and input "42" in cardnumber and select a random library.

4) Notice the "Place request with partners" icon is gone from the top action bar.

5) Apply patch. Repeat.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t
Marcel de Rooy [Sat, 30 Sep 2023 06:58:23 +0000 (06:58 +0000)]
Bug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t

There is really no need for all those modules here.
What remains, is just a trivial test.

Test plan:
Run t/SuggestionEngine_AuthorityFile.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34944: Remove the use of event attributes from OPAC full serial issue page
Owen Leonard [Thu, 28 Sep 2023 11:25:02 +0000 (11:25 +0000)]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page

This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.

To test you must have a serial record with issues from multiple years.

- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
  correctly filters the table of issues to show only issues from that
  year.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34912: Add 14 hours to 1970 date in Account(s).t
Marcel de Rooy [Tue, 26 Sep 2023 11:45:58 +0000 (01:45 +1400)]
Bug 34912: Add 14 hours to 1970 date in Account(s).t

This makes those tests pass in whatever timezone.

Test plan:
Do not yet apply patch.
Change timezone on commandline with: export TZ='Etc/GMT-14'
NOTE: GMT-14 is what we also call UTC+14 (sign reversed).
Run prove t/db_dependent/Accounts.t t/db_dependent/Koha/Account.t
This fails now.
Apply patch.
Rerun tests and verify that they pass now.
Bonus: Try some other time zone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34916: Fix wrong borrowernumber in ArticleRequests.t
Marcel de Rooy [Tue, 26 Sep 2023 13:45:35 +0000 (13:45 +0000)]
Bug 34916: Fix wrong borrowernumber in ArticleRequests.t

Simple fix: Send patron to userenv instead of library only.

Test plan:
Do not apply patch.
Remove borrowernumber 51.
Run t/db_dependent/Koha/ArticleRequests.t. (FAIL)
Apply patch, rerun test (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34939: Set hour:minute to 23:59 when inputing dates unless explicitly set
Lucas Gass [Wed, 27 Sep 2023 21:22:43 +0000 (21:22 +0000)]
Bug 34939: Set hour:minute to 23:59 when inputing dates unless explicitly set

1. Find some places in the staff interface where data-flatpickr-enable-time is set to true. Examples: renew.tt or circulation.tt
2. Directly input a date in whatever date format you have specified in DateFormat but omit the hour/minute. Example: 12/12/2023
3. See that the hour/minute default to 00:00 if your TimeFormat is 24hr and 12:00 AM if your time format is 12hr
4. Apply patch, clear browser cache.
5. Try step again, setting a date like '12/12/2023'. The hour:minute should be added as 23:59.
6. With TimeFormat set to 24hr try entering a date with the hour:minute like '12/12/2023 11:22'. The hour:minute should be set to 11:22.
7. With TimeFormat set to 12hr try entering a date with the hour:minute like '12/12/2023 11:22 AM'. The hour:minute should be set to 11:22 AM.
8. Play with this in as many TimeFormat and DateFormat combonatinons as you can.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34822: Process real time holds along with indexing
Nick Clemens [Mon, 18 Sep 2023 17:25:15 +0000 (17:25 +0000)]
Bug 34822: Process real time holds along with indexing

Current code already skips indexing when adding record to instead index in a single call. This patch pdates the code to do the same thing for real time holds queue updates.

Note: Newly added records do not need to be updated as they won't have holds yet.

To test:
1 - Have a marc file with several records that match records in your catalog
    You can export part of your catalog to generate one
2 - Set system preference:  RealTimeHoldsQueue to 'enable'
3 - Stage and import file, make sure you are matching and overlaying
4 - Go to Administration->Manage jobs
5 - Note a batch update for each updated record
6 - Apply patch
7 - Repeat
8 - Note a single job added for the entire batch containing only updated records

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34689: Ignore itemnumber when creating item hash
Matt Blenkinsop [Fri, 29 Sep 2023 12:44:11 +0000 (12:44 +0000)]
Bug 34689: Ignore itemnumber when creating item hash

A primary key error can be thrown when an item number is included in a new title hash. We need the item creation to ignore an itemnumber even if it is included in a MARC Framework

Test plan:
1) Edit the MARC framework relating to books (BKS in KTD)
2) In the 952$9 field (Koha itemnumber (autogenerated)), change the value of "Managed in tab" to "items (10)"
3) In the catalog, find a record that uses that MARC framework
4) Click "New" and choose to add a new item
5) Enter a barcode and click the "Add & duplicate" button
6) The page will refresh and an item will have been added
7) Enter a new barcode and click the same button again
8) An error will be thrown
9) Click the back button in the browser
10) Apply patch and restart_all
11) Click the add and duplicate button again
12) This time no error will be thrown and the page will refresh with another new item added
13) Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34645: (follow-up) save sort1 and sort2 in order
Nick Clemens [Mon, 25 Sep 2023 13:12:40 +0000 (13:12 +0000)]
Bug 34645: (follow-up) save sort1 and sort2 in order

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>
12 months agoBug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
Nick Clemens [Mon, 18 Sep 2023 16:32:10 +0000 (16:32 +0000)]
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder

These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that discount and sort1 and sort2 are not populated per the Marc
Apply patch, restart all
Stage and add to basket again
Confirm discount and sort1 and sort2 are populated correctly

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>
12 months agoBug 34911: Test files from HEAD instead of 'master'
Jonathan Druart [Tue, 26 Sep 2023 08:27:57 +0000 (10:27 +0200)]
Bug 34911: Test files from HEAD instead of 'master'

Since bug 34303 the test suite (when ran on jenkins) is no longer testing Perl::Critic

koha_1       | fatal: Not a valid object name master
koha_1       | [14:58:14] t/00-testcritic.t

We are not cloning the whole repo and "master" is not available. Additionally we do not want to test master's files on stable branches anyway...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34932: Patron.t - Pass borrowernumber of manager to userenv
Marcel de Rooy [Wed, 27 Sep 2023 12:48:27 +0000 (14:48 +0200)]
Bug 34932: Patron.t - Pass borrowernumber of manager to userenv

Test plan:
Make sure that you do not have borrowr 51.
Run t/db_dependent/Koha/Patron.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>
12 months agoBug 34967: Move to db_dependent
Marcel de Rooy [Fri, 29 Sep 2023 16:02:46 +0000 (16:02 +0000)]
Bug 34967: Move to db_dependent

No further changes.

Test plan:
Run t/db_dependent/Prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 34967: Add sample biblios and tidy some lines
Marcel de Rooy [Fri, 29 Sep 2023 16:01:13 +0000 (16:01 +0000)]
Bug 34967: Add sample biblios and tidy some lines

Test plan:
Run t/Prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>