Commit graph

31573 commits

Author SHA1 Message Date
Magnus Enger
e5220bc6a1 Bug 20546: Display shelving location on checkin
Currently, the sehlving location is not being displayed in the table
of checked in items on <intranet>/cgi-bin/koha/circ/returns.pl

To test:
- Make sure you have a couple of books with a value for shelving location (952$c)
- Check the books out
- Check the books in
- Verify nothing is displayed in the "Shelving location" column
- Apply this patch
- Check the books out and in again
- Verify the shelving location is now being displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 13:26:47 -03:00
Julian Maurice
b6c739ae9c Bug 20304: (QA follow-up) Remove unwanted 'my'
'my' creates a new '$value' variable, and prevented the '$value' in
outer scope to be modified

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:47:17 -03:00
4f8add9613 Bug 20304: Remove warnings from cataloguing scripts
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:47:17 -03:00
d6f3e1fbe6 Bug 18342: Mark Cache::Memcached as mandatory
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:47:07 -03:00
64be74b338 Bug 18342: Enable memcached by default for new installs
Note that there is no way to create an install without memcached.
As it is now considered as stable, there is no point to not use it.

Test plan:
Create a new Koha install and make sure memcached is enabled by default

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:47:07 -03:00
Ere Maijala
0a50dc1ad5 Bug 20665: Reset MySQL connection time zone in the OAI-PMH Provider
TEST PLAN
---------
apply unit test patch
prove t/db_dependent/OAI/Server.t
-- should fail
apply this patch
prove t/db_dependent/OAI/Server.t
-- should pass
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:46:55 -03:00
Ere Maijala
ebc32f2aae Bug 20665: Units tests for testing MySQL connection time zone
TEST PLAN
---------
apply this test patch
prove t/db_dependent/OAI/Server.t
-- should fail
apply the other patch
prove t/db_dependent/OAI/Server.t
-- should pass
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:46:55 -03:00
David Bourgault
de9cfe0c94 Bug 19466: Turn AutoCalc off for new installs
Default value of AutoMemberNum is now 0.

TEST PLAN:
0. Do a fresh install of Koha
1. In system preferences AutoMemberNum should be off
2. No warning should be shown next to the cardnumber field in the patron creation form.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 11:03:48 -03:00
e5d5038fa3 Bug 20531: Set the timestamps to the same value to get a correct order
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 17:40:28 -03:00
af765d348f Bug 20659: Fix blocking errors display
The include file blocking-errors.inc has been created to by-pass regular
processing and display an error that should block the elements of the
view.

For instance you call a patron's page with invalid borrowernumber => we
do not want the app to crash (500) or the page to display with broken
elements.

It worked well on bug 18403 but it's now broken, a blank page is
displayed instead.
It may be caused by the move of the JS to the bottom of the page.

Test plan:
hit /cgi-bin/koha/members/moremember.pl?borrowernumber=45432
Without this patch a blank page is displayed.
With this patch you see the blocking error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 16:52:07 -03:00
53045699eb Bug 20531: Add diag to help debug next failure
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 12:17:19 -03:00
84f090d195 Bug 19204: Add tests for new days_mode parameter
Sponsored-by: Goethe-Institut

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:52:21 -03:00
59b2f2edb9 Bug 19204: Add a test: holiday is expiration date
Sponsored-by: Goethe-Institut

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:52:21 -03:00
e1676955f7 Bug 19204: Clean the tests a bit to reuse the same pattern
The same pattern is used several times in test:
checkout, checkin, get the debarment, compare the dates and remove the
debarment.
Let's move that to a separate subroutine

Sponsored-by: Goethe-Institut

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:52:21 -03:00
8d3eba6a29 Bug 19204: Make the debarment date calculation depends on finesCalendar
This patchs adds the ability to calculate the end of the suspension date
(debarment date) using the finesCalendar syspref.
Prior to this patch it was never calculating without taking into account
the calendar.

calculated without taking holidays into account.
This was a problem because the restriction could end in the middle of a
period the library is closed.

Test plan:
- Set finescalendar to 'not including days the library is closed'
- Set a circulation condition with no fine/maxfine, but fine days and
max fine days instead
- Check out an item with a due date in the past
- Check the item in and verify the restriction date
- Clean the restriction

