feat(routing): route when autosave of champ used by routing rules

This commit is contained in:
Eric Leroy-Terquem 2024-05-17 10:06:32 +02:00
parent 60ba6a2241
commit f860745629
No known key found for this signature in database
GPG key ID: 53D8FAECEF207605

View file

@ -558,6 +558,10 @@ module Users
@dossier.update_champs_attributes(champs_public_attributes_params, :public, updated_by: current_user.email)
if @dossier.champs.any?(&:changed_for_autosave?)
@dossier.last_champ_updated_at = Time.zone.now
if @dossier.champs_public.filter(&:changed_for_autosave?).any?(&:used_by_routing_rules?)
RoutingEngine.compute(@dossier)
end
end
# We save the dossier without validating fields, and if it is successful and the client