This is an automated email from the ASF dual-hosted git repository.

niallp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/attic.git


The following commit(s) were added to refs/heads/main by this push:
     new 30b89ac  Process Tracking: show by year & provide anchor links to each 
year
30b89ac is described below

commit 30b89ac60d1b1ba076c66a9872586cdcb702ccbd
Author: Niall Pemberton <niall.pember...@gmail.com>
AuthorDate: Mon May 5 21:07:14 2025 +0100

    Process Tracking: show by year & provide anchor links to each year
---
 _plugins/project-data-plugin.rb | 25 +++++++++++++++++++++++++
 tracking.md                     | 33 +++++++++++++++++++++++++--------
 2 files changed, 50 insertions(+), 8 deletions(-)

diff --git a/_plugins/project-data-plugin.rb b/_plugins/project-data-plugin.rb
index ad181e2..2fcf697 100644
--- a/_plugins/project-data-plugin.rb
+++ b/_plugins/project-data-plugin.rb
@@ -63,6 +63,31 @@ module ProjectDataPlugin
 
       site.data['project_array'] = projects.sort_by { |project| 
project['project_name_lower'] }
       
+      ## Initialize Array of years from 2009 onwards
+      current_year = Time.new.year
+      years = Array.new
+      year = Hash.new
+      year['year'] = 2004.to_s
+      year['projects'] = Array.new
+      years.push(year)
+      for i in 2009..current_year do
+        year = Hash.new
+        year['year'] = i.to_s
+        year['projects'] = Array.new
+        years.push(year)
+      end
+      
+      ## Populate the projects in the Array
+      projects = site.data['project_array'].sort_by { |project| 
project['retirement_date']}.reverse
+      projects.each do | project|
+        year = project['retirement_date'].year
+        i = year - 2008
+        if i < 0
+          i = 0
+        end
+        years[i]['projects'].push(project)
+      end
+      site.data['years_array'] = years.sort_by { |year| year['year'] }.reverse
     end
   end
 end
\ No newline at end of file
diff --git a/tracking.md b/tracking.md
index d08c5fd..85dd4f5 100644
--- a/tracking.md
+++ b/tracking.md
@@ -27,7 +27,7 @@ limitations under the License.
 # The Apache Attic Process Tracking
 ***
 
-This page lists projects in *Retirement Date* order and shows the *Completion 
Date* of the project's
+This page lists projects in descending *Retirement Date* order and shows the 
*Completion Date* of the project's
 move to the Attic along with the [Attic 
JIRA](https://issues.apache.org/jira/projects/ATTIC) ticket
 used to track the move.
 {: .fs-5}
@@ -39,12 +39,29 @@ used to track the move.
   - [Open Jira 
issues](https://issues.apache.org/jira/issues/?jql=status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20labels%20%3D%20retire-project)
   - [Retirement Process Documentation]({% link process.md %})
 
-|Retirement Month|Completed|Project|Tracking|
-|:-------------|:-------------|:-------------|:-------------|
-{%- for project in projects_by_date -%}
-{%- assign retire_date = project.retirement_date  | date: list_date_fmt -%}
-{%- assign attic_date = project.attic_date | date: list_date_fmt -%}
-{% assign proj_link = project.project_id | prepend: "projects/" | append: 
".html" %}
-|{{ retire_date }}|{{ attic_date }}|[{{ project.project_apachename }}]({%- 
link {{proj_link}} -%})|[{{ project.attic_issue }}]({{ project.attic_issue_link 
}})|
+{% assign no_of_years = 20 %}
+
+{% for year in site.data.years_array limit: no_of_years -%}
+{% capture mod -%}{{forloop.index0 | modulo: 10}}{%- endcapture -%} 
+{%- if mod == '0' %}<br />{% endif 
%}[{{year['year']}}](#attic-{{year['year']}}){: .btn 
style="font-family:SFMono-Regular;" }&nbsp;
 {%- endfor -%}
 
+
+{% for year in site.data.years_array limit: no_of_years %}
+
+### Attic {{year['year']}}
+
+|Retirement Month|Completed|Project|Tracking|Type|
+|:---------------|:--------|:------|:-------|:---|
+{% for project in year.projects %}
+{%- out | %}{{ project.retirement_date  | date: list_date_fmt }}|{{ 
project.attic_date | date: list_date_fmt }}
+    {%- out -%}|[{{ project.project_apachename }}]({%- link 
{{project.project_id | prepend: "projects/" | append: ".html"}} -%})
+    {%- out -%}|[{{ project.attic_issue }}]({{ project.attic_issue_link 
}})|{{project.project_type}}|
+{% else -%}
+{%- out | %} &nbsp; | &nbsp; | &nbsp; | &nbsp; |
+{% endfor %}
+
+
+{% endfor %}
+
+

Reply via email to