[fix #504] Dossier: received -> en_instruction
This commit is contained in:
parent
72bae2c374
commit
3dda27b281
40 changed files with 143 additions and 108 deletions
|
@ -4,7 +4,7 @@ class AutoArchiveProcedureJob < ApplicationJob
|
|||
def perform(*args)
|
||||
Procedure.publiees.where("auto_archive_on <= ?", Date.today).each do |procedure|
|
||||
procedure.dossiers.state_en_construction.each do |dossier|
|
||||
dossier.received!
|
||||
dossier.en_instruction!
|
||||
end
|
||||
|
||||
procedure.archive
|
||||
|
|
|
@ -4,7 +4,7 @@ class AutoReceiveDossiersForProcedureJob < ApplicationJob
|
|||
def perform(procedure_id, state)
|
||||
procedure = Procedure.find_by(id: procedure_id)
|
||||
if procedure
|
||||
procedure.dossiers.state_nouveaux.update_all(state: state, received_at: Time.now)
|
||||
procedure.dossiers.state_nouveaux.update_all(state: state, en_instruction_at: Time.now)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue