From 3ece5afe868e75d5eaaee3ae391f955e29d76e1d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 7 Jun 2018 15:27:55 -0700 Subject: [PATCH] update short bug status tx with new class setup --- templates/en_US/cgi/short_bug_status.tx | 167 ++++++++++++------------ 1 file changed, 85 insertions(+), 82 deletions(-) diff --git a/templates/en_US/cgi/short_bug_status.tx b/templates/en_US/cgi/short_bug_status.tx index ccca13a..2dd6e9e 100644 --- a/templates/en_US/cgi/short_bug_status.tx +++ b/templates/en_US/cgi/short_bug_status.tx @@ -1,118 +1,121 @@ +<:- macro bug_url_subject->($bug) {-:> +># + <:- $bug.bug :>: <: $bug.subject :> +<:- } -:>
- >#<: $status.bug_num :> - [ - <:- my $short_sev = substr($status.severity,0,1) -:> - <:- if isstrongseverity($status.severity) { -:><: uc($short_sev) :> - <:- } else { -:> - <:- $short_sev } -:>| - <:- for $status.tags_array -> $tag { -:> - <:- if defined($config.tags_single_letter[$tag]) { -:> - <: $config.tags_single_letter[$tag] :><:- } -:> - : } - <:- if $status.tags_array.size() == 0 { -:>  <: } :>| - <:- if $status.mergedwith_array.size() > 0 { -:> - = - <:- } -:> - <:- if $status.fixed_versions.size() > 0 { -:> - ☺ - <:- } -:> - <:- if $status.fixed_versions.size() > 0 { -:> - ☺ - <:- } -:> - <:- if $status.blockedby_array.size() > 0 { -:> - ♙ - <:- } -:> - <:- if $status.blocks_array.size() > 0 { -:> - ♔ - <:- } -:> - <:- if length($status.forwarded) { -:> - ↝ - <:- } -:> - <:- if $status.archived { -:> - ♲ - <:- } -:> - <:- if length($status.affects) { -:> - ☣ - <:- } -:>] - [<: raw(package_links(package=>$status.package.split(','),class=>"submitter")) :>] - <: $status.subject :> -
- Reported by: <: raw(package_links(submitter=>$status.originator)) :>; - Date: <: $status.date_text :>; - <:- if (defined $status.owner and length($status.owner)) { -:> - Owned by: <: raw(package_links(owner=>$status.owner)) :>; + >#<: $bug.bug :> + [ + <:- if $bug.strong_severity { -:><: $bug.short_severity :> + <:- } else { -:> + <:- $bug.short_severity } -:>| + <:- for $bug.tags.short_tags -> $tag { -:> + <: $tag.short :> + <:- } else { -:>  <: } :>| + <:- if $bug.is_merged > 0 { -:> + = + <:- } -:> + <:- if $bug.has_fixed { -:> + ☺ + <:- } -:> + <:- if $bug.is_blocked { -:> + ♙ + <:- } -:> + <:- if $bug.is_blocking { -:> + ♔ + <:- } -:> + <:- if $bug.is_forwarded { -:> + ↝ + <:- } -:> + <:- if $bug.archived { -:> + ♲ + <:- } -:> + <:- if $bug.is_affecting { -:> + ☣ + <:- } -:>] + [<: for $bug.packages.members_ref -> $package { -:> + <: $package.name :> + <:- if ! $~package.is_last { -:>, <: } else if ! $~package.is_first { -:>.<:- } -:> + <:- } :>] + <: $bug.subject :> +
+ Reported by: <: $bug.submitter :>; + Date: <: $bug.created.stringify :>; + <:- if $bug.is_owned { -:> + Owned by: <: $bug.owner :>; <:- } :> Severity: - <:- if (isstrongseverity($status.severity)) { -:> - )<: $status.severity :> + <: if $bug.strong_severity { -:> + <: $bug.severity :> <:- } else { -:> - <: $status.severity :> + <: $bug.severity :> <:- } -:> - <:- if $status.tags_array.size > 0 { -:> - Tags: <: $status.tags_array.join(', ') :>; + <:- if $bug.tags.has_tags { -:> + Tags: <: $bug.tags.join_all(', ') :>; <:- } -:> - : if $status.mergedwith_array.size > 0 { - Merged with <: bug_links(bug=>$status.mergedwith_array).join(",\n") :>; - : } - : if $status.found_versions.size > 0 or $status.fixed_versions.size > 0 { + <:- if $bug.is_merged > 0 { -:> + Merged with + <: for $bug.mergedwith.members_ref -> $bug { -:> + <:- bug_url_subject($bug) -:> + <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:> + <:- } -:> + + <:- } -:> + : if $bug.has_found or $bug.has_fixed { <:- } -:> - <:- if $status.found_versions.size > 0 { -:> - Found in version<: if $status.found_versions.size > 1 { :>s<: } :> - <:- $status.found_versions.join(', ') -:>; + <:- if $bug.has_found { -:> + Found in version<: if $bug.found.count > 1 { :>s<: } :> + <:- $bug.found.join(', ') -:>; <:- } -:> - <:- if $status.fixed_versions.size > 0 { :> - Fixed in version<: if $status.fixed_versions.size > 1 { :>s<: } :> - <:- $status.fixed_versions.join(', ') -:>; + <:- if $bug.has_fixed { :> + Fixed in version<: if $bug.fixed.count > 1 { :>s<: } :> + <:- $bug.fixed.join(', ') -:>; <:- } -:> - <:- if $status.found_versions.size > 0 or $status.fixed_versions.size > 0 { -:> + <:- if $bug.has_found or $bug.has_fixed { -:> <:- } -:> - <:- if (length($status.forwarded)) { :> + <:- if $bug.is_forwarded { :> Forwarded to - <: $status.forwarded.split('\,\s+').map(maybelink).join(', ') :> + <: $bug.forwarded.split('\,\s+').map(maybelink).join(', ') :> <:- } -:> - <:- if (length($status.done)) { -:> + <:- if $bug.is_done { -:> Done: - <: $status.done :> + <: $bug.done :> <:- } -:> - <:- if $status.archive_days >= 0 and - defined($status.location) && $status.location != "archive" { -:> + <:- if not $bug.archived and $bug.when_archiveable >= 0 { -:> Can be archived - <: if $status.archive_days == 0 { :> + <: if $bug.when_archiveable == 0 { :> today - <: } else if $status.archive_days == 1 { :> + <: } else if $bug.when_archiveable == 1 { :> in 1 day <: } else { :> - in <: $status.archive_days :> days + in <: $bug.when_archiveable :> days <:- } :>; - <:- } else if defined($status.location) && $status.location == "archived" { -:> + <:- } else if $bug.archived { -:> Archived <:- } -:> - <:- if $status.blockedby_array.count > 0 { :> + <:- if $bug.blockedby.count > 0 { :> Fix blocked by - <: for $status.blockedby_array -> $bug { :> - <: bug_links("bug",bug.bug_num) :>: - <: $bug.subject -:> + <: for $bug.blockedby -> $bug { :> + <: bug_url_subject($bug) :> <:- if ! $~bug.is_last { -:>, <: } else { -:>.<:- } -:> <:- } -:> <:- } -:> - <:- if $status.blocks_array.count > 0 { :> + <:- if $bug.blocks.count > 0 { :> Blocking fix for - <: for $status.blocks_array -> $bug { :> - <: bug_links("bug",bug.bug_num) :>: - <: $bug.subject -:> + <: for $bug.blocks -> $bug { :> + <: bug_url_subject($bug) :> <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:> <:- } -:> @@ -126,9 +129,9 @@ <:- } -:>; <:- } -:> - <: days_ago("Filed",$status.date) :> - <: days_ago("Modified",$status.log_modified) :> - <:- if defined $status.archived and $status.archived {:> + <: days_ago("Filed",$bug.created.epoch) :> + <: days_ago("Modified",$bug.modified.epoch) :> + <:- if $bug.archived {:> Bug is archived. No further changes may be made. <:- } -:>
-- 2.39.2