Bug 21640 - Itivia outbound script doesn't print to STDOUT
Summary: Itivia outbound script doesn't print to STDOUT
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-24 01:17 UTC by Nick Clemens
Modified: 2020-01-06 20:14 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21640: Enable output to STDOUT for Itiva outbound script (1.81 KB, patch)
2018-10-24 01:19 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 21640: Enable output to STDOUT for Itiva outbound script (1.87 KB, patch)
2018-10-24 23:59 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 21640: Enable output to STDOUT for Itiva outbound script (1.96 KB, patch)
2018-11-02 07:48 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2018-10-24 01:17:24 UTC
This line doesn't seem to work:
open( $OUT, '>', "&STDOUT" ) || die("Couldn't duplicate STDOUT: $!");

To recreate:
 1 - Enable the TalkingTechItivaPhoneNotification
 2 - Copy 'HOLD' notice 'email' transport to the phone section
 3 - Enable EnhancedMessagingPreferences
 4 - Find a patron and enable 'phone' for the 'Hold filled' notice
    Note: You might not be able to do this straightaway, bug 21639
    If the phone box has a '-' and not a checkbox:
    sudo koha-mysql kohadev
    INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
 5 - Place a hold for the patron
 6 - Check it in and confirm the hold to set it waiting
 7 - sudo koha-shell kohadev
 8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
 9 - Note the Output says it will be on STDOUT, but nothing is output
Comment 1 Nick Clemens 2018-10-24 01:19:42 UTC
Created attachment 81043 [details] [review]
Bug 21640: Enable output to STDOUT for Itiva outbound script

To test:
 1 - Enable the TalkingTechItivaPhoneNotification
 2 - Copy 'HOLD' notice 'email' transport to the phone section
 3 - Enable EnhancedMessagingPreferences
 4 - Find a patron and enable 'phone' for the 'Hold filled' notice
    Note: You might not be able to do this straightaway, bug 21639
    If the phone box has a '-' and not a checkbox:
    sudo koha-mysql kohadev
    INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
 5 - Place a hold for the patron
 6 - Check it in and confirm the hold to set it waiting
 7 - sudo koha-shell kohadev
 8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
 9 - Note the Output says it will be on STDOUT, but nothing is output
10 - Apply patch
11 - repeat
12 - Hold info is output to command line
Comment 2 Mark Tompsett 2018-10-24 23:59:42 UTC
Created attachment 81103 [details] [review]
Bug 21640: Enable output to STDOUT for Itiva outbound script

To test:
 1 - Enable the TalkingTechItivaPhoneNotification
 2 - Copy 'HOLD' notice 'email' transport to the phone section
 3 - Enable EnhancedMessagingPreferences
 4 - Find a patron and enable 'phone' for the 'Hold filled' notice
    Note: You might not be able to do this straightaway, bug 21639
    If the phone box has a '-' and not a checkbox:
    sudo koha-mysql kohadev
    INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
 5 - Place a hold for the patron
 6 - Check it in and confirm the hold to set it waiting
 7 - sudo koha-shell kohadev
 8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
 9 - Note the Output says it will be on STDOUT, but nothing is output
10 - Apply patch
11 - repeat
12 - Hold info is output to command line

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Marcel de Rooy 2018-11-02 07:48:19 UTC
Created attachment 81867 [details] [review]
Bug 21640: Enable output to STDOUT for Itiva outbound script

To test:
 1 - Enable the TalkingTechItivaPhoneNotification
 2 - Copy 'HOLD' notice 'email' transport to the phone section
 3 - Enable EnhancedMessagingPreferences
 4 - Find a patron and enable 'phone' for the 'Hold filled' notice
    Note: You might not be able to do this straightaway, bug 21639
    If the phone box has a '-' and not a checkbox:
    sudo koha-mysql kohadev
    INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
 5 - Place a hold for the patron
 6 - Check it in and confirm the hold to set it waiting
 7 - sudo koha-shell kohadev
 8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
 9 - Note the Output says it will be on STDOUT, but nothing is output
10 - Apply patch
11 - repeat
12 - Hold info is output to command line

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2018-11-02 07:52:01 UTC
Symbol table aliasing (not duplicating) STDOUT is not really nice. (We could just print to STDOUT and optionally select a file handle.) No big deal. Removed the parentheses from die on the same line.
Comment 5 Nick Clemens 2018-11-02 10:43:36 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize 2018-11-16 12:09:27 UTC
Pushed to 18.05.x for 18.05.06
Comment 7 Fridolin Somers 2018-11-28 14:10:11 UTC
Pushed to 17.11.x for 17.11.13