Pedro Amorim [Fri, 25 Aug 2023 16:26:10 +0000 (16:26 +0000)]
Bug 34622: Fix store default query
Exclude self smtp server from all the servers being updated to not default if self is_default
Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
It is not possible to perform batch patron modification without selecting
a patron attribute
Test plan:
Test the batch patron modification tool, with or without extended
attributes.
The error was
Can't call method "category_code" on an undefined value at /kohadevbox/koha/tools/modborrowers.pl line 407
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>
Martin Renvoize [Tue, 19 Sep 2023 15:19:53 +0000 (16:19 +0100)]
Bug 32942: (follow-up) Fix test
I missed a test case when doing follow-ups before.. this patch catches
that case and create the required authorized value to allow
ModSuggestion to succeed.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Fri, 25 Aug 2023 20:39:07 +0000 (20:39 +0000)]
Bug 34626: Add waitingdate to holdswaiting patron message
To test:
1. Apply patch
2. Place 2 or more holds for a patron and trigger them so they are waiting holds.
3. Now go to both moremember.tt and circulation.tt for that patron.
4. Confirm that you now see a 'Waiting here since' message.
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 6 Jun 2023 15:27:49 +0000 (15:27 +0000)]
Bug 33924: Improve translation of title tags: Rotating collections
This patch updates rotating collection templates so that title tags can
be more easily translated.
The patch also makes some corrections to breadcrumb navigation and page
headers to make sure they are consistent with titles.
To test, apply the patch and confirm that the following rotating
collection pages have the correct title tags:
- Tools -> Rotating collections
- Rotating collections list
-> New collection
-> Edit collection
-> Delete collection -> Confirmation page
-> Transfer collection
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 7 Sep 2023 17:13:46 +0000 (17:13 +0000)]
Bug 34740: Update sort options in ES config to by Yes/No
At some point the option for 'undef' was removed from te sort options
and was collapsed to yes/no
The dropdowns when adding a new field were missed, this patch corrects that.
While undef in a mappings file wil stil load, when saving we should not privde undef any longer
To test:
1 - Browse to bottom to add a new field on the 'Bibliographic records' tab in
Administration > Search engine configuration (Elasticsearch)
2 - Set sortable column to undef, set other columns and provide a valid field
3 - Click '+Add'
4 - Click 'Save'
5 - At top of page you receive an error:
An error occurred when updating mappings: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'sort' cannot be null at /kohadevbox/koha/Koha/SearchField.pm line 37 .
6 - Apply patch, restart all
7 - Add a new mapping, your only choices are Yes/No
8 - Save mapping
9 - Confirm it saves correctly
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Wed, 30 Aug 2023 16:16:43 +0000 (16:16 +0000)]
Bug 34660: Make deliveries table on housebound.tt a DataTable
To test:
1. Turn on the housebound module ( HouseboundModule )
2. From a staff account add at leats one staff member as a Deliverer and a Chooser.
3. From a patron account click on the 'Housebound' tab. Add some deliveries.
4. Notice they sort with the oldest deilivery first.
5. Apply patch and reload the page.
6. Now the table is a DataTable and can be dymacially sorted.
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Laura Escamilla [Mon, 28 Aug 2023 14:20:17 +0000 (14:20 +0000)]
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable
When adding and deleting holidays, holidays might return
unexpectedly.
To test:
1 - Enter a holiday repeated yearly on a range from the 1st of the month to the 5th
2 - Delete it
3 - Add a new holiday from the 20th to the 25th
4 - When saved, the holiday from the 1st to the 5th is also added again.
5 - Apply patch and restart_all.
6 - Repeat steps 1-3. Notice that the holiday from the 1st to the 5th is no longer added and it has properly been cleared from the cache.
7 - Sign off! :D
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Wed, 6 Sep 2023 10:50:30 +0000 (10:50 +0000)]
Bug 34728: Make pre tag conditional
This patch makes the pre-formatting of notice templates conditional on the content type.
Test plan:
1) Navigate to tools > Notices and slips
2) Edit the notice with the code of HOLD
3) Under print, paste the following
<p>Please collect within 10 days from the date of this letter and don't forget to bring your library card with you.</p>
<p>Be aware that opening hours vary at different library branches so if in doubt double check the times before you visit.</p>
<p>Should you no longer require this item please contact us so we can make it available for another customer.</p>
<p>Thank you</p>
4) Check the box that says HTML message and save the notice
5) In Patrons, select a patron and in Patron messaging preferences, check the box in the Email column for Hold filled
6) Find a record in the catalogue
7) Copy the barcode for one of the items
8) Place a hold on the item for the patron you selected
9) Navigate to Circulation > Check-in
10) Paste the barcode in the Check-in box and click Check-in
11) In the pop-up box, click Confirm hold
12) In the command line, run perl misc/cronjobs/gather_print_notices.pl --letter_code=HOLD --html /tmp
13) cd /tmp
14) There should be a file in there called 'notices_HOLD-date.html
15) cat this file
16) The html you pasted in the template will be wrapped in a <pre> tag
17) Apply patch and restart_all
18) rm the notices file that was created
19) cd /kohadevbox/koha
20) Select a new record from the catalogue and repeat steps 7-15 for this record, using the same patron
21) This time, the html file should not contain the <pre> tag
22) Sign off!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34333: Add embed option for `cancellation_requested` for holds
This patch adds the `cancellation_requested` attribute to the hold
object definition, and allows embeding it as on the different holds
endpoints that migt be useful.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Hold.t \
t/db_dependent/api/v1/*holds.t
=> SUCCESS: Tests pass!
3. Play with your REST tool (Postman?) on the following endpoints:
GET http://localhost:8081/api/v1/holds
GET http://localhost:8081/api/v1/patrons/:patron_id/holds
on both, pass and not pass the `x-koha-embed` header with
`cancellation_requested` on it.
=> SUCCESS: It is easy! You see the attribute and you don't, and the
content makes sense!
4. Sign off :-D
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>
This patch adds a helper method for telling if a hold has cancellation
requests. To be used for embedding such information.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: Tests pass, the new method is covered by tests.
3. Sign off :-D
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>
Bug 34786: after_biblio_action hooks - No find when action is delete
Test plan:
Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Fri, 25 Aug 2023 01:26:01 +0000 (01:26 +0000)]
Bug 34613: Replace onclick attributes in midiplayer.js
This patch replaces the onclick attributes in midiplayer.js
with Javascript click handlers.
To test:
0. Apply patch
1. Clear browser cache (it may be necessary to go into the
Network tab and explicitly disable cache)
2. Add 031 subfields 2gopnu to Default framework
3. Create a catalogue record with a 031 like follows:
2: pe
g: G-2
o: 4/4
p: 4bB''C2bE/2F4GbB/'bB2''C4D/F2.bE/4GG2bB/4'''C2C4''bB/4bE2G4bB/4bE2.F/
n: xFCGD
4. Enable the following sysprefs:
OPACShowMusicalInscripts
OPACPlayMusicalInscripts
5. Go to OPAC record view and click "Play this sample"
6. Play with the "Pause/Start" and "Stop" buttons
7. If the buttons work, it means the patch worked
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>
Bug 32942: (QA follow-up) Document possible values
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>
Frédéric Demians [Fri, 10 Feb 2023 17:23:11 +0000 (18:23 +0100)]
Bug 32942: Suggestion API route when non 'standard' status are present
The API route for listing all suggestion:
/api/v1/suggestions
send back an error message when there is a suugestion with non standard
status (ASKED, CHECKED, ACCEPTED, REJECTED).
This patch fixes this too restrictive restriction.
TO TEST:
1. Add a status in SUGGEST_STATUS AV list.
2. Create a suggestion, and assign it to the previsous status.
3. Call /api/v1/suggestion
3. You get an error message:
{
"errors": [ {
"message":"Not in enum list: ASKED, CHECKED, ACCEPTED, REJECTED.",
"path":"\/1\/status"
}],
"status":200
}
4. Apply the patch. Call /api/v1/suggestion
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>
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>
Bug 34415: Remove T::D::C from EdiTransport.t, move to t/db
Moving file now here.
Test plan:
Run t/db_dependent/Koha/Edifact/Transport.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: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Note that a few isbn tests were identical.
Tidied the three moved subtests here.
Test plan:
Run t/db_dependent/Koha.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The DBIx fixture here is replaced by a simple mock on Libraries.
getFacets only needs the count of libraries.
Feels better than removing all libraries here..
Note: Moved tests at 'root level' to a new subtest.
Test plan:
Run t/Koha.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
Enable self registration and GDPR consent (privacy policy).
Look at selfreg page on OPAC. Scroll to bottom.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Wed, 31 May 2023 22:38:50 +0000 (22:38 +0000)]
Bug 33876: Add class for styling
To test:
1. Checkout and item that has a public and nonpublic note.
2. In the checkout table ( Title column ) notice the notes display. If you use the browser dev tools to inspect you'll notice a "-" outside of any HTML element.
3. Apply patch.
4. See the '-' is now inside of a html element with class of seperator.
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>
Nick Clemens [Fri, 25 Aug 2023 15:51:12 +0000 (15:51 +0000)]
Bug 34552: Don't exclude payments with no status
Bug 29664 removed payments with a void status, however, the query also
removed any payments with no status set
Test Plan:
1 - Set up your cash registers and enable POS and add a debit type that is able to be sold
2 - Take 2 payments via POS
3 - Void one payment
4 - Go to Reports->Statistics wizards->Cash register
4) Verify neither shows for the "All payments to the library" and
"Payment" transaction type filters
5) Apply this patch
6) Restart all the things!
7) Verify the non-voided fee shows for the "All payments to the library" and
"Payment" transaction type filters and the voided fee does not
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Tue, 5 Sep 2023 04:58:52 +0000 (04:58 +0000)]
Bug 34711: Remove use of onclick for opac-privacy.pl
This change removes the "onclick" attribute for the buttons
on opac-privacy.pl.
Note: The Javascript is placed in a separate file, which is
the preferred way for Javascript to be handled by
Content-Security-Policy
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACPrivacy
2. Set syspref to "Allow"
3. Go to http://localhost:8080/cgi-bin/koha/opac-privacy.pl
4. The confirmation modal appears and "OK" and "Cancel" buttons work as
expected
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>
Pedro Amorim [Fri, 8 Sep 2023 16:01:03 +0000 (16:01 +0000)]
Bug 34724: (QA follow-up):
Replace href from thumbnail link with a # to keep pointer event. The href link gets reconstructed by showCover anyway
Remove return false from on click event, its not triggering a location change anymore because of the above
Remove check for imagenumber, its a non-null primary key, if the image exists, then the imagenumber must also exist
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 6 Sep 2023 06:40:21 +0000 (06:40 +0000)]
Bug 34724: Remove inline onclick handler for opac-imageviewer.pl
This patch moves the click handler for thumbnails for opac-imageviewer.pl
out of the inline HTML and out to an existing <script> element.
Test plan:
0. Apply the patch (including dependent patches)
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=localcover
2. Change both *LocalCoverImages sysprefs to "Show"
3. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=AllowMultipleCovers
4. Change "AllowMultipleCovers" to "Allow"
5. Go to
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Click "Images (0)" tab
7. Download or make two JPEG images
8. Upload the images
9. Go to http://localhost:8080/cgi-bin/koha/opac-imageviewer.pl?biblionumber=29
10. See one large image in the centre and two smaller thumbnails on the right side
11. Click on the thumbnail of the image that isn't displayed in the centre
12. Note that the image changes
13. Click the other thumbnail and note that the image changes back
PA amended patch: Added missing test plan step
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 6 Sep 2023 06:57:15 +0000 (06:57 +0000)]
Bug 34725: Remove use of onclick for OPAC cart
This patch moves the click handler in the OPAC cart from the inline HTML
and out to an existing <script> element.
Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
2. Add the results to the cart
3. Click on the "Cart"
4. One by one click on the title of each row
5. Notice how the parent window changes to the detail record for that title
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 25 Aug 2023 16:35:18 +0000 (16:35 +0000)]
Bug 34400: Inconsistencies in OAI sets page titles, breadcrumbs, and header
This patch fixes a couple of inconsistencies in the style of the
OIA sets administration screen, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.
The patch also corrects the structure of the form on the OAI set
mappings page so that the submit button is outside the "page-section"
area.
To test, apply the patch and go to Administration -> OAI sets. Test each
variation of the page:
- Main page
- New OAI set
- Edit OAI set
- OAI set mappings
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>
Matt Blenkinsop [Thu, 14 Sep 2023 12:27:20 +0000 (12:27 +0000)]
Bug 34789: Update unit tests
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>
Matt Blenkinsop [Thu, 14 Sep 2023 12:26:53 +0000 (12:26 +0000)]
Bug 34789: Update usage throughout Koha modules and Vue components
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>
Matt Blenkinsop [Thu, 14 Sep 2023 12:25:21 +0000 (12:25 +0000)]
Bug 34789: DBIC file
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>
Matt Blenkinsop [Thu, 14 Sep 2023 12:23:49 +0000 (12:23 +0000)]
Bug 34789: Database and API update
Currently the erm_eholdings_titles table has a field called preceeding_publication_title_id. This should be preceding_publication_title_id
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>
Pedro Amorim [Thu, 7 Sep 2023 09:55:28 +0000 (09:55 +0000)]
Bug 34735: Remove uneeded CSS
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>
Pedro Amorim [Thu, 7 Sep 2023 09:53:43 +0000 (09:53 +0000)]
Bug 34735: Update breadcrumb markup
Make the breadcrumb navigation item markup match the rest of Koha
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>
Pedro Amorim [Thu, 7 Sep 2023 09:52:06 +0000 (09:52 +0000)]
Bug 34735: Remove pointer events from disabled links
Add pointer-events: none to a.disabled links in staff
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>
Lucas Gass [Thu, 7 Sep 2023 01:52:47 +0000 (01:52 +0000)]
Bug 34735: Style disabled breadcrumbs
To test:
1. Turn on ERMModule.
2. Notice the disbaled breadcrumbs are color: #000;
3. Apply patch, yarn build
4. Look again, disbaled breadcrumbs are color; #696969;
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>
Owen Leonard [Wed, 6 Sep 2023 10:38:41 +0000 (10:38 +0000)]
Bug 34411: Inconsistencies in Additional fields page titles, breadcrumbs, and header
This patch makes changes to the additional fields administration
template in order to make it more consistent with other pages in Koha.
To test, apply the patch and go to Administration -> Additional fields.
View each variation of the page to confirm that breadcrumb navigation,
page title, and page headings are consistent with each other.
- Main list
- Table view (e.g. aqbasket, aqorders, etc)
- New field
- Edit field
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 7 Sep 2023 15:41:58 +0000 (15:41 +0000)]
Bug 34409: Fix inconsistencies in Audio alerts headers
This patch makes a minor change to the structure of the audio alerts
administration template so that the add/edit form is more consistent
with other similar forms.
The patch doesn't make any changes to page title and breadcrumbs because
the add/edit action doesn't trigger a page reload, so the required
change can't be made just with markup.
To test, apply the patch and enable the AudioAlerts system preference
if necessary.
- Go to Administration -> Audio alerts.
- Click "New alert" and confirm that the form looks correct.
- Edit an existing alert to confirm that this view also looks correct.
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 7 Sep 2023 16:46:05 +0000 (16:46 +0000)]
Bug 34407: Inconsistencies in Z39.50 servers page titles, breadcrumbs, and header
This patch makes changes to the Z39.50 servers administration and
related templates in order to make them more consistent with other pages
in Koha.
One case has been added to page title and breadcrumb navigation: An
indication that a search has been performed. The subheading is modified
to make it clear that the search is a "starts with" search.
To test, apply the patch and go to Administration -> Z39.50/SRU
servers. View each variation of the page to confirm that breadcrumb
navigation, page title, and page headings are consistent with each
other.
- Z39.50/SRU servers list.
- New Z39.50 server
- New SRU server
- Edit Z39.50 server
- Edit SRU server
- Modify SRU search field mapping for a bibliographic record
server
- Modify SRU search field mapping for an authority record server
- Use the header search form to search for a server by name
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>
Owen Leonard [Tue, 5 Sep 2023 17:06:51 +0000 (17:06 +0000)]
Bug 34380: Fix inconsistencies in Item types page titles, breadcrumbs, and header
This patch fixes inconsistencies in the item type administration page so
that page titles, breadcrumb navigation, and page headers are consistent
with each other and with other pages in Koha.
To test, apply the patch and go to Administration -> Item types. Check
each variation of the page to confirm that everything looks correct:
- Item types list
- New item type
- Edit item type
- Confirm deletion of item type
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>
Lucas Gass [Thu, 7 Sep 2023 21:19:26 +0000 (21:19 +0000)]
Bug 34719: Add middle_name to patron autocomplete
To test:
1. Apply patch and clear browser cache.
2. Find some patrons with middle_name populated or add new patrons with a middle_name.
3. Make sure PatronAutoComplete is on
4. Try searching for a part of one of the patron's names who has a middle_name.
5. It should appear in the autocomplete dropdown
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 14 Sep 2023 13:21:44 +0000 (13:21 +0000)]
Bug 33406: (QA follow-up) Adjust tests and tidy
Rather than test that nothing is returned, we want to test that the terms are filtered as expected. This also avoids the possibility of the tests failing in a db where there is a record for Donald Duck
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 33406: Filter out some known isolated trouble makers
Test plan:
1) Launch k-t-d with ES:
-- ktd --es7 pull
-- ktd --es7 up
2) Visit /cgi-bin/koha/authorities/authorities-home.pl and search for 'tim'
3) Edit that, add a dash '-' to 100$a, like 'Bunce, Tim - name'"
4) Do a authority search for 'tim - name', notice it errors out
5) Apply patch
6) Perform the same search, notice it doesn't error and returns the correct record
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 11 May 2023 10:38:53 +0000 (12:38 +0200)]
Bug 33406: Handle ES search errors for authorities
We are dealing ok with ES exceptions for biblio records search,
catching them and raising them to the end user. But we don't for
authorities, where we explode with an ugly 500.
Test plan:
Search for "(term_1*) AND (-) AND (term_2*)" in the authority search and
notice that you don't get a 500 but an error instead saying that you
should try again
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Mon, 4 Sep 2023 12:28:29 +0000 (12:28 +0000)]
Bug 33406: Add tests
Test plan:
1) Apply this tests patch only
2) Run: prove t/Koha/SearchEngine/ElasticSearch/Search.t
3) Notice it fails with nasty ES "Failed to parse query" error
4) Apply the other patches
5) Repeat 2) - notice theres no nasty error
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Tue, 22 Aug 2023 15:09:17 +0000 (15:09 +0000)]
Bug 34589: Only update users if permission is added
To test:
1 - Assign a user 'edit_items' permission
2 - Manually run the update
perl -e 'use C4::Installer; warn Data::Dumper::Dumper(C4::Installer::run_db_rev("installer/data/mysql/db_revs/221200003.pl"));'
3 - Edit patron permissions
4 - Note they now have edit_any_item permission
5 - Remove that permission
6 - Run the update again
7 - Edit patron permissions
8 - They have edit_any_item again - remove it
9 - Apply patch
10 - Run the update
11 - Edit patron permissions
12 - No new permissions added!
13 - sudo koha-mysql kohadev
DELETE FROM permissions WHERE code = 'edit_any_item'
14 - Run the update again
15 - Edit patron permissions
16 - They do have edit_any_item
Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 15 Aug 2023 07:36:43 +0000 (07:36 +0000)]
Bug 14156: Add id tags to each MARC note in the display
This patch adds tag number to the data which is returned by
$biblio->get_marc_notes(). The bibliographic detail page in the staff
client is modified to use the tag number in both a class (for consistent
styling across the same tag number) and id (for unique styling for each
repeated tag).
To test, apply the patch and restart services.
- As a quick test for custom CSS, go to Administration -> System
preferences and locate the IntranetUserCSS preference.
- Add this testing CSS:
- Locate a record with multiple notes fields. In the sample data, record
46, "Viridiana" is a good example which works well with the above CSS.
- On the bibliographic detail page for the record, click the
"Descriptions" tab.
- Each MARC note should be colored according to the tag it comes from.
- Inspect the HTML to confirm that each paragraph also has its own
unique ID.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Tue, 5 Sep 2023 13:40:07 +0000 (13:40 +0000)]
Bug 34716: Fix typo
Fixes a typo where "it's" should be "its"
Test plan:
1) Check the commit and observe that the change has been made correctly
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>
Matt Blenkinsop [Wed, 24 May 2023 14:51:04 +0000 (14:51 +0000)]
Bug 33818: Descriptive title added to opac-ISBDdetail.tt
This patch adds the biblio.title to the breadcrumb for the ISBD viewer.
This now matches the normal and MARC views and is much clearer for
screen readers.
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>
Kyle Hall [Wed, 22 Feb 2023 18:16:35 +0000 (13:16 -0500)]
Bug 33045: Use process_tt in C4::Record::marcrecord2csv
Bug 33030 implements a new helper subroutine to standardize processing of Template Toolkit syntax outside slips and notices. We should use this subroutine in marcrecord2csv.
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Record/marcrecord2csv.t
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>
Owen Leonard [Fri, 8 Sep 2023 15:44:33 +0000 (15:44 +0000)]
Bug 34443: Spelling: Patron search pop-up Sort1: should be Sort 1
This patch instances of "Sort1" and "Sort2" being used
as labels in the interface, replacing the strings with "Sort 1" and
"Sort 2"
To test, apply the patch and test this page:
With the borrowerRelationship system preference populated, edit a
child record and click the "Add guarantor" button. There are two
fields in the form with the updated labels.
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Fri, 8 Sep 2023 11:04:56 +0000 (11:04 +0000)]
Bug 34743: Fix POD description
Currently --expiration-from-today has the same definition as --update-expiration. The description has now been updated to reflect the fact that it will set the date from today, and not the patron's enrollment date
Test plan:
Look at the patch file and confirm that the POD now mentions today's date rather than the patron's enrollment date
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34228: Add translation context to "Managed by"
This patch adds context for translators to the Managed by string when it
applies to acquisitions baskets (as opposed to purchase suggestions).
To test:
0. If you don't already have acquisitions set up, create a budget and a vendor
1. Apply patch
2. Create a basket
2.1. Go to Acquisitions
2.2. Search for a vendor
2.3. Click New > Basket
2.4. Fill out the form
2.5. Click Save
3. View the basket details page
--> The page works (no errors)
--> 'Managed by:' is displayed on the right, no spelling errors
4. Click Add to basket > From a new (empty) record
--> The page works (no errors)
--> 'Managed by:' is displayed under Basket details, no spelling errors
5. Click Cancel
6. Update the po files
gulp po:update --lang xx-XX
for example, gulp po:update --lang fr-CA
7. Check the xx-XX-messages.po file (e.g. misc/translator/po/fr-CA-messages.po)
--> There should be an entry for 'Managed by:' with a line msgctxt that gives the 'Acquisitions basket managed by user' context
8. Update the file with a random phrase for the 'Managed by:' translation
for example, I translated 'Managed by:' by 'AAAAAAA:', just to see the difference
9. Install a new language
9.1. Run the following commands in the terminal, replacing xx-XX with the language code (e.g. fr-CA)
./misc/translator/translate install xx-XX
9.2. In the Koha staff interface, go to Administration > System preferences
9.3. Search for language
9.4. Check the box next to the new language
9.5. Save
10. Switch the language of the interface
11. Redo steps 3 and 4
--> The pages still work (no errors)
--> The 'Managed by:' string should be replaced by whatever you put in step 8
Optional test
12. In the staff interface in English, view one or more of these pages, the 'Managed by' string should be unchanged
- Acquisitions > Suggestions (Managed by column heading)
- Acquisitions > Suggestions (Organize by: Managed by sorting option)
- Acquisitions > Suggestions (Filter by: Suggestion information: Managed by filter option)
- Acquisitions > Suggestions > Click on a suggestion (Managed by table row under Suggestion management)
- Patrons > Patron account > Purchase suggestions (Managed by column heading)
13. View these same pages in the other language, the Managed by string should NOT be changed to whatever you put in step 8
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 30 Aug 2023 13:46:52 +0000 (13:46 +0000)]
Bug 34656: Do not update real Time Holds Queue when moving from cart to shelf
To test:
1 - Enable RealTimeHoldsQueue system preference
2 - Set UpdateItemLocationOnCheckin to _ALL_: CART
3 - Check in an item
4 - Check the background jobs - the RTHQ is updated
5 - perl -e 'use C4::Items; C4::Items::CartToShelf(##);' -- substitute the itemnumber from above
6 - Check the background jobs - no new update to RTHQ
7 - Confirm item was set back to correct permanent_location
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 30 Aug 2023 13:46:17 +0000 (13:46 +0000)]
Bug 34656: Unit test
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 12 Sep 2023 15:24:19 +0000 (16:24 +0100)]
Bug 34767: Pass fee_ack into ::Transaction::Renew(All)
This patch copies the $fee_ack field into the generated
::Transaction::Renew|All objects such that the fee acknowldegement flag
is respected for renewals.
Test plan
To test:
1) Add a rental charge to an itemtype
2) Checkout an item of that itemtype to a user
3) Attempt a renewal of that item via SIP2 and note that it fails
sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529000035676 --item 39999000007756 -m renew
4) Pass the fee_acknowledgement bit in renewal and note the renewal
still fails.
sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m renew
5) Apply patch and note the above now succeeds
sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m renew
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>
Nick Clemens [Tue, 12 Sep 2023 15:28:34 +0000 (15:28 +0000)]
Bug 34768: Remove checkbox column from relatives fines on OPAC
When a patron has a guarantee and can see their fines on the opac and
an opac payment plugin is enabled there is an error on the 'Charges'
tab.
The table uses a 'COLSPAN' variable which is set to 5 or 6 depending on
if OPAC payments are enabled. The guarantees table has one less column
than the patron's however, so it is going out of range and causing a JS
error. Additionally, we are adding a column to the child's table which
is not used as their fines cannot be selected for payment at this time.
This patch removes the checkbox column and sets the colspan directly to
4
I also fix an issue where the table is not being set as we need to
reference the patron object in the guarantor info to obtain the id.
To test:
1 - Set system preference: AllowStaffToSetFinesVisibilityForGuarantor to
allow
2 - Find a patron
3 - Add some fines to their account
4 - Install and enable an opac payment plugin
(https://github.com/bywatersolutions/koha-plugin-pay-via-govolution
for example)
5 - Sign in to OPAC as borrower
6 - Go to 'Charges' tab
7 - Select a fee
8 - Confirm 'Make payment' button enabled and 'amount to pay' is
updated
9 - Add a guarantee to patron in staff interface
10 - Set 'Show charges to guarantors' to 'Yes'
11 - Add and pay a fine for the child
12 - View guarantor account on the OPAC
13 - Confirm you now see child's charges
14 - Confirm selecting your own fees does not enable the button or
update amount to pay
15 - Note JS error in console
16 - Apply patch
17 - Reload patrons page
18 - Confirm the table loads correctly (no JS error)
19 - Confirm selecting a fine updates the total and enables button
20 - Disable the payment plugin
21 - Confirm the display is still correct, no errors
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>
Martin Renvoize [Tue, 12 Sep 2023 13:18:37 +0000 (14:18 +0100)]
Bug 34764: Set fee_acknowledged to expect a string
For consistency with other options I opted to have the fee acknowledged
parameter to expect a string and as it's an optional parameter I've
dropped the default value of 'N' too.
Test plan
1) Prior to this patch
1a) Attempt a checkout without passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will be '|BON', the default
1b) Attempt a checkout passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will still be '|BON', failure
1c) Attempt a checkout passing a string for fee_acknoewledeged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will still be '|BON', failure
2) Apply the patch
2a) Attempt a checkout without passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529000035676 --item 39999000007756 -m checkout`
The optional `|BO` element should not be present
2b) Attempt a checkout passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged N --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will now be '|BON', success
2c) Attempt a checkout passing a string for fee_acknoewledeged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will now be '|BOY', success
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>
Nick Clemens [Thu, 7 Sep 2023 19:02:08 +0000 (19:02 +0000)]
Bug 34736: Don't trigger quantity change on loading order
We have a change event to automatically check or uncheck the first items on a list when
the value is changed directly.
The code is calling this when setting the quantity when loading an order, but this is causing a problem
in that we are setting the quantity to load.switch orders and triggering the checkboxes wrongly
To test:
1 - Create a new basket, create items on placing the order
2 - Create an order line with 4 items
3 - Create another order line with 2 items
4 - Close the basket
5 - Receive shipment and create an invoice
6 - Select both orders via the checkboxes got multi-receive
7 - Click "receive selected"
8 - Edit first order line, quantity received = 1 (1 out of 4)
9 - Verify that one item is also selected in the table
10 - Switch to "next order"
11 - Quantity received is 0, no items checked in the second order
12 - Switch to "Previous order"
13 - ERROR: Item checkbox was lost, quantity received still correct
14 - Switch to next order
15 - ERROR: item is now checked, quantity received 0
16 - Note: We see a mix up of the information entered, one has the checkbox now, the other the quantity.
17 - Save changes
18 - Click confirm
19 - Continue (complaint about the second order left unchanged)
20 - You are back on the summary:
* pending order: quantity changed from 4 to 3 - correct
* received order: quantity shows 1 - correct
21 - Click on receive for your updated order line (with 3 items)
* 4 items show to be received (should be 3)
22 - Apply patch
23 - Cancel receipt of items
24 - Repeat 1-12
25 - Items are loaded correctly
26 - Try with various checkboxes and switch back and forth
27 - Confirm that manually adjusting quantity received checks the first n boxes
28 - Confirm setting quantity to 0 unchecks the boxes
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Mon, 14 Aug 2023 21:11:52 +0000 (21:11 +0000)]
Bug 34532: Silence warns in Patroncard.pm
To test:
1. Go to patron card creator and make a patron card batch, card layout, and card template.
2. In the card layout leave some values blank for Lower left X coordinate and Lower left Y coordinate.
3. Now go create a card batch while tailing the plack-intranet-error log/
4. Notice in the logs:
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 109.
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 248.
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 249.
5. Apply patch, restart_all
6. Try again and notice the WARNS should be gone from the logs now.
7. Make sure you can still create patron cards and the PDF's the generate look right.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
Run git grep DBD::Mock. Only finding old release notes.
Run git grep mock_add_resultset. Nothing.
Bonus: Find a few other DBD::Mock properties/attributes.
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>
Jonathan Druart [Wed, 7 Jun 2023 13:37:55 +0000 (15:37 +0200)]
Bug 33940: Move C4::Members cardnumber sub to Koha::Policy::Patrons::Cardnumber
Test plan:
The idea here is to confirm this patch does not introduce regression.
For that you will play with the CardnumberLength syspref and create a
new user, modify an existing one, and check that the UI does not let you
modify an invalid cardnumber.
The onboarding process and the patron import tool will also have to be tested
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 33940: Fix selfreg
please squash with first patch
Bug 33940: Fix messages we sent to templates
please squash with the first patch
Bug 33940: Fix what we send to memberentry
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Thu, 7 Sep 2023 13:47:21 +0000 (13:47 +0000)]
Bug 34721: (QA follow-up) update the other labels
Showing only available items -> Showing only records with available items
Show all items -> Show all records
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Tue, 5 Sep 2023 21:34:36 +0000 (21:34 +0000)]
Bug 34721: Change facet availability text in staff interface and OPAC
To test:
1. Apply patch
2. Do a catalog search in the staff interface. Make sure the 'Availability' button reads 'Limit to records with available items'.
3. Do a catalog search in the OPAC. Make sure the 'Availability' button reads 'Limit to records with available items'.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lari Taskula [Fri, 10 Feb 2023 10:48:19 +0000 (10:48 +0000)]
Bug 17499: Replace Koha::MessageAttribute(s) with Koha::Patron::MessagePreference::Attribute(s)
To test:
1. prove t/db_dependent/Illrequests.t
2. grep -rn 'Koha::MessageAttribute', observe no results in Koha code
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>
Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> 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>
Lari Taskula [Thu, 18 Mar 2021 02:13:50 +0000 (02:13 +0000)]
Bug 17499: (follow-up) Rename to Koha::Patron::MessagePreference
Koha::Patron::Message refers to "messages" table that is used for circulation
messages. MessagePreference now refers to a messaging preference that is used
for enqueued notifications.
Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> 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>
Lari Taskula [Wed, 18 Nov 2020 02:15:23 +0000 (02:15 +0000)]
Bug 17499: (follow-up) Contact information vs. mtt validation
This patch adds a subroutine that handles message transport type validation by
first checking related patron contact information.
As an example, if there is no email address, we shouldn't let email be selected
as a messaging transport type.
The reason to isolate logic into a separate subroutine is that C4/Reserves.pm
_koha_notify_reserve() also uses the same logic and we should not duplicate it.
C4::Reserves::_koha_notify_reserve() will be adjusted to use this new sub in
Bug 18595.
To test:
1. prove t/db_dependent/Koha/Patron/Message/Preferences.t
Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> 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>
Lari Taskula [Wed, 18 Nov 2020 04:10:48 +0000 (04:10 +0000)]
Bug 17499: (follow-up) Validate phone and itiva transport types
Message transport types 'phone' and 'itiva' were not validated unlike
'email' and 'sms'. This patch adds equivalent checks to the missing mtts.
To test:
1. prove t/db_dependent/Koha/Patron/Message/Preferences.t
Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> 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>
Lari Taskula [Thu, 5 Nov 2020 18:26:42 +0000 (18:26 +0000)]
Bug 17499: (follow-up) Fix warning
Fix warning
DBIx::Class::Storage::DBI::select_single(): Query returned more than one row.
SQL that returns multiple rows is DEPRECATED for ->find and ->single.
Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> 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>
To test:
1. prove t/db_dependent/Koha/Patron/Message/Preferences.t
Sponsored-by: The National Library of Finland Signed-off-by: Michal Denar <black23@gmail.com> 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>
Martin Renvoize [Wed, 8 Jul 2020 12:32:17 +0000 (13:32 +0100)]
Bug 17499: (QA follow-up) Fix POD errors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> 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>
Martin Renvoize [Wed, 8 Jul 2020 12:20:35 +0000 (13:20 +0100)]
Bug 17499: (QA follow-up) Fix Licence Statements
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> 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>
Emmi Takkinen [Wed, 26 Feb 2020 10:04:08 +0000 (12:04 +0200)]
Bug 17499: Replace test subroutines with build_object
This patch replaces subroutines used to build test
objects with call to $builder->build_object.
To test prove that tests are still running with:
prove t/db_dependent/Koha/Patron/Message/*
Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> 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>
Emmi Takkinen [Thu, 20 Feb 2020 10:45:27 +0000 (12:45 +0200)]
Bug 17499: Define koha_object(s)_class where needed
This patch adds koha_object(s)_class for needed modules
to fix issues with tests.
Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> 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>
Lari Taskula [Fri, 21 Oct 2016 14:26:24 +0000 (17:26 +0300)]
Bug 17499: Add Koha-objects for messaging preferences
This patch adds Koha-objects for messaging preferences.
Adds simple validation for messaging preferences.
The validation includes
- throw exception if both borrowernumber or categorycode is given for a new pref
- throw exception if patron for the given borrowernumber is not found
- throw exception if category for the given categorycode is not found
- throw exception if days in advance cannot be configured but is given
- throw exception if days in advance configuration is invalid (value between 0-30)
- throw exception if digest is not available but attempted to set on
- throw exception if digest must be enabled but attempted to set off
- throw exception on duplicate messaging preference
Adds a method for getting available messaging options.
Adds a method for setting default messaging preferenes.
$patron->set_default_messaging_preferences (where $patron is a Koha::Patron)
...or...
Koha::Patron::Message::Preference->new_from_default({
borrowernumber => 123,
categorycode => "ABC",
message_attribute_id => 1,
});
Since messaging preference is a feature that has multiple related database tables,
usage via Koha-objects is sometimes frustrating. This patch adds easy access to
message transport types via
$preference->message_transport_types (for getting)
$preference->set({ message_transport_types => ['email', 'sms'] }) (for setting)
(also supports other calling conventions, see documentation for more)
Adds optional parameter message_name for Koha::Patron::Message::Preferences->find
and ->search. Simplifies the Koha-object usage by allowing developer to skip joins
and / or querying the message name via attribute_id from message_attributes table.
Includes test coverage for basic usage.
To test:
1. prove t/db_dependent/Koha/Patron/Message/*
Following Bug 17499, check also Bug 18595 that replaces C4::Members::Messaging
with these new Koha-objects.
Signed-off-by: Dominic Pichette <dominic@inlibro.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> 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>
This patch removes a useless Template Toolkit tag.
To test:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=LocalCoverImages
2. Change to "Show"
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4. Upload an image
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
6. Note that the local cover image appears even without the TT tag
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>
Julian Maurice [Tue, 31 Jan 2023 08:20:15 +0000 (09:20 +0100)]
Bug 32765: Retry transfer after cancelling hold
When trying to manually transfer an item that is on hold, we have the
choice to cancel the hold and try the transfer again. When choosing
this option, the hold is correctly cancelled but the transfer is not
tried again.
This patch fixes that
Test plan:
1. Place a hold on a specific item
2. Try to transfer it manually (Circulation » Transfer)
3. Choose the option to "Cancel hold and then attempt transfer"
4. See that the hold was cancelled, but no transfer was made
5. Apply the patch
6. Repeat step 1-3
7. See that the hold was cancelled, and the transfer was made
Signed-off-by: Nicolas Giraud <nicolas.giraud@inlibro.com> 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>
Martin Renvoize [Mon, 11 Sep 2023 13:50:43 +0000 (14:50 +0100)]
Bug 34223: (follow-up) Ensure consistent ordering of statuses
This patch adds an order_by clause to ensure consistent ordering of the
returned status and status_alias statuses from the database between
MySQL 8 and other DB engines.
This fixes the failing tests introducd in bug 34223.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 18 Aug 2023 07:40:16 +0000 (07:40 +0000)]
Bug 34572: Simplify template logic around check-in input form
This patch makes a minor simplifying change to the check-in template
around how to style the barcode input field in dropbox or fine-exempt
mode.
To test, apply the patch and go to Circulation.
- If necessary, check some items out to patrons so that you have items
to check in.
- Go to the check-in page and click the icon inside the barcode field to
expand the panel of options.
- Check the "book drop mode" checkbox. The barcode field should now be
highlighted yellow.
- Check in an item. When the page redisplays, the barcode field should
have the same highlighted style.
- If necessary, enable the finesMode system preference.
- On the check-in page, in the panel of options, check the "Forgive
overdue fines" checkbox. Test checking in again, confirming the same
style consistency in the barcode field.
Signed-off-by: Inkeri <inkeri.hakulinen@helsinki.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 6 Sep 2023 06:28:45 +0000 (06:28 +0000)]
Bug 34723: Show thumbnails on opac-imageviewer.pl when imagenumber not provided
This patch fixes a method call in the opac-imageviewer.pl so that thumbnails
correctly appear.
Test plan:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=localcover
2. Change both *LocalCoverImages sysprefs to "Show"
3. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=AllowMultipleCovers
4. Change "AllowMultipleCovers" to "Allow"
5. Go to
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Click "Images (0)" tab
7. Download or make two JPEG images
8. Upload the images
9. Go to http://localhost:8080/cgi-bin/koha/opac-imageviewer.pl?biblionumber=29
10. See one large image in the centre and two smaller thumbnails on the right side
PA amended patch: Added missing test plan step
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>