Hi Monks, this post is in reference to one of my previous posts from last week here. Since I only have a chance to work on this over the weekends, my repsonse is a bit delayed. I am using JIRA::Client to retrieve the issues from a JIRA filter. The issues are returned as a blessed hash resembling the following:

$VAR1=bless( { 'priority' => '2', 'customFieldValues' => [ bless( { 'customfieldID' => 'cus +tomfield_12345', 'values' => ['John Smit +h'], 'key' => undef}, 'RemoteCustomFieldValue +' ), bless( { 'customfieldID' => 'cus +tomfield_abcde', 'values' => ['Californi +a'], 'key' => undef}, 'RemoteCustomFieldValue +' )], 'status' => 'Completed' }, 'RemoteIssue'); $VAR1=bless( { 'priority' => '2', 'customFieldValues' => [ bless( { 'customfieldID' => 'cus +tomfield_12345', 'values' => ['Mary Monr +oe], 'key' => undef}, 'RemoteCustomFieldValue +' ), bless( { 'customfieldID' => 'cus +tomfield_abcde', 'values' => ['New York' +], 'key' => undef}, 'RemoteCustomFieldValue +' )], 'status' => 'In progress' }, 'RemoteIssue');

Each issue is returned as $VAR1 with priority set to '2'. Within each issue, there are custom fields ('RemoteCustomFieldValue') such as the client's name and their state. I know the customfieldIDs that reference each name and state. There is also a non-custom field ('RemoteIssue') such as the issue status. I am not too familiar with iterating through hashes/sub-hashes, but for every $VAR1 in this hash, I need the 'values' of each customfieldId (which I already know). So for example, to get the client's name for each issue, I need to get the value where customfieldId is 'customfield_12345'. Also, for each issue I am trying to get the status, which is a 'RemoteIssue' and not a 'RemoteCustomFieldIssue'. From this hash, I am trying to create a table which looks like this:

Name State Status
John Smith California Completed
Mary Monroe New York In Progress

The code I have so far that generates the blessed hash from above is shown below. Any suggestions would greatly be appreciated. Thanks in advance monks.

#!/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('http://example.com/jira',$user,$pw); $jira->set_filter_iterator('$filterID'); while (my $issue = $jira->next_issue()) { my $value = Dumper($issue); print $value; }

In reply to JIRA::Client returns blessed hash by perlPractioner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.