Commit graph

21116 commits

Author SHA1 Message Date
Jacek Ablewicz
0519c428ef Bug 11665: An ability to place orders directly from hold ratios list
This enhancement introduces a possibility to place orders
from hold ratios list:

- new option "Add order to basket" -> "From titles w/ highest hold ratios";
(user gets redirected from acqusition to "hold ratios" list in circulation)

- "N to order" in "Items needed" column now becomes a link - when clicked,
user gets redirected back to acquisition, directly to order form for
a choosen title (suggested quantity "N to order" is being preserved)

- in the "Items needed" column, there is an additional indication if
there are any pending (not yet received) orders for a given title

This solution is not exactly ideal.. most important drawback: to use
it librarian needs both acquisition & circulation priviledges; if not
having both - new options will not show / wouldn't be active. But it
requires relatively small amount of changes in the code.

To test:
- apply patch,
- test new functions (try to place some orders using an newly added
option, examine resulting order records etc.)
- check modified hold ratios list for possible problems (for user
with only circulation priviledges, additional information regarding
pending orders should be still visible, but not the link
to order form)
- ensure the two following existing options for adding orders to basket
("From an existing record", "From a new (empty) record") a still working
properly.

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

Minor edit in signoff: Changed "w/" to "with"

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works nicely in my tests, neat new addition.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 19:13:39 +00:00
Galen Charlton
e7c2a2031f Bug 11763: (follow-up) do not display anything in actions column if user cannot manage a budget
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 18:41:33 +00:00
Jonathan Druart
08e594f149 Bug 12019: ensure that it is optional to define an owner if a fund is restricted
Before this patch, the C4::Budgets::CanUserUseBudget assumed that
budget_owner_id was set if a restriction (budget_permission) exists.
see
        && $budget->{budget_owner_id}
        && $budget->{budget_owner_id} != $borrower->{borrowernumber}

Actually a restriction could exists on users and/or library without
being forced to define an owner.

Test plan:
Create a fund A without restriction
Create a fund B restricted to an owner
Create a fund C restricted to a non defined owner
Create a fund D restricted to owner and users (try defining/no
defining an owner and/or users)
Create a fund E restricted to owner, users and library (try
defining/no defined an owner and/or users)

With different logged in users, try to show/edit these differents funds.
The restriction should be correctly applied.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested various permission combinatons, visibility of funds is now ok.
- not superlibrarian, no buget_manage_all,
  no owner, no users, no library, no restrictions on the fund
  = visible
- changed: library = staff patron library,
  restriction = Owner, users and library
  = visible
- changed: library = not staff patron library
  = invisible
- changed: budget_manage_all
  = visible
- changed: owner = staff patron
  no budget_manage_all
  = visible
- changed: no owner, user = staff patron
  = visible
- changed: no user, owner = another user, restriction = owner
  = invisible
- changed: budget_manage_all
  = visible
- changed: no budget_manage_all but superlibrarian
  = visible
...

