Merge pull request #7886 from mfo/fix-routing-criteria-name-doit-etre-rempli
correctif(routing_criteria_name doit etre rempli): données inconsistantes
This commit is contained in:
commit
c085aa2665
3 changed files with 54 additions and 0 deletions
33
config/locales/models/procedure/en.yml
Normal file
33
config/locales/models/procedure/en.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
en:
|
||||
activerecord:
|
||||
models:
|
||||
procedure:
|
||||
one: Procedure
|
||||
other: Procedure
|
||||
attributes:
|
||||
procedure:
|
||||
path: Public link
|
||||
organisation: Service
|
||||
duree_conservation_dossiers_dans_ds: Duration files will be kept
|
||||
max_duree_conservation_dossiers_dans_ds: Max duration allowed to keep files
|
||||
aasm_state/brouillon: Draft
|
||||
aasm_state/publiee: Published
|
||||
aasm_state/close: Close
|
||||
aasm_state/hidden: Destroyed
|
||||
declarative_with_state/en_instruction: Instruction
|
||||
declarative_with_state/accepte: Accepted
|
||||
api_particulier_token: Token API Particulier
|
||||
lien_dpo: DPO contact
|
||||
routing_criteria_name: Routee criteria name
|
||||
errors:
|
||||
models:
|
||||
procedure:
|
||||
attributes:
|
||||
api_particulier_token:
|
||||
invalid: 'invalid format'
|
||||
draft_types_de_champ:
|
||||
format: 'Public field %{message}'
|
||||
draft_types_de_champ_private:
|
||||
format: 'Private field %{message}'
|
||||
lien_dpo:
|
||||
invalid_uri_or_email: "Fill in with an email or a link"
|
|
@ -18,6 +18,7 @@ fr:
|
|||
declarative_with_state/accepte: Accepté
|
||||
api_particulier_token: Jeton API Particulier
|
||||
lien_dpo: Contact du DPO
|
||||
routing_criteria_name: Nommination du routage
|
||||
errors:
|
||||
models:
|
||||
procedure:
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
namespace :after_party do
|
||||
desc 'Deployment task: backfill_procedure_routing_criteria_name'
|
||||
task backfill_procedure_routing_criteria_name: :environment do
|
||||
puts "Running deploy task 'backfill_procedure_routing_criteria_name'"
|
||||
|
||||
# Put your task implementation HERE.
|
||||
procedure_without_routing_criteria_name = Procedure.where(routing_criteria_name: nil)
|
||||
progress = ProgressReport.new(procedure_without_routing_criteria_name.count)
|
||||
procedure_without_routing_criteria_name.in_batches do |relation|
|
||||
count = relation.count
|
||||
relation.update_all(routing_criteria_name: 'Votre ville')
|
||||
progress.inc(count)
|
||||
end
|
||||
progress.finish
|
||||
# Update task as completed. If you remove the line below, the task will
|
||||
# run with every deploy (or every time you call after_party:run).
|
||||
AfterParty::TaskRecord
|
||||
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue