Commit graph

505 commits

Author SHA1 Message Date
Paul Chavard
0e2f09dd6f fix(dossiers): wrap dossier discard in a transaction
By doing this we ensure that deleted_dossier are not created when dossier is not discarded
2021-11-02 18:17:35 +01:00
Paul Chavard
d5d3995dad fix(dossier): fix dossier.avis cascade 2021-10-26 11:16:29 +02:00
Paul Chavard
4aa573a75d fix(transfer): remove discarded dossiers from transfers 2021-10-26 10:41:01 +02:00
Paul Chavard
2a3a9dd822 feat(revisions): rebase dossiers brouillons 2021-10-20 17:26:09 +02:00
Paul Chavard
1ca8192864 perf(export): load dossiers.champs in batches 2021-10-20 16:52:38 +02:00
Paul Chavard
9d5c5447c2 fix(dossier): do not attempt to destroy transfers when a dossier is destroyed
we had a dependent option on both sides of a relationship which created race conditions
2021-10-06 17:51:09 +02:00
Paul Chavard
d3c1941fbe fix(dossier): never write dossier log on dossiers brouillons 2021-10-05 17:56:51 +02:00
simon lehericey
65911b7680 update with_notifications dossiers scope (used in procedure index and show) 2021-10-05 12:05:43 +02:00
simon lehericey
3a878dfc04 add identity_updated_at column to dossier 2021-10-05 12:05:43 +02:00
Paul Chavard
d6cbdf2a48 feat(dossier): add dossier transfer models 2021-09-08 14:39:46 +02:00
Paul Chavard
a7ec43a21e fix(i18n): fix email previews 2021-09-08 09:21:19 +02:00
Paul Chavard
74e277d0a2 feat(graphql): add an option to dossier state change mutations to disable notifications 2021-09-07 14:21:48 +02:00
Paul Chavard
ff7fa4d895 feat(i18n): expose locale on dossier and deleted_dossier 2021-09-07 09:51:23 +02:00
Paul Chavard
8e1bfb469f fix(dossier): send expiration notifications 2 weeks prior to supression instead of a month 2021-08-26 11:28:57 +02:00
Christophe Robillard
e06f11f33f add code insee libelle for commune export 2021-08-19 08:04:47 +02:00
Christophe Robillard
daa306859c champ export can be an array of values 2021-08-19 08:04:47 +02:00
Paul Chavard
ffa8c0c80a feat(dossiers): enable dossiers termine expiration behind feature flag
feature flag "procedure_process_expired_dossiers_termine" controls if a procedure has expiration
enabled on dossiers termine

re #3796
2021-08-18 16:11:35 +01:00
Pierre de La Morinerie
0fd23ebd43 db: fix schema.rb leftovers 2021-07-22 17:55:47 +02:00
Christophe Robillard
66cc0dd08d Revert "Revert "Expose dossier PDF export as IO""
This reverts commit 362093eff0.
2021-06-24 21:01:59 +02:00
krichtof
362093eff0
Revert "Expose dossier PDF export as IO" 2021-06-24 19:21:37 +02:00
Paul Chavard
b73d504f8d Expose dossier PDF export as IO
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2021-06-24 17:49:24 +02:00
Paul Chavard
19195008e8 Expose removed types_de_champ in exports 2021-06-23 09:40:07 +02:00
François Vantomme
c9b1095d1e Refactor (Rubocop): replace map{ … }.compact by filter_map
In Ruby 2.7, Enumerable#filter_map has been added.
This cop identifies places where map { … }.compact can be replaced by filter_map.

See: https://docs.rubocop.org/rubocop-performance/cops_performance.html#performancemapcompact
2021-06-11 15:38:09 +02:00
Paul Chavard
1888f74b10 Prevent double processing of declarative dossiers 2021-06-04 17:55:40 +02:00
simon lehericey
b620888597 show only dossier avis 2021-05-20 16:18:04 +02:00
kara Diaby
20933579b0 do not display confidential avis to other experts 2021-05-19 21:30:22 +02:00
Paul Chavard
5f419954b4 Fix dossier deleted user display 2021-05-13 10:43:55 +02:00
Paul Chavard
3f7a2bea9b Dossier without user should be valid 2021-05-11 17:50:10 +02:00
Paul Chavard
8a74438dc1 Use conservation_extension instead of en_construction_conservation_extension 2021-05-11 17:33:53 +02:00
Paul Chavard
1e0d6ea28f Rename en_construction_conservation_extension to conservation_extension 2021-05-11 14:08:51 +02:00
simon lehericey
c5f6c9ae1e fix missing state translation 2021-05-10 11:17:34 +02:00
Paul Chavard
bcbfcdc537 Revert "Merge pull request #6142 from tchak/enable_brouillon_extend_conservation"
This reverts commit 48eb4d9778, reversing
changes made to 5539d5cb8c.

# Conflicts:
#	app/models/dossier.rb
#	db/schema.rb
2021-05-04 16:03:29 +02:00
Christophe Robillard
01f180022b prend en compte uniquement les pj pour estimer la taille d'un dossier 2021-05-04 12:50:12 +02:00
Paul Chavard
f6508899de Refactor NotificationMailer 2021-05-04 12:05:06 +02:00
Paul Chavard
a4fd629f4a Enable user destruction 2021-05-04 12:05:06 +02:00
Paul Chavard
b2a867266a Allow users to extend conservation on drafts 2021-04-29 19:50:30 +02:00
Christophe Robillard
f40d96fbd2 Revert "Revert "Export de tous les dossier d'une démarche""
This reverts commit d9a588b52e.
2021-04-29 17:29:47 +02:00
krichtof
d9a588b52e
Revert "Export de tous les dossier d'une démarche" 2021-04-29 16:07:18 +02:00
Christophe Robillard
07cc4fa97f add service to create procedure archive 2021-04-28 11:40:58 +02:00
kara Diaby
663fa50f02 notify expert when a decision is taken on a dossier 2021-04-15 11:29:55 +02:00
Paul Chavard
5b56ec425b Fix discarded dossiers destruction 2021-04-14 12:24:16 +01:00
simon lehericey
6055fd1b0b remove for_procedure 2021-04-13 09:32:48 +02:00
Paul Chavard
371d612fdb Remove unused columns 2021-04-08 12:43:29 +01:00
Pierre de La Morinerie
3499f5af9a models: remove invalid Dossier ↔︎ Champ inverse relationship
`Dossier.champs` is not really an inverse of `Champs.dossier`: when a
Champ record is created, it should not always be added to dossier.champs
(for instance if the champ is private).

NB: this breaks the workaround we added in #3907 to fix the parent
dossier not being touched in some cases (the workaround was to add an
inverse relationship, but we now have to remove it).

The new workaround is to watch for `changed_for_autosave?` on champs.
Unlike `changed?`, `changed_for_autosave?` also detects changes to
attachments. This allows us to touch both `last_champ_updated_at` and
`updated_at` in a single pass.
2021-04-06 10:26:17 +02:00
Paul Chavard
23104f15a4 Fix export n+1 queries 2021-03-25 19:22:12 +01:00
Pierre de La Morinerie
239169e925 dossier: fix looking-up avis from Expert
This line causes an error on Rails 6.1.

And it isn't even necessary: this line is supposed to query avis where
the expert advice has been requested – but this is handled by the
`if expert.dossiers.include?(self)` condition just above.
2021-03-18 17:59:30 +01:00
kara Diaby
38740d1b5b modify experts avis controllers, concern and serializer 2021-03-18 11:38:52 +01:00
Christophe Robillard
60cc4d3697 add pdf to pjs export 2021-03-16 15:13:17 +01:00
Paul Chavard
70500e3d56 Groupe instructeur selector default blank 2021-03-09 14:47:23 +01:00
Paul Chavard
9c3e72c84a Use revision instead of groupe instructeur as dossier procedure link 2021-03-09 14:47:23 +01:00