Passes tests and QA script, also t/Budgets/*

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 19:00:08 +00:00
Jonathan Druart
6b75d95680 Bug 12019: FIX budget_owner_id node is duplicated
The input witht the budget_owner_id id is duplicated.
It breaks the jQuery selector
  $('#budget_owner_id').val('');

Signed-off-by: marjorie barry-vila <marjorie.barry-vila@ccsr.qc.ca>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:58:41 +00:00
e88117b5fa Bug 11763 - Consolidate fund action links into menu
This patch moves the fund Edit/Delete/Add child links on the fund view
into a pop-up menu, allow the table to be more compact and the links to
be more distinct.

To test you must apply the patches on Bug 11578 if necessary.

Apply the patch and view the funds list page (Administration -> Funds).
For each line there should be an "Actions" menu containing the
Edit/Delete/Add cihld links. Each should function correctly. Test with
inactive budgets shown and hidden.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It is unusual to open the action list above the button, but it works.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:33:48 +00:00
Galen Charlton
62d6b44ada Bug 11578: (follow-up) fix JavaScript error
Fix error that can occur when using the DataTable filter
to filter the table down to just one fund.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:32:34 +00:00
Jonathan Druart
bc57a22c46 Bug 11578: (follow-up) fix budgets grouping
If 2 budgets (budget periods) have the same description, the funds will
be grouped into the same "block".
This patch adds a distinction adding the id of the budget next to the
description.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:17:30 +00:00
Jonathan Druart
772c095ea3 Bug 11578: (follow-up) fix funds grouping
The datatables sort options were wrong.
The funds for a budget could be ungrouped.
To reproduce:
- Create 3 budgets A, B, C.
- Create 1 or more funds for A, B, C
- Mark B and C as inactive.
- Create another fund for A
- Go on the fund list view, click on "show inactive funds"
=> The last fund is not grouped without other funds of budget A.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:17:14 +00:00
Jonathan Druart
efdde38768 Bug 11578: (follow-up) fix show inactive link
Before this patch, the inactive funds were displayed by default.
The active funds should be displayed by default.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:16:29 +00:00
Jonathan Druart
4de746a65a Bug 11578: QA follow-up
This patch removes the error raised by tt_valid
 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
   FAIL   tt_valid
                lines 310

Actually, it fails because translate script does not match strings in
attribute value. In this case, we don't want to translate. This fix is
not necessary.

This patch also adds the licence for the new jQuery treetable plugin.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:16:11 +00:00
Jonathan Druart
c0569f0b1e Bug 11578: (follow-up) hide filters if a budget (budgetperiod) is chosen
If a budget_period_id is given, the filters should not be displayed.
Moreover, it does not make sense to display the links for
displaying/hiding inactive budgets in this case.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:15:28 +00:00
Jonathan Druart
30e94f0c53 Bug 11578: (follow-up) align budget names
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:15:05 +00:00
Jonathan Druart
bd5d327318 Bug 11578: (follow-up) hide inactive budgets by default
This patch hides inactive budgets by default.
They can be shown/hidden using 2 new links "Hide/Show inactive budgets".

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:14:32 +00:00
Jonathan Druart
4ba1f40f30 Bug 11578: (follow-up) add some CSS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:13:54 +00:00
Jonathan Druart
56f3c32fe3 Bug 11578: Improve the funds list view
The current funds list view does not allow to search in the table and
the ergonomics of the page is quite bad.

This patch add the datatables plugin combined to the treetable plugin in
order to offer a better view of the budgets/funds.

Test plan:
- Verify there is no regression on this page: try to add/modify/delete a
fund and a budget.
- Verify the funds hierarchy is correctly displayed.
- Filter the funds using the branch and the budget filters.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:09:59 +00:00
Jonathan Druart
86be6d7550 Bug 11578: Upgrade the treetable jquery plugin
This patch upgrade the treetable jquery plugin to the last version
(3.1.0).
It is only used on the funds list view.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-03 18:09:28 +00:00
c4f1765013 Bug 11369: (follow-up) generate searchid in browser.js
The search browser feature uses nearly only the browser.js file.
That is why I propose to move the searchid generation from search.pl
to browser.js.
We then use Date.getTime() to use current timestamp as searchid,
prefixed by 'scs_' like before.

Test by using test plan of main patch :
Too many search cursor cookies overflow HTTP-header size, when
making multiple searches in the staff client

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Tested the browse functionality in staff by using the different
options (back to results, next, previous, etc) and the batch
modifications for items. An old cookie can cause a Javascript error,
but after restarting the browser/deleting cookies it all works
correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 23:19:59 +00:00
98edbf00cc Bug 11369: (follow-up) Correct usage of me.searchid in browser.js
In browser.js, at creation of browser, the searchid is transmited to
JS object into me.searchid.
To be consistant, me.searchid should always be use, never searchid alone.
In browseRecords function, setting searchid as parameter is useless
because it is defined in me.searchid.

Test with test plan of Bug 10404

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 23:18:55 +00:00
Olli-Antti Kivilahti
0cada7a323 Bug 11369: fix issue that can cause staff client searches to stop working
This patch fixes an issue where too many search cursor cookies overflow
the HTTP-header size after making multiple searches in the staff client.

To replicate this issue, make multiple searches in catalogue/search.pl.
50+ Should be enough to cause the HTTP-request header to overgrow.
One can verify this issue by observing the searchCookie growth in
browser's stored cookies.

-------------
- TEST PLAN -
-------------

Keep making searches.
One should never have more than 10 searchCookies. Browser might display
only 9, because for some reason the newest js-generated cookie is not
included in Firefox's cookies listing.

------------
- DRAWBACK -
------------

Removing these cookies disables the search cursor for traversing search
results (next/previous) for the removed cookie. This maybe be problematic
in some cases,
(for ex when multiple search tabs need to be open and they need to be
 traversed)
One easy solution is to grow the amount of stored searchCookies from 10 to
20, but 10 is chosen so there will be plenty of room for other cookies as
well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 23:17:04 +00:00
Olli-Antti Kivilahti
35bec75d66 Bug 11369 - Updating the jquery.cookie.js-plugin
The current jquery.cookie-plugin crashes when trying to fetch
all cookies using $.cookie();
Downloaded the newest plugin version and minified it.
Now works as intended.

Encountered an issue with the plugin now returning null when
no cookies are found, and applied a fix in browser.js.

-------------
- Test plan -
-------------
Plugin is used in browser.js and batchMod.js so testing both

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 23:15:55 +00:00
Galen Charlton
81064f4e2a Bug 10694: (follow-up) display the note about restricted patrons consistently
This patch ensures that the note displayed when checking in a loan
to a restricted patron (and setting the return date) is displayed
whether or not the circulation staffer has chosen the make the return
date override sticky.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 22:49:23 +00:00
Galen Charlton
9ab9686250 Bug 10694: (follow-up) fix problems with the new Borrowers plugin
TT plugins should *not* be duplicating business logic found
in other modules.  This patch replaces the copy-and-paste of the
old IsDebarred logic with a call to the appropriate routine and
updates the POD.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 22:49:23 +00:00
Galen Charlton
80c68171bd Bug 10694: (follow-up) remove truncate table from test case
Doing a truncate of a table in MySQL causes an implicit commit.
Consequently, they should not be used in DB-dependent test cases,
as they will cause the changes to NOT be rolled back.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 22:00:45 +00:00
Galen Charlton
b3f5867bb7 Bug 10694: DBrev 3.15.00.042
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:48:14 +00:00
0b2e9dbf62 Bug 10694: (follow-up) add unit tests, improve AddReturn POD
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:46:41 +00:00
892111c84d Bug 10694: (follow-up) fix various issues
- new TT plugin for Borrowers, that at present supplies
  a method for determining if the patron is restricted
- setting the default value of SpecifyReturnDate to false
  during upgrade to avoid an unwelcome surprise
- validate the return date on the client side before
  allowing the form to be submitted.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:44:46 +00:00
1b618cac3d Bug 10694 - Allow arbitrary backdating of returns
Sometimes libraries need to backdate returns further back in time than
Koha's dropbox mode will allow. The returns backdating will check in an
item as if it had been returned on the specified date, and will reduce
any fine accordingly.

This feature is activated by a new system preference, SpecifyReturnDate.

Test Plan:
1) Apply this patch
2) Check out an item, and backdate the due date by 1 month or so
   * This issue needs to generate a fine
3) Run fines.pl to generate the fine
4) Browse to returns.pl
5) Specify a return date of the day after the specified due date
6) Check the borrowers issue history, you should see the backdated
   return date, rather than today's date
7) Check the fine, it should be reduced to a fine for a single day
   overdue, rather than the previous larger fine.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Barbara Knibbs <BKnibbs@farmingtonlibraries.org>
Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:42:39 +00:00
Galen Charlton
e50bccb9fb Bug 9016: (follow-up) standardize case of message transport type columns
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:17:49 +00:00
Galen Charlton
f3681addc3 Bug 9016: (follow-up) treat missing transports for overdue notices as warnings
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:11:30 +00:00
Galen Charlton
b967a82f1c Bug 9016: (follow-up) treat missing transports for predue and item due notices as warnings, not fatal errors
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 21:01:45 +00:00
Galen Charlton
e25c42715a Bug 9016: (follow-up) treat missing transports for hold available notices as warnings, not fatal errors
This patch fixes a situation where a patron that has preferences
set for transport of a notice via a method that is not supported
for that notice type can result in a failure.  Rather than
make it a fatal error during checkin, simply log a warning and skip.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:54:55 +00:00
Galen Charlton
3fabce47ae Bug 9016: (follow-up) move insertAtCaret plugin out of language-specific directory
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:21 +00:00
Jonathan Druart
7ca4f590ac Bug 11696: ensure that print overdue notices use the print template
This reordering avoids the case where a print notice is sent with an
email or sms template is no email or SMS is defined.

Test plan:
Check print, sms and email for an overdue rule
Don't define an email address and generate an overdue for a user
Define 3 templates for the notice used
Launch the cronjob script and verify the print notice is generated using
the print template.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:21 +00:00
Galen Charlton
7f1bb7c6b2 Bug 3.15.00.041: DBrev 11867
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Jonathan Druart
b359310163 Bug 11867: (follow-up) Change the sql query in order to win beauty prices
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Jonathan Druart
6a06fc9b6c Bug 11867: MTT: Manage *_PHONE notices
The *_PHONE notices (HOLD_PHONE, PREDUE_PHONE and OVERDUE_PHONE) should
be "merged" into the main code (i.e. HOLD, PREDUE and OVERDUE).

Test plan:
1/ Make sure you have HOLD_PHONE, PREDUE_PHONE and OVERDUE_PHONE notices
2/ Execute the update DB entry
3/ Verify the 3 notices have been merged into "phone" template of the
HOLD, PREDUE and OVERDUE notices
4/ Verify there is no regression in the Talking Tech feature (how?)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors

Verified that notices are merged
TalkingTech_itiva_outbound.pl runs without problem... but can't produce
any output, may be not correctly configured (my setup), no warnings
nor log messages

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Olli-Antti Kivilahti
08ed927dc1 Bug 10833: (follow-up) add message transport type to a warning message
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Jonathan Druart
76dde86fce Bug 10833: Multi transport types for advanced notices
Test plan:
- Choose 2 patrons P1 and P2
- Edit "Patron messaging preferences" and
check SMS + email with 2 days in advance for P1
check email with 5 days in advance for P2
- defined a message for the letter code PREDUE for sms and email
  (tools/letters.pl).
- select 2 barcodes (B1, B2).
    * checkout B1 to P1 with a due date = NOW - 2 days
    * checkout B2 to P2 with a due date = NOW - 5 days
- into the mysql cli, note the value of unsent message:
  select count(*) from message_queue where status != "send";
- launch the cronjob:
  perl misc/cronjobs/advance_notices.pl -c
- retry the previous sql query, you should have X + 3 unsent messages
  (depending of current checkouts in your DB!).
- view all unsent message:
  select borrowernumber, letter_code, message_transport_type, content
  from message_queue where status != "send";
  You should see:
    2 messages for P1, 1 for sms, 1 for email and the letter code PREDUE
    1 message for P2, email and the letter code PREDUE

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Jonathan Druart
ca052b2558 Bug 10832: (follow-up) add the transport type in the warning message
If no template is defined for a letter and the needed MTT, we
should display the MTT.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Jonathan Druart
04ac36aa7c Bug 10832: (follow-up) fix case where some print overdue notices were not being sent
If overdues should be sent to some patron (on the same branch), only the
first one was notified.

This patch fixes this issue.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Jonathan Druart
9575986ed1 Bug 10832: Multi transport types for overdue notices
Test plan:
- define some complex overdue rules (tools/overduerules.pl).
For example:
First overdue from 2 to 5 days by sms and email with letter code L1
Second overdue from 5 to 15 days by email with letter code L2
Third overdue from 15 days by print with letter code L3
- define a message for each transport type selected (tools/letters.pl).
- select 3 patrons (P1, P2, P3) and 3 barcodes (B1, B2, B3).
    * checkout B1 to P1 with a due date = NOW + 3 days
    * checkout B2 to P2 with a due date = NOW + 10 days
    * checkout B3 to P3 with a due date = NOW + 20 days
- into the mysql cli, note the value of unsent message:
  select count(*) from message_queue where status != "send";
- launch the cronjob:
  perl misc/cronjobs/overdue_notices.pl
- retry the previous sql query, you should have X + 4 unsent messages
  (depending of current checkouts in your DB!).
- view all unsent message:
  select borrowernumber, letter_code, message_transport_type, content
  from message_queue where status != "send";
  You should see:
    2 messages for P1, 1 for sms, 1 for email and the letter code L1
    1 message for P2, 1 for email and the letter code L2
    1 message for P3, 1 for print and the letter code L3

- Specific case: If a user don't have a smsalertnumber and a sms is
  required or if a user don't have an email defined and an email is
  required, a print notice is generated.
  A print notice is generated only 1 time per borrower and per level.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:20 +00:00
Olli-Antti Kivilahti
9270f06463 Bug 11561: restore previous behavior of generation of hold print notices
This patch prevents duplicate hold available print notices from being
sent and enforces making a print notice if no other transports can be
used.

-------------------------
- REPLICATING THE ISSUE -
-------------------------

1. Set a Patrons "Hold filled"-messaging preference to SMS + Email
2. Remove the SMS number (sms notification number) and all email
   addresses.
3. Make a reservation for this Patron.
4. Check-in the reserved Item.
5. message_queue-table has two generated print notices for the
   Hold_filled event.
   One for both failed message transport types, email and sms.

1. Set a Patrons "Hold filled"-messaging preference to empty, remove all
   checks from boxes.
2. Make a reservation for this Patron
3. Check-in the reserved Item.
4. message_queue-table has no message for the Hold-filled event. This is
   problematic because a Patron should get some kind of a notification
   for a filled Hold.

-----------------------------
- AFTER APPLYING THIS PATCH -
-----------------------------

If all message transport types for "Hold filled" fail, a print notice is
queued in the message_queue table. Only one print message is queued even
if many transports attempts fail.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Galen Charlton
6b1c114cc6 Bug 10845: (follow-up) update how a test case counts print hold available notices
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Galen Charlton
c4abafce33 Bug 10845: DBrev 3.15.00.040
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Jonathan Druart
abb3647d03 Bug 10845: (follow-up) fix message_transport_type parameter for Itiva cronjob
The message_transport_type param should passed to GetPreparedLetter, not
part of the "tables" parameter.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Jonathan Druart
7e878d42a0 Bug 10845: (follow-up) add the MTT in the die message
If no template is defined for the HOLD letter and the needed MTT, we
should display the MTT.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Jonathan Druart
777814a260 Bug 10845: Multi transport types for holds
The HOLD_PRINT and HOLD_PHONE notices become useless.
This patch modifies existing notices in order to group them into the
main notice type 'HOLD', with any pre-existing print and phone
templates in the appropriate places.

Test plan:
- Apply the patch and execute the update database entry.
- Verify that your previous HOLD_PHONE and HOLD_PRINT are displayed
  when editing the HOLD notice (under phone and print).
- Choose a patron and check SMS, email, phone for "Hold filled"
  (on the patron messaging preferences).
- Place a hold.
- Check the item in and confirm the hold.
- If the patron has an email *and* a SMS number, 2 new messages are put
  into the  message_queue table: 1 sms and 1 email.
  If the patron does not have 1 of them, there are 2 new messages: 1
  sms/email and 1 print.
  If the user has neither of them, there is 1 new message: 1 print.
- The generated messages should correspond with the notices defined,
  depending the message transport type.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Just noting that if email and SMS are disabled in the msg prefs, the user
will not have a print message.
And if the SMS driver fails, the record status in message_queue is 'failed',
but staff may not be aware of that.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Jonathan Druart
90c9510e0a Bug 10845: Remove the notice code HOLD_PRINT in seed data
This patch converts the HOLD_PRINT notice to a HOLD notice
with a message transport type of 'print'.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Galen Charlton
3c581bad5a Bug 11868: (follow-up) correct case of "SMS"
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00
Jonathan Druart
ca871ea334 Bug 11868: MTT: disable SMS and phone if not in use
On both pages "Notices and slips" and "Overdue rules", it would be great
to disable SMS and phone if there are not in use.  This patch implements
this.

Test plan:
1/ Edit a notice
2/ Enable/disable the SMSSendDriver pref and verify the sms block is
enabled/disabled.
3/ Enable/disable the TalkingTechItivaPhoneNotification pref and verify
the phone block is enabled/disabled.

4/ Go on tools/overdues.pl
5/ Enable/disable the SMSSendDriver pref and verify the sms checkboxes
are enabled/disabled.
6/ Enable/disable the TalkingTechItivaPhoneNotification pref and verify
the phone checkboxes are enabled/disabled.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>

---------------
Testing report:
---------------
Followed the test plan. Reviewed the code modifications.
Feature works as expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-02 20:29:19 +00:00