- Add holidays to your calendar on the calculated restriction date
- Check the item out again with the same due date in the past
- Check in the item again
- Verify the calculated restriction end date has changed, it's set to the day
after the holiday.

Fines in days restriction calculation is correctly taking calendar
into account.

Sponsored-by: Goethe-Institut

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:52:20 -03:00
1d12311ac1 Bug 20100: DBRev 17.12.00.040
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:52:20 -03:00
532d07c00b Bug 20100: Set ProtectSuperlibrarianPrivileges by default
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:52:20 -03:00
e08a36c25a Bug 20100: Explain why the checkbox is disabled
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:37:31 -03:00
0c45edcebb Bug 20100: (QA follow-up) Pref description and improve code in member-flags
Two points as mentioned on Bugzilla comment29.
[1] Improve pref description. Feedback from comment30 incorporated.
[2] Improve code in member-flags. Check if we change librarian flag first.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the die with "disable_superlibrarian_privs => 0" in member-flags.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:23:53 -03:00
0f1ebf68a6 Bug 20100: (QA follow-up) Change syspref name to full version
As per RM request, changing the shorter name to its full form.
Result of a git grep | sed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No occurrences to be found anymore with git grep -i.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:23:53 -03:00
d31b0bfdfc Bug 20100: (QA follow-up) Use template logic instead of js to disable superlib box
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:23:53 -03:00
ccf62d46d7 Bug 20100: Disallow access to superlibrarian privileges at client side
This last patch activates the check at client side.
If the pref ProtectSuperlibPrivs is enabled, non-superlibs should not be
able to change superlibrarian privileges via the interface.

Test plan:
[1] Enable the pref.
[2] Login as superlib and add/remove superlib privs to a staff user.
[3] Login as another user (no superlib, but having borrowers, permissions
    and staff_access). Verify that you cannot add or remove superlib
    privs.

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

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:23:53 -03:00
f26b68a07f Bug 20100: Disallow access to superlib privileges at server side
Depends on pref ProtectSuperlibPrivs.
If enabled, script member-flags.pl will not allow you to add or remove
superlib privs when you are no superlibrarian.
The follow-up patch will enable the check at client side.

Test plan:
[1] Enable the pref. Do not apply the third patch (client side).
[2] Login as superlib and add/remove superlib privs to a staff user.
[3] Login as another user (no superlib, but having borrowers, permissions
    and staff_access). Verify that you have an internal server error when
    you add or remove superlib privs. The log contains a warning.

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

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:23:53 -03:00
a5f526ae0f Bug 20100: Introduce preference ProtectSuperlibPrivs
This pref allows you to block changes to superlibrarian privileges at
client and server side for non-superlibrarians.
This patch only contains the db rev and the preference description.

Test plan:
Run dbrev or new install. Check pref value.

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

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:23:53 -03:00
Julian Maurice
e05cd22723 Bug 20538: Prevent warnings in xt/author/valid-templates.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-25 10:08:00 -03:00
896644d901 Bug 2696: (QA follow-up) Add more test, move to subtest
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 14:01:48 -03:00
Kyle M Hall
0269200bc6 Bug 2696: (QA follow-up) Fix POD, results sorting, permissions
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 14:01:47 -03:00
Katrin Fischer
2730659213 Bug 2696: (QA follow-up) Several fixes to template variables
- Fix link to patron account in breadcrumbs
- Fix includes for accounttype.inc to display type correctly
  - in Details for fee
  - in Payments list
- Fix use CGI qw ( -utf8 );
- Remove <br> from within a string for better translation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 14:01:47 -03:00
5643de4d79 Bug 2696: Fine payments should show what was paid for
Test Plan:
1) Apply this patch and its' dependencies
2) Create and pay some various fees and fines
3) View the payments for fees, and fees paid by payments by
   using the new 'Details' button available on boraccount.pl

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Running updatedatabase.pl after patch application makes dependencies
happy. Passes QA Tools and works as intended.

Rebased (2017-12-21): Alex Arnaud <alex.arnaud@biblibre.com>

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

Bug 2696: (QA follow-up) - Remove use of GetMember

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 14:01:44 -03:00
50c68497a2 Bug 7910: Add the ability to renew several subscriptions at once
This patch adds a "Renew all selected subscriptions" action link on top
of the table of the "Check expiration" page.

