Thread: [Arsperl-users] Status History
Brought to you by:
jeffmurphy
|
From: Alex A. <ale...@oi...> - 2005-09-15 19:32:11
|
Hi everyone, I'm currently writing a script to take some data from a CSV file and import it into Remedy. I am using ars_MergeEntry to import the data, since I want control over the Submitter and Date Submitted. The problem I have is with the Status History. I want to be able to specify USER and TIME values during the merge. There is a ars_decodeStatusHistory helper function, but I don't see a ars_encodeStatusHistory function. Does anyone have any advice? Alex -- O--------------O--O---------------------------------O | Alex Agle \/ Systems Support Specialist III | O---------------/\ Georgia Institute of Technology | |(404)894-6165 //\\ ITS-Collaborative Applications | | Atlanta, GA //\/\\ alex.agle(@)oit.gatech.edu | O------------O-\/\/-O-------------------------------O |
|
From: Misi M. <mi...@rr...> - 2005-09-16 06:42:42
|
Alex,
It is not hard to create the data manually.
Each entry is separated by Ctrl-C, and the Timestamp/User is separated by
Ctrl-D. Skip the Ctrl-D if a position is empty.
# encodes status history from the same format
# as returned by ars_decodeStatusHistory()
sub encodeStatusHistory
{
my @sh = ();
while(my $hr = shift)
{
push @sh, $hr->{USER} ? "$hr->{TIME}\cD$hr->{USER}" : "";
}
join "\cC", @sh;
}
# example
my @d = ();
$d[0]->{TIME} = "1078759891";
$d[0]->{USER} = "miz";
$d[1]->{TIME} = "1078759899";
$d[1]->{USER} = "louise";
$d[2]->{TIME} = "";
$d[2]->{USER} = "";
$d[3]->{TIME} = "1078759993";
$d[3]->{USER} = "louise";
my $field_value = encodeStatusHistory(@d);
Best Regards - Misi, RRR AB, http://www.rrr.se
> Hi everyone,
>
> I'm currently writing a script to take some data from a CSV file and
> import it into Remedy. I am using ars_MergeEntry to import the data,
> since I want control over the Submitter and Date Submitted.
>
> The problem I have is with the Status History. I want to be able to
> specify USER and TIME values during the merge.
>
> There is a ars_decodeStatusHistory helper function, but I don't see
> a ars_encodeStatusHistory function. Does anyone have any advice?
>
> Alex
> --
> O--------------O--O---------------------------------O
> | Alex Agle \/ Systems Support Specialist III |
> O---------------/\ Georgia Institute of Technology |
> |(404)894-6165 //\\ ITS-Collaborative Applications |
> | Atlanta, GA //\/\\ alex.agle(@)oit.gatech.edu |
> O------------O-\/\/-O-------------------------------O
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
|
|
From: Alex A. <ale...@oi...> - 2005-09-16 17:23:41
|
Thanks for your assistance Misi! I was able to use your subroutine and
example to import records with a 'Status History' that I specify.
Alex
On Fri, Sep 16, 2005 at 08:41:36AM +0200, Misi Mladoniczky wrote:
> Alex,
>
> It is not hard to create the data manually.
>
> Each entry is separated by Ctrl-C, and the Timestamp/User is separated by
> Ctrl-D. Skip the Ctrl-D if a position is empty.
>
> # encodes status history from the same format
> # as returned by ars_decodeStatusHistory()
> sub encodeStatusHistory
> {
> my @sh = ();
> while(my $hr = shift)
> {
> push @sh, $hr->{USER} ? "$hr->{TIME}\cD$hr->{USER}" : "";
> }
> join "\cC", @sh;
> }
>
> # example
> my @d = ();
>
> $d[0]->{TIME} = "1078759891";
> $d[0]->{USER} = "miz";
> $d[1]->{TIME} = "1078759899";
> $d[1]->{USER} = "louise";
> $d[2]->{TIME} = "";
> $d[2]->{USER} = "";
> $d[3]->{TIME} = "1078759993";
> $d[3]->{USER} = "louise";
>
> my $field_value = encodeStatusHistory(@d);
>
> Best Regards - Misi, RRR AB, http://www.rrr.se
>
> > Hi everyone,
> >
> > I'm currently writing a script to take some data from a CSV file and
> > import it into Remedy. I am using ars_MergeEntry to import the data,
> > since I want control over the Submitter and Date Submitted.
> >
> > The problem I have is with the Status History. I want to be able to
> > specify USER and TIME values during the merge.
> >
> > There is a ars_decodeStatusHistory helper function, but I don't see
> > a ars_encodeStatusHistory function. Does anyone have any advice?
> >
> > Alex
> > --
> > O--------------O--O---------------------------------O
> > | Alex Agle \/ Systems Support Specialist III |
> > O---------------/\ Georgia Institute of Technology |
> > |(404)894-6165 //\\ ITS-Collaborative Applications |
> > | Atlanta, GA //\/\\ alex.agle(@)oit.gatech.edu |
> > O------------O-\/\/-O-------------------------------O
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> > Download it for free - -and be entered to win a 42" plasma tv or your very
> > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> > _______________________________________________
> > Arsperl-users mailing list
> > Ars...@ar...
> > https://lists.sourceforge.net/lists/listinfo/arsperl-users
> >
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
--
O--------------O--O---------------------------------O
| Alex Agle \/ Systems Support Specialist III |
O---------------/\ Georgia Institute of Technology |
|(404)894-6165 //\\ ITS-Collaborative Applications |
| Atlanta, GA //\/\\ alex.agle(@)oit.gatech.edu |
O------------O-\/\/-O-------------------------------O
|