From 6f09a31a153fb0d495d84ea37d63fcdd8c887674 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 10 Jan 2024 13:46:58 +0000 Subject: [PATCH] Bug 35504: Distinguish different RMaint and Topic Expert roles This patch further splits up release maintanence and topic expert roles so that they display with further, more accurate, detail in the development team section. Signed-off-by: Katrin Fischer (cherry picked from commit 2ce83fc784ad8bc716bd65f14845141097c72b69) Signed-off-by: Fridolin Somers --- about.pl | 31 ++++++++++++++----- .../prog/en/includes/about-team.inc | 9 +++++- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/about.pl b/about.pl index 6c3175c2d8..218c384b38 100755 --- a/about.pl +++ b/about.pl @@ -767,13 +767,23 @@ my $contributors = delete $contributors->{_others_}; for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) { for my $role ( keys %{ $teams->{team}->{$version} } ) { + my $detail = $teams->{team}->{$version}->{$role}; my $normalized_role = "$role"; $normalized_role =~ s/s$//; - if ( ref( $teams->{team}->{$version}->{$role} ) eq 'ARRAY' ) { - for my $contributor ( @{ $teams->{team}->{$version}->{$role} } ) { + if ( ref( $detail ) eq 'ARRAY' ) { + for my $contributor ( @{ $detail } ) { + + my $localized_role = $normalized_role; + if ( my $subversion = $contributor->{version} ) { + $localized_role .= ':' . $subversion; + } + if ( my $area = $contributor->{area} ) { + $localized_role .= ':' . $area; + } + my $name = $contributor->{name}; # Add role to contributors - push @{ $contributors->{$name}->{roles}->{$normalized_role} }, + push @{ $contributors->{$name}->{roles}->{$localized_role} }, $version; # Add openhub to teams if ( exists( $contributors->{$name}->{openhub} ) ) { @@ -782,22 +792,29 @@ for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) { } } elsif ( $role eq 'release_date' ) { - $teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role}); + $teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role} ); } elsif ( $role eq 'codename' ) { if ( $version == $short_version ) { - $codename = $teams->{team}->{$version}->{$role}; + $codename = $detail; } next; } else { - my $name = $teams->{team}->{$version}->{$role}->{name}; + if ( my $subversion = $detail->{version} ) { + $normalized_role .= ':' . $subversion; + } + if ( my $area = $detail->{area} ) { + $normalized_role .= ':' . $area; + } + + my $name = $detail->{name}; # Add role to contributors push @{ $contributors->{$name}->{roles}->{$normalized_role} }, $version; # Add openhub to teams if ( exists( $contributors->{$name}->{openhub} ) ) { - $teams->{team}->{$version}->{$role}->{openhub} = + $detail->{openhub} = $contributors->{$name}->{openhub}; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/about-team.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/about-team.inc index 065bae112f..fbafd90ebe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/about-team.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/about-team.inc @@ -1,5 +1,8 @@ [%- BLOCK role -%] - [%- SWITCH role.key -%] + [% matches = role.key.match('(\w+):?(.*)?') %] + [% ro = matches.0 %] + [% ex = matches.1 %] + [%- SWITCH ro -%] [%- CASE 'manager' -%]Release manager [%- CASE 'manager_assistant' -%]Release manager assistant [%- CASE 'manager_mentor' -%]Release manager mentor @@ -27,7 +30,11 @@ [%- CASE 'live_cd' -%]Live CD maintainer [%- CASE 'accessibility_advocate'-%]Accessibility advocate [%- CASE 'meeting_facilitator' -%]Meeting facilitator + [%- CASE 'ktd' -%]Developer tooling + [%- CASE 'website' -%]Website administrator + [%- CASE -%]MISSING MAP FOR ROLE: [% role.key | html %] [%- END -%] + [%- IF ex %] - [% ex | html %][% END -%] [%- END -%] [%- BLOCK person -%]