From 88c2430bde2b16d791549b60d13fd2eab1a73fd6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 25 Nov 2022 15:20:58 +0000 Subject: [PATCH] Bug 30808: Add support for version codenames This patch adds the 'Rosalie' codename to the 22.11 release and adds corresponding support to the about page for displaying it. Signed-off-by: Tomas Cohen Arazi --- about.pl | 16 ++++++++++++---- docs/teams.yaml | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/about.pl b/about.pl index e92015fbc7..f4d1c7a959 100755 --- a/about.pl +++ b/about.pl @@ -722,6 +722,7 @@ my $dev_team = (sort {$b <=> $a} (keys %{$teams->{team}}))[0]; my $short_version = substr($versions{'kohaVersion'},0,5); my $minor = substr($versions{'kohaVersion'},3,2); my $development_version = ( $minor eq '05' || $minor eq '11' ) ? 0 : 1; +my $codename; $template->param( short_version => $short_version ); $template->param( development_version => $development_version ); @@ -747,7 +748,16 @@ for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) { } } } - elsif ( $role ne 'release_date' ) { + elsif ( $role eq 'release_date' ) { + $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}; + } + next; + } + else { my $name = $teams->{team}->{$version}->{$role}->{name}; # Add role to contributors push @{ $contributors->{$name}->{roles}->{$normalized_role} }, @@ -758,9 +768,6 @@ for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) { $contributors->{$name}->{openhub}; } } - else { - $teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role}); - } } } @@ -778,6 +785,7 @@ my @people = map { lc($a2last||"") cmp lc($b2last||""); } keys %$contributors; +$template->param( kohaCodename => $codename); $template->param( contributors => \@people ); $template->param( maintenance_team => $teams->{team}->{$dev_team} ); $template->param( release_team => $teams->{team}->{$short_version} ); diff --git a/docs/teams.yaml b/docs/teams.yaml index 7c94f079d8..717893f4f5 100644 --- a/docs/teams.yaml +++ b/docs/teams.yaml @@ -1098,6 +1098,7 @@ team: - name: Wainui Witika-Park 22.11: release_date: 1669420799 + codename: Rosalie manager: name: Tomás Cohen Arazi manager_assistants: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 4bfbb00987..b8ac65e8f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -45,7 +45,7 @@ - + @@ -554,7 +554,7 @@ [% IF maintenance_team %]
-

Koha [% short_version | html %] release team

+

Koha [% short_version | html %][% IF kohaCodename %] ([% kohaCodename | html %])[% END %] release team

[% IF development_version %]

You are running a development version of Koha

[% ELSE %] -- 2.39.5
Server information
Koha version: [% kohaVersion | html %]
Koha version: [% kohaVersion | html %][% IF kohaCodename %] [% kohaCodename | html %][% END %]
OS version ('uname -a'): [% osVersion | html %]
Perl interpreter: [% perlPath | html %]
Perl version: [% perlVersion | html %]