It will allow to auto-renew several subscriptions.

Test plan:
Make sure this new link renew the selected subscriptions as expected.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 12:04:46 -03:00
a2999c047a Bug 20614: Use GET instead of POST for subscription renewing
It will prevent Firefox (and certainly other browsers) to block the form
resubmit:

"To display this page, Firefox must send information that will repeat
any action (such as a search or order confirmation) that was performed
earlier."

Test plan:
Renew a subscription and save

=> You should not longer see the browser warning

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 12:04:46 -03:00
14cc4a3499 Bug 20482: DBRev 17.12.00.039
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 12:04:46 -03:00
3d5271d315 Bug 20482: (QA follow-up) Correct code in atomic update
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 12:04:45 -03:00
Mark Tompsett
caff790fb7 Bug 20482: Correct Terminology codes to Bibliographic ones
"RELATIONSHIP TO ISO 639-2
ISO 639-2 (Codes for the representation of names of
languages-- Part 2: alpha-3 code) was based on the MARC
Code List for Languages and published in 1998. In the 22
cases where the ISO 639-2 list has two alternative codes,
the bibliographic code is the same as the MARC code."
(http://www.loc.gov/marc/languages/introduction.pdf)

This leads me to believe that eus, mri, and sqi are
incorrect. The slk code was corrected on an earlier bug.

TEST PLAN
----------
Apply patch
Do a database upgrade
-- Are eus, mri, and sqi fixed?
reset_all
-- Are eus, mri, and sqi never there in the first place?
koha qa test tools only check perl code.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 12:04:45 -03:00
4e376338f1 Bug 20245: DBRev 17.12.00.038
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 12:04:45 -03:00
Radek Šiman
28020fae2e Bug 20245: Wrong language code for Slovak
This patch updates iso639_2_code value for Slovak language

Test plan:
1) Obtain a biblio record having 'slo' value in its language
   code (marc field 041a)
2) Try to find it through Advanced search + more options
   with language set to Slovak
3) Nothing is found
4) Apply this patch
5) Repeat steps 1 and 2
6) Record is found now

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 11:30:47 -03:00
Katrin Fischer
582d566aac Bug 20616: (QA follow-up) Make alert translatable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 11:30:29 -03:00
e14ee4ad0a Bug 20616: Prevent "edit serials" form submission if no serial is selected
In order to prevent the form to submit and gives an ugly error if no
issues are selected we will make sure at least one is checked otherwise
an alert will be displayed.

Test plan:
- create a subscrpition
- go to the serials collection page
- don't check any checkboxes for serials
- click 'Edit serials'

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 11:30:29 -03:00
fc082c26a1 Bug 20625: Handle non existing of active currency
This patch avoid the explosion in the air when creating a new patron
category and no active currency is defined.

Test plan:
Remove the currencies, create a new patron category
Without this patch applied you will get
  Can't call method "p_sep_by_space" on an undefined value

With this patch the form will be displayed correctly and you will be
able to create the patron category

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 11:29:46 -03:00
564809473d Bug 20625: Add tests
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-24 11:29:46 -03:00
67359a97f4 Bug 20073: Remove perlcritic error
"return" statement with explicit "undef" at line 245, column 5.  See
page 199 of PBP.  (Severity: 5)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 15:12:48 -03:00
a905b11903 Bug 20617: Add 'Search Engine configuration' link to administration menu
This patch adds a link to the Elasticsearch configuration page in the
administration sidebar menu when Elasticsearch is enabled.

This patch also corrects the title of the Elasticsearch page to match
the page heading. "Search engine configuration" instead of
"Elasticsearch mappings."

To test, apply the patch and set the SearchEngine system preference to
"Elasticsearch."

  - View any page in the administration module which shows the
    left-hand sidebar menu. The link to search engine configuration
    should be there.
  - View the search engine configuration page and confirm that the page
    title is correct.
  - Set the SearchEngine system preferenc to "Zebra."
  - The search engine configuration link should no longer appear in the
    administration sidebar menu.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:16 -03:00
0a49e3bf92 Bug 20363: (bug 16966 follow-up) better messages handling
User views the "Your privacy" -page, it shows "No reading history to
delete", even when the user has history.

