Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: JIRA::Client returning "RemoteIssue=HASH(******)"

by keszler (Priest)
on Dec 03, 2011 at 15:46 UTC ( #941544=note: print w/ replies, xml ) Need Help??

in reply to JIRA::Client returning "RemoteIssue=HASH(******)"

Try it this way:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use LWP::UserAgent; use JIRA::Client; use SOAP::Lite; my $user = 'username'; my $pw = 'password'; my $filterID = '12345'; my $jira=JIRA::Client->new('',$user,$pw); $jira->set_filter_iterator('$filterID'); while (my $issue = $jira->next_issue()) { print Dumper($issue); }
If that doesn't clarify things for you, reply back here with the result.

Comment on Re: JIRA::Client returning "RemoteIssue=HASH(******)"
Download Code
Replies are listed 'Best First'.
Re^2: JIRA::Client returning "RemoteIssue=HASH(******)"
by perlPractioner (Novice) on Dec 03, 2011 at 16:33 UTC

    Worked like a charm! Much appreciated! I received back the following:

    $VAR1=bless( { 'priority' => '2', 'customFieldValues' => [ bless( { 'customfieldID' => 'cus +tomfield_12345', 'values' => ['John Smit +h'], 'key' => undef}, 'RemoteCustomFieldValue +' ), bless ...

    It seems as if I will have to identify the customfieldIDs that I'm interested in and get the corresponding values. Do you know of another way to accomplish this other than parsing the output for the customfieldID then obtaining the hash tag value for "values"? Thanks again.

      Each $issue returned by $jira->next_issue is a blessed object with its own methods for getting and setting information. The JIRA::Client documentation doesn't have a lot of detail, and the source isn't much better. Try:

      while (my $issue = $jira->next_issue()) { #print Dumper($issue); my $custom_fields_ref = $issue->get_custom_fields(); for my $cf_name (keys %{$custom_fields_ref}) { print ">>$cf_name<< = >>>$custom_fields_ref->{$cf_name}<<<\n"; } print 'Priority: ', $issue->priority, $/; # do as above for other fields at the same level as 'priority' => 2 }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://941544]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-10-08 21:11 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (228 votes), past polls