From 436569b08cb022f319ddef175daa4d0290291099 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 7 Dec 2021 13:32:27 +0100 Subject: [PATCH 1/4] Revert "Merge pull request #6727 from tchak/fix-approximative_expiration_date-again" This reverts commit 951f9744787114219bfcc64a2eea4babcf7ca5b9, reversing changes made to c95a67d970aa64cace526e49f1d2233e1102630f. --- app/models/dossier.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 93ba7e665..2a40eaa14 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -564,7 +564,8 @@ class Dossier < ApplicationRecord end def close_to_expiration? - return false + return false if en_instruction? + approximative_expiration_date < Time.zone.now end def expiration_date From 5615baa98597bb1635d22e6159ec140e42df978a Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 7 Dec 2021 13:32:39 +0100 Subject: [PATCH 2/4] Revert "Merge pull request #6724 from tchak/fix-approximative_expiration_date" This reverts commit c95a67d970aa64cace526e49f1d2233e1102630f, reversing changes made to 032989a400b3c53367ad09a8a8fe4dc0b5c8db31. --- app/models/dossier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 2a40eaa14..d687c4011 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -560,7 +560,7 @@ class Dossier < ApplicationRecord approximative_expiration_date_reference, conservation_extension, procedure.duree_conservation_dossiers_dans_ds.months - ].compact.sum - REMAINING_WEEKS_BEFORE_EXPIRATION.weeks + ].sum - REMAINING_WEEKS_BEFORE_EXPIRATION.weeks end def close_to_expiration? From 612b3bd82d2827d93b40cbe7c17fb4e8bdf8938e Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 7 Dec 2021 13:36:59 +0100 Subject: [PATCH 3/4] fix(task): use dossier.read_attribute instead of direct read --- .../deployment/20211110093332_set_dossiers_processed_at.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/deployment/20211110093332_set_dossiers_processed_at.rake b/lib/tasks/deployment/20211110093332_set_dossiers_processed_at.rake index 3129c5033..335d7fbe2 100644 --- a/lib/tasks/deployment/20211110093332_set_dossiers_processed_at.rake +++ b/lib/tasks/deployment/20211110093332_set_dossiers_processed_at.rake @@ -7,7 +7,7 @@ namespace :after_party do progress = ProgressReport.new(dossiers.count) dossiers.find_each do |dossier| - if dossier.processed_at != dossier.traitement.processed_at + if dossier.read_attribute(:processed_at) != dossier.traitement.processed_at dossier.update_column(:processed_at, dossier.traitement.processed_at) end progress.inc From dc003113e607fbf9b5361c39036ec371e160c05f Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 7 Dec 2021 13:02:34 +0100 Subject: [PATCH 4/4] gems: update sentry-rails to 4.8.1 --- Gemfile.lock | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9088549ba..56723ccbc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -248,19 +248,25 @@ GEM execjs (2.7.0) factory_bot (6.1.0) activesupport (>= 5.0.0) - faraday (1.4.3) + faraday (1.8.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) + faraday-httpclient (1.0.1) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) ffi (1.15.4) flipper (0.20.3) flipper-active_record (0.20.3) @@ -345,7 +351,7 @@ GEM domain_name (~> 0.5) http_accept_language (2.1.1) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.8.11) concurrent-ruby (~> 1.0) i18n-tasks (0.9.33) activesupport (>= 4.0.2) @@ -489,7 +495,7 @@ GEM pundit (2.1.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) rack-attack (6.5.0) rack (>= 1.0, < 3) @@ -636,7 +642,7 @@ GEM ruby-saml-idp (0.3.5) ruby-vips (2.0.17) ffi (~> 1.9) - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) ruby_parser (3.15.1) sexp_processor (~> 4.9) rubyzip (2.3.0) @@ -661,16 +667,17 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) semantic_range (3.0.0) - sentry-delayed_job (4.4.0) - sentry-ruby-core (~> 4.4.0.pre.beta) - sentry-rails (4.4.0) + sentry-delayed_job (4.8.1) + delayed_job (>= 4.0) + sentry-ruby-core (~> 4.8.1) + sentry-rails (4.8.1) railties (>= 5.0) - sentry-ruby-core (~> 4.4.0.pre.beta) - sentry-ruby (4.4.2) + sentry-ruby-core (~> 4.8.1) + sentry-ruby (4.8.1) concurrent-ruby (~> 1.0, >= 1.0.2) faraday (>= 1.0) - sentry-ruby-core (= 4.4.2) - sentry-ruby-core (4.4.2) + sentry-ruby-core (= 4.8.1) + sentry-ruby-core (4.8.1) concurrent-ruby faraday sexp_processor (4.15.2) @@ -767,7 +774,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.2) + zeitwerk (2.5.1) zip_tricks (5.6.0) zxcvbn-ruby (1.2.0)