Bug 19178

Summary: Remove outdated sms/* scripts
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Architecture, internals, and plumbingAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, magnus
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 19178 - Remove outdated sms/* scripts and related files
Bug 19178 - Remove outdated sms/* scripts and related files
Bug 19178 - Remove outdated sms/* scripts and related files
Bug 19178 - Remove outdated sms/* scripts and related files

Description Katrin Fischer 2017-08-26 14:10:40 UTC
Files in the sms directory are outdated and should be removed:

- sms_listen.pl  
- sms_listen_windows_start.pl  
- sms.pl

---------

From the mailing list:

Hi all,

I’m just going through the Koha codebase and making sure everything compiles, and I stumbled upon sms/sms_listen_windows_start.pl:

http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=sms/sms_listen_windows_start.pl;h=a94dc9589d112c2ae70994c61f91570b68375f8f;hb=HEAD

It looks like it’s a script for Windows, which the community doesn’t remotely support, plus the code doesn’t really make any sense.

./sms/sms_listen.pl also looks like garbage to me. So does ./sms/sms.pl.

Everyone reckon it would be safe to remove both of these scripts from Koha? Looks like they’re about 7+ years old…

David Cook
Comment 1 Katrin Fischer 2017-08-26 15:16:46 UTC
Created attachment 66496 [details] [review]
Bug 19178 - Remove outdated sms/* scripts and related files

Those files appear unmaintained and unusable with current
Koha and should be removed.

It appears at some point there was work done on a feature
to send SMS messages to a phone number using a form in
the tools area.
This has never been documented, files and git history
make it look like work remained unfinished.

sms/sms_listen_windows_start.pl
- targetted for Windows, which is not supported by Koha
- 00-strict.t reference removed

sms/sms_listen.pl
- refers to a table sms_messages that doesn't exist
- uses getmember() that doesn't exist

sms/sms.pl
- script calls routines that no longer exist in SMS.pm
  error_codes(), parse_phone(), write_sms()
- template sms-home.tt is not accessible form anywhere
  in the templates

sms-home.tt
- see sms/sms.pl
Comment 2 David Cook 2017-08-27 23:42:44 UTC
Comment on attachment 66496 [details] [review]
Bug 19178 - Remove outdated sms/* scripts and related files

Review of attachment 66496 [details] [review]:
-----------------------------------------------------------------

::: t/db_dependent/00-strict.t
@@ +19,1 @@
>      'sms', 'suggestion', 'svc', 'tags', 'tools', 'virtualshelves' );

I think this 'sms' reference needs to be removed as well?
Comment 3 David Cook 2017-08-27 23:47:00 UTC
I think t/00-testcritic.t might also need its 'sms' reference removed.
Comment 4 Magnus Enger 2017-08-28 06:59:17 UTC
*** Bug 10784 has been marked as a duplicate of this bug. ***
Comment 5 Katrin Fischer 2017-09-05 06:30:19 UTC
Created attachment 66832 [details] [review]
Bug 19178 - Remove outdated sms/* scripts and related files

Those files appear unmaintained and unusable with current
Koha and should be removed.

It appears at some point there was work done on a feature
to send SMS messages to a phone number using a form in
the tools area.
This has never been documented, files and git history
make it look like work remained unfinished.

sms/sms_listen_windows_start.pl
- targetted for Windows, which is not supported by Koha

00-strict.t
- reference to sms removed

sms/sms_listen.pl
- refers to a table sms_messages that doesn't exist
- uses getmember() that doesn't exist

sms/sms.pl
- script calls routines that no longer exist in SMS.pm
  error_codes(), parse_phone(), write_sms()
- template sms-home.tt is not accessible form anywhere
  in the templates

sms-home.tt
- see sms/sms.pl
Comment 6 Katrin Fischer 2017-09-05 06:32:12 UTC
(In reply to David Cook from comment #3)
> I think t/00-testcritic.t might also need its 'sms' reference removed.

Thx David, I've included the additional change in the new patch.
Comment 7 Magnus Enger 2017-09-05 07:34:16 UTC
Created attachment 66833 [details] [review]
Bug 19178 - Remove outdated sms/* scripts and related files

Those files appear unmaintained and unusable with current
Koha and should be removed.

It appears at some point there was work done on a feature
to send SMS messages to a phone number using a form in
the tools area.
This has never been documented, files and git history
make it look like work remained unfinished.

sms/sms_listen_windows_start.pl
- targetted for Windows, which is not supported by Koha

00-strict.t
- reference to sms removed

sms/sms_listen.pl
- refers to a table sms_messages that doesn't exist
- uses getmember() that doesn't exist

sms/sms.pl
- script calls routines that no longer exist in SMS.pm
  error_codes(), parse_phone(), write_sms()
- template sms-home.tt is not accessible form anywhere
  in the templates

sms-home.tt
- see sms/sms.pl

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes sense. 00-strict.t runs OK after applying the patch.
Comment 8 Nick Clemens 2017-10-26 12:12:48 UTC
Created attachment 68596 [details] [review]
Bug 19178 - Remove outdated sms/* scripts and related files

Those files appear unmaintained and unusable with current
Koha and should be removed.

It appears at some point there was work done on a feature
to send SMS messages to a phone number using a form in
the tools area.
This has never been documented, files and git history
make it look like work remained unfinished.

sms/sms_listen_windows_start.pl
- targetted for Windows, which is not supported by Koha

00-strict.t
- reference to sms removed

sms/sms_listen.pl
- refers to a table sms_messages that doesn't exist
- uses getmember() that doesn't exist

sms/sms.pl
- script calls routines that no longer exist in SMS.pm
  error_codes(), parse_phone(), write_sms()
- template sms-home.tt is not accessible form anywhere
  in the templates

sms-home.tt
- see sms/sms.pl

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes sense. 00-strict.t runs OK after applying the patch.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Jonathan Druart 2017-10-27 17:15:48 UTC
Pushed to master for 17.11, thanks to everybody involved!