From eff30d15df8108d41c9d5c95362911ebcceec740 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 17 Feb 2012 19:29:26 +0000 Subject: fixed pv add note (with type/status) diff --git a/rhimport-dn b/rhimport-dn index fa7607f..f9d2613 100755 --- a/rhimport-dn +++ b/rhimport-dn @@ -132,7 +132,7 @@ for my $entry ($headlines_feed->entries) { next if($y ne $1); print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2])); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2]), "1"); print "\n"; } } diff --git a/rhimport-ra b/rhimport-ra index 0c0f49f..f8a2ca3 100755 --- a/rhimport-ra +++ b/rhimport-ra @@ -103,7 +103,7 @@ for my $entry ($feed->entries) { print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), 'n'); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1"); print "\n"; last; diff --git a/rhimport-rs b/rhimport-rs index 99d2ce3..d501cf9 100755 --- a/rhimport-rs +++ b/rhimport-rs @@ -122,9 +122,9 @@ while(1) { print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), 1); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1"); print "\n"; - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), 2); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2"); print "\n"; last; diff --git a/rhimport-wl b/rhimport-wl index 9844506..8769e81 100755 --- a/rhimport-wl +++ b/rhimport-wl @@ -114,7 +114,7 @@ for my $entry ($feed->entries) { print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; - rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2])); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1"); print "\n"; } } diff --git a/rhimport.pm b/rhimport.pm index e0bc11d..1c7efb4 100644 --- a/rhimport.pm +++ b/rhimport.pm @@ -330,11 +330,6 @@ sub delete_file sub pv_add_note { my ( $title, $text, $id, $date, $type ) = @_; - $type = 1 if undef($type); - # 0 -> Cancelation - # 1 -> Recommandation - # 2 -> Repitition - my @script = ('/usr/bin/ssh', 'root@intranet', 'addnote', $id, $date, $type); my ($reader, $writer, $error ) = ( new IO::Handle, new IO::Handle, new IO::Handle ); -- cgit v0.10.2