| #------------------------------------------------------------------------ |
| # Compiled template generated by the Template Toolkit version 2.15 |
| #------------------------------------------------------------------------ |
| |
| Template::Document->new({ |
| METADATA => { |
| 'modtime' => '1138010588', |
| 'name' => 'reports/duplicates-table.html.tmpl', |
| }, |
| BLOCK => sub { |
| my $context = shift || die "template sub called without context\n"; |
| my $stash = $context->stash; |
| my $output = ''; |
| my $error; |
| |
| eval { BLOCK: { |
| $output .= "\n"; |
| $output .= "\n\n"; |
| $output .= "\n"; |
| #line 45 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $context->process('global/variables.none.tmpl'); |
| $output .= "\n\n"; |
| $output .= "\n"; |
| #line 149 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get(['bug_ids', 0, 'size', 0]) > 0) { |
| $output .= "\n <table border>\n <tr bgcolor=\"#CCCCCC\">"; |
| #line 89 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FOREACH |
| do { |
| my ($value, $error, $oldloop); |
| my $list = [ { 'name' => 'id', 'description' => ($stash->get(['terms', 0, 'Bug', 0]) . " #") }, { 'name' => 'count', 'description' => 'Dupe<br>Count' }, { 'name' => 'delta', 'description' => ("Change in last<br>" . $stash->get('changedsince') . " day(s)") }, { 'name' => 'component', 'description' => 'Component' }, { 'name' => 'bug_severity', 'description' => 'Severity' }, { 'name' => 'op_sys', 'description' => 'Op Sys' }, { 'name' => 'target_milestone', 'description' => 'Target<br>Milestone' }, { 'name' => 'short_desc', 'description' => 'Summary' } ]; |
| |
| unless (UNIVERSAL::isa($list, 'Template::Iterator')) { |
| $list = Template::Config->iterator($list) |
| || die $Template::Config::ERROR, "\n"; |
| } |
| |
| ($value, $error) = $list->get_first(); |
| eval { $oldloop = $stash->get('loop') }; |
| $stash->set('loop', $list); |
| eval { |
| LOOP: while (! $error) { |
| $stash->{'column'} = $value; |
| $output .= "\n\n "; |
| #line 65 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get(['column', 0, 'name', 0]) eq 'delta' && ! $stash->get('dobefore')) { |
| ($value, $error) = $list->get_next(); |
| next LOOP; |
| |
| } |
| |
| $output .= "\n\n <td>\n <center>\n <b>"; |
| #line 70 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('bug_ids_string', $stash->get(['bug_ids', 0, 'join', [ ',' ]])); |
| $output .= "\n <a href=\"duplicates.cgi?sortby="; |
| #line 71 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['column', 0, 'name', 0]); |
| #line 77 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('sortby') eq $stash->get(['column', 0, 'name', 0])) { |
| #line 73 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if (! $stash->get('reverse')) { |
| $output .= '&reverse=1'; |
| } |
| |
| } |
| else { |
| |
| #line 76 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get(['column', 0, 'name', 0, 'match', [ 'delta|count' ]])) { |
| $output .= '&reverse=1'; |
| } |
| |
| } |
| |
| #line 0 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('maxrows')) { |
| $output .= ("&maxrows=" . $stash->get('maxrows')); |
| } |
| |
| #line 0 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('changedsince')) { |
| $output .= ("&changedsince=" . $stash->get('changedsince')); |
| } |
| |
| #line 80 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('openonly')) { |
| $output .= '&openonly=1'; |
| } |
| |
| #line 81 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FOREACH |
| do { |
| my ($value, $error, $oldloop); |
| my $list = $stash->get('query_products'); |
| |
| unless (UNIVERSAL::isa($list, 'Template::Iterator')) { |
| $list = Template::Config->iterator($list) |
| || die $Template::Config::ERROR, "\n"; |
| } |
| |
| ($value, $error) = $list->get_first(); |
| eval { $oldloop = $stash->get('loop') }; |
| $stash->set('loop', $list); |
| eval { |
| LOOP: while (! $error) { |
| $stash->{'p'} = $value; |
| $output .= "&product="; |
| #line 81 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get('p'); |
| |
| &$filter($output); |
| }; |
| ; |
| ($value, $error) = $list->get_next(); |
| } |
| }; |
| $stash->set('loop', $oldloop); |
| die $@ if $@; |
| $error = 0 if $error && $error eq Template::Constants::STATUS_DONE; |
| die $error if $error; |
| }; |
| |
| #line 82 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('format')) { |
| $output .= "&format="; |
| #line 82 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get('format'); |
| |
| &$filter($output); |
| }; |
| |
| } |
| |
| #line 0 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('sortvisible')) { |
| $output .= ("&bug_id=" . $stash->get('bug_ids_string') . "&sortvisible=1"); |
| } |
| |
| $output .= "\">"; |
| #line 85 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['column', 0, 'description', 0]); |
| $output .= "</a>\n </b>\n </center>\n </td>";; |
| ($value, $error) = $list->get_next(); |
| } |
| }; |
| $stash->set('loop', $oldloop); |
| die $@ if $@; |
| $error = 0 if $error && $error eq Template::Constants::STATUS_DONE; |
| die $error if $error; |
| }; |
| |
| $output .= "\n </tr>\n"; |
| #line 94 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if (! $stash->get('sortby')) { |
| #line 93 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('sortby', 'count'); |
| #line 93 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('reverse', '1'); |
| } |
| |
| $output .= "\n"; |
| #line 101 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('sortby') eq 'id' || $stash->get('sortby') eq 'count' || $stash->get('sortby') eq 'delta') { |
| $output .= "\n "; |
| #line 98 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('sortedbugs', $stash->get(['bugs', 0, 'nsort', [ $stash->get('sortby') ]])); |
| } |
| else { |
| #line 100 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('sortedbugs', $stash->get(['bugs', 0, 'sort', [ $stash->get('sortby') ]])); |
| } |
| |
| $output .= "\n"; |
| #line 107 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('reverse')) { |
| #line 104 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('bugs', $stash->get(['sortedbugs', 0, 'reverse', 0])); |
| } |
| else { |
| #line 106 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('bugs', $stash->get('sortedbugs')); |
| } |
| |
| $output .= "\n\n "; |
| $output .= "\n\n "; |
| #line 114 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('vis_bug_ids', [ ]); |
| $output .= "\n"; |
| #line 144 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FOREACH |
| do { |
| my ($value, $error, $oldloop); |
| my $list = $stash->get('bugs'); |
| |
| unless (UNIVERSAL::isa($list, 'Template::Iterator')) { |
| $list = Template::Config->iterator($list) |
| || die $Template::Config::ERROR, "\n"; |
| } |
| |
| ($value, $error) = $list->get_first(); |
| eval { $oldloop = $stash->get('loop') }; |
| $stash->set('loop', $list); |
| eval { |
| LOOP: while (! $error) { |
| $stash->{'bug'} = $value; |
| #line 117 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get(['loop', 0, 'index', 0]) >= $stash->get('maxrows')) { |
| last LOOP; |
| } |
| |
| #line 118 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['vis_bug_ids', 0, 'push', [ $stash->get(['bug', 0, 'id', 0]) ]]); |
| $output .= "\n\n <tr "; |
| #line 120 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get(['bug', 0, 'resolution', 0]) ne '') { |
| $output .= 'class=\'resolved\''; |
| } |
| |
| $output .= ">\n <td>\n <center>"; |
| #line 123 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $stash->set('isclosed', $stash->get(['bug', 0, 'resolution', 0]) ne ''); |
| $output .= "\n <a href=\"show_bug.cgi?id="; |
| #line 124 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['bug', 0, 'id', 0]); |
| $output .= "\">"; |
| #line 124 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('closed', [ $stash->get('isclosed') ]) |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, 'id', 0]); |
| |
| &$filter($output); |
| }; |
| |
| $output .= "</a>\n </center>\n </td>\n\n <td>\n <center>"; |
| #line 130 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['bug', 0, 'count', 0]); |
| $output .= "\n </center>\n </td>\n"; |
| #line 136 "template/en/custom/reports/duplicates-table.html.tmpl" |
| if ($stash->get('dobefore')) { |
| $output .= "\n <td><center>"; |
| #line 135 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['bug', 0, 'delta', 0]); |
| $output .= "</center></td>"; |
| } |
| |
| $output .= "\n\n <td>"; |
| #line 138 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, 'component', 0]); |
| |
| &$filter($output); |
| }; |
| |
| $output .= "</td>\n <td><center>"; |
| #line 139 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, 'bug_severity', 0]); |
| |
| &$filter($output); |
| }; |
| |
| $output .= "</center></td>\n <td><center>"; |
| #line 140 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, 'op_sys', 0]); |
| |
| &$filter($output); |
| }; |
| |
| $output .= "</center></td>\n <td><center>"; |
| #line 141 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, 'target_milestone', 0]); |
| |
| &$filter($output); |
| }; |
| |
| $output .= "</center></td>\n <td>"; |
| #line 142 "template/en/custom/reports/duplicates-table.html.tmpl" |
| |
| # FILTER |
| $output .= do { |
| my $output = ''; |
| my $filter = $context->filter('html') |
| || $context->throw($context->error); |
| |
| $output .= $stash->get(['bug', 0, 'short_desc', 0]); |
| |
| &$filter($output); |
| }; |
| |
| $output .= "</td>\n </tr>";; |
| ($value, $error) = $list->get_next(); |
| } |
| }; |
| $stash->set('loop', $oldloop); |
| die $@ if $@; |
| $error = 0 if $error && $error eq Template::Constants::STATUS_DONE; |
| die $error if $error; |
| }; |
| |
| $output .= "\n\n </table>"; |
| } |
| else { |
| $output .= "\n <h3>No duplicate "; |
| #line 148 "template/en/custom/reports/duplicates-table.html.tmpl" |
| $output .= $stash->get(['terms', 0, 'bugs', 0]); |
| $output .= " found.</h3>"; |
| } |
| |
| $output .= "\n"; |
| } }; |
| if ($@) { |
| $error = $context->catch($@, \$output); |
| die $error unless $error->type eq 'return'; |
| } |
| |
| return $output; |
| }, |
| DEFBLOCKS => { |
| |
| }, |
| }); |