[Koha-bugs] [Bug 14206] notices using non email templates can't be deleted from the staff client

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 22 00:25:49 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14206

Indranil Das Gupta <indradg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39353|0                           |1
        is obsolete|                            |
  Attachment #39354|0                           |1
        is obsolete|                            |

--- Comment #17 from Indranil Das Gupta <indradg at gmail.com> ---
Created attachment 39376
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39376&action=edit
Bug 14206 Adds delete function for non email templates

C4::Letters::getletter() is called in tools/letter.pl by the function
delete_confirm() to display the selected notice for deletion. Due to
current implementation of getletter(), a notice that does not use
the 'email' template (but uses any/all of the other templates - sms,
print or phone) can't be deleted from the staff client.

This patch adds deletion capability for notices that do not use email
template, but uses any/all of the other templates i.e. sms, print or
phone. This also adds 2 tests to t/db_dependent/Letters.t for testing
both conditions - a) when message_transport_type is specified b) when
it is not.

Test plan
=========

1/ Go to Tools -> Notices & Slips. Add a new notice only for print,
   leave 'Library' and 'Koha module' options as default selections.
   Enter 'KOHA_14206' and 'Koha Test 14206' against Code and Name
   respectively, and 'Test' and 'Test Message' for subject and body.
   Leave the Email, Phone and SMS tabs blank. Save the notice.
2/ On the notices listing page the new notice will be listed. Try to
   delete it. It will load the 'Delete notice' dialog form, but the
   table will not show any data under <th>s - 'Library', 'Module',
   'Code' or 'Name'.
3/ Click the "Yes, delete" button. The page will be submitted and the
   Notices listing reloaded. The print-only KOHA_14206 notice should
   continue to exist. This is *wrong*.
4/ Apply this patch
5/ Reload the listings page and click on the 'Delete' link for Notice
   KOHA_14206. This time, it should show the data under 'Module',
   'Code' or 'Name' at least.
6/ Click on 'Yes, delete'. The page should submit and the listing page
   reload. This time KOHA_14206 will be gone.
7/ Run prove -v t/db_dependent/Letters.t
   All tests should PASS without any error.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list