Hi,
I'm writing a Perl module to access Trac via XML::RPC (see
http://search.cpan.org/~daan/XML-RPC-0.8/lib/XML/RPC.pm). Works good
so far, can create tickets,
# make the XML::RPC connection to the Trac and return a Ticket-object
my $xmlrpc = XML::RPC->new('https://user:[EMAIL PROTECTED]/trac/proj/
xmlrpc');
my $result = $xmlrpc->call('ticket.create', "some summary", "some
description");
even attachments
my $result = $xmlrpc->call('ticket.putAttachment',
$ticketid,
'Filename',
'Some Description',
sub { +{base64 => encode_base64('data, data
- it is always the data')} },
);
But there is a problem with the attributes struct. I tried to create a
ticket with attributes like this:
my $result = $ticket->create
('ticket.create', "some summary",
"some description",
sub { {struct => {owner => 'Trac Servant',
estimatedhours => '5',
}}},
);
The ticket is created, but the attributes are missing. The XML sent to
trac does contain
<param>
<value>
<struct>
<estimatedhours>5</estimatedhours>
<owner>Trac Servant</owner>
</struct>
</value>
</param>
Nevertheless, the created ticket does indicate, these have been
ignored:
...
'owner' => '',
...
'estimatedhours' => '0',
...
Any hints for solving this would be appreciated.
Thanks,
Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---