From d1b1b5f268a96a16fc367da139162b987f7acc57 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Mon, 22 Jun 2020 14:28:49 +0200 Subject: [PATCH] Include archived columns to inventories export --- .../javascripts/repositories/repository_datatable.js | 6 ++++++ app/services/repository_zip_export.rb | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 269a12a8d..82ab8d669 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -361,6 +361,12 @@ var RepositoryDatatable = (function(global) { case 'added-on': val = -6; break; + case 'archived-by': + val = -7; + break; + case 'archived-on': + val = -8; + break; default: val = th.attr('id'); } diff --git a/app/services/repository_zip_export.rb b/app/services/repository_zip_export.rb index 9dd54c591..be0e54480 100644 --- a/app/services/repository_zip_export.rb +++ b/app/services/repository_zip_export.rb @@ -34,6 +34,10 @@ module RepositoryZipExport I18n.t('repositories.table.added_by') when -6 I18n.t('repositories.table.added_on') + when -7 + I18n.t('repositories.table.archived_by') + when -8 + I18n.t('repositories.table.archived_on') else column = RepositoryColumn.find_by_id(c_id) column ? column.name : nil @@ -56,6 +60,10 @@ module RepositoryZipExport row.created_by.full_name when -6 I18n.l(row.created_at, format: :full) + when -7 + row.archived_by.full_name + when -8 + I18n.l(row.archived_on, format: :full) else cell = row.repository_cells .find_by(repository_column_id: c_id)