Test plan:
- Turn OPACPrivacy on
- Go to opac-privacy.pl
- Click the "Immediate deletion button" to delete the reading history
=> If the patron has reading history you must get "Your reading history has been deleted."
Otherwise "No reading history to delete"

Note that this patch reintroduce the "something went wrong" message if
the deletion failed for whatever reason.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:16 -03:00
phette23
2edc7a2240 Bug 13445: Remove URL option from scheduled reports, add Text option
Remove the non-functional 'URL' format
Offer the (functional) CSV & HTML formats

testing plan:
- visit the task scheduler tool at cgi-bin/koha/tools/scheduler.pl
- 'Output format' select list should offer Text (TSV), CSV, & HTML
- scheduled reports for each of the above types should run & send emails correctly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:16 -03:00
5d8a401c85 Bug 20073: DBRev 17.12.00.037
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:16 -03:00
Ere Maijala
f489d2034b Bug 20073: Move Elasticsearch configs to yaml files and improve the default settings.
Improvements:
1) Index settings moved from code to etc/searchengine/elasticsearch/index_config.yaml. An alternative can be specified in koha-conf.xml.
2) Field settings moved from code to etc/searchengine/elasticsearch/field_config.yaml. An alternative can be specified in koha-conf.xml.
3) mappings.yaml has been moved from admin/searchengine/elasticsearch to etc/searchengine/elasticsearch. An alternative can be specified in koha-conf.xml.
4) Default settings have been improved to remove punctuation from phrases used for sorting etc.
5) State variables are used for storing configuration to avoid parsing it multiple times.
6) A possibility to reset the fields too has been added to the reset operation of mappings administration.
7) mappings.yaml has been moved from admin/searchengine/elasticsearch to etc/searchengine/elasticsearch.
8) An stdno field type has been added for standard identifiers.

To test:
1) Run tests in t/Koha/SearchEngine/Elasticsearch.t
2) Clear tables search_fields and search_marc_map
3) Go to admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4) Verify that admin/searchengine/elasticsearch/mappings.pl displays the mappings properly, including ISBN and other standard number fields.
5) Index some records using the -d parameter with misc/search_tools/rebuild_elastic_search.pl to recreate the index
6) Verify that you can find the records
7) Put <elasticsearch_index_mappings>non_existent</elasticsearch_index_mappings> to koha-conf.xml
8) Verify that admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 fails because it can't find non_existent.
9) Copy etc/searchengine/elasticsearch/mappings.yaml to a new location and make elasticsearch_index_mappings setting in koha-conf.xml point to it.
10) Make a change in the new mappings.yaml.
11) Clear table search_fields (mappings reset doesn't do it yet, see bug 20248)
12) Go to admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
13) Verify that the changes you made are now visible in the mappings UI

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:16 -03:00
fb61cade43 Bug 19855: Use patron-title to display patron's info
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:15 -03:00
5c7ff786d5 Bug 19855: Move getalert, addalert and delalert to Koha::Subscription
This patch removes 3 subroutines from C4::Letters:
- getalert
- addalert
- delalert

And add 3 methods to Koha::Subscription:
- subscribers
- add_subscriber
- remove_subscriber

It makes the code cleaner for future cleanup.
TODO - we should remove alert.alertid and alert.type, and rename
alert.externalid with alert.subscriptionid
That way alert will be renamed borrowers_subscriptions (or similar) and
will become a simple join table between borrowers and subscriptions.
We will need to deal with FK that could not be satisfied.
Let's do that after this patch is pushed.

Test plan:
Subscribe and unsubscribe to email notifications sent when a new issues
is available.
Make sure everything works as before and you receive the emails.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:15 -03:00
0bd1f30c8c Bug 19855: Remove $type from the alerts
It looks like this feature has never been finished. It has been
developed with more flexibility in mind, but only 'issue' is used for
this parameter. Apparently it could have been 'virtual', for virtual shelves.

Let remove this parameter and clean the code a bit.
TODO: Remove the DB column

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:15 -03:00
8a81a4adab Bug 19855: Remove C4::Letters::findrelatedto
This subroutine is called only once. It only concat firstname and
surname for subscribers.
It can be easily replaced with Koha::Patron

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-23 14:22:15 -03:00