Martin
608a85148f
feat(Dossier.close_to_expiration): add method to find any kind of dossier close to expiration [reuse previous scopes], add missing spec to termine_close_to_expiration, complement spec for each kind of expiration scope with general close_to_expiration spec
2021-11-19 14:28:54 +01:00
Paul Chavard
da47f491b3
fix(dossier): nullify close to expiration notice timestamps when changing state
2021-11-11 12:52:58 +01:00
Paul Chavard
122cdacbc2
fix(avis): destroy avis for discarded en_construction dossiers
2021-11-04 10:12:44 +01:00
Paul Chavard
f6b8689a97
fix(revisions): fix repetitions export with revisions
2021-11-03 18:20:48 +01:00
Paul Chavard
da49a6447f
refactor(repetition): optimize and add a transaction around repetition add row
2021-10-28 14:54:33 +02:00
Paul Chavard
1393b7b07b
fix(rebase): fix repetition champ rebase
2021-10-28 13:27:53 +02:00
Paul Chavard
2a3a9dd822
feat(revisions): rebase dossiers brouillons
2021-10-20 17:26:09 +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
74e277d0a2
feat(graphql): add an option to dossier state change mutations to disable notifications
2021-09-07 14:21:48 +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
8f2e0660d3
add spec for dossier with commune
2021-08-19 08:04:47 +02:00
Paul Chavard
388fb39eb5
Fix false positive blank champ warnings
2021-07-22 10:45:25 +02:00
Paul Chavard
19195008e8
Expose removed types_de_champ in exports
2021-06-23 09:40:07 +02:00
simon lehericey
b620888597
show only dossier avis
2021-05-20 16:18:04 +02:00
kara Diaby
aaf943569a
rename avis confidential test
2021-05-20 11:13:24 +02:00
Paul Chavard
8a74438dc1
Use conservation_extension instead of en_construction_conservation_extension
2021-05-11 17:33:53 +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
b2a867266a
Allow users to extend conservation on drafts
2021-04-29 19:50:30 +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
kara Diaby
18f89b0d83
adjust tests
2021-03-24 17:47:24 +01:00
Paul Chavard
0b22788d60
experts_procedure should not be optional
2021-03-23 13:46:33 +01:00
Paul Chavard
224c7ec6c3
Update spec/models/dossier_spec.rb
...
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-03-23 10:51:55 +01:00
Paul Chavard
84214f4bd4
Do not export non exportable champs on draft procedures
2021-03-23 09:55:37 +01:00
kara Diaby
81f5a5254b
tests
2021-03-18 11:38:52 +01:00
Pierre de La Morinerie
75a1046315
active_storage: refactor concerns
...
Follow-up of #5953 .
Refactor the concerns with two goals:
- Getting closer from the way ActiveStorage adds its own hooks.
Usually ActiveStorage does this using an `Attachment#after_create`
hook, which then delegates to the blob to enqueue the job.
- Enqueuing each job only once. By hooking on `Attachment#after_create`,
we guarantee each job will be added only once.
We then let the jobs themselves check if they are relevant or not, and
retry or discard themselves if necessary.
We also need to update the tests a bit, because Rails'
`perform_enqueued_jobs(&block)` test helper doesn't honor the `retry_on`
clause of jobs. Instead it forwards the exception to the caller – which
makes the test fail.
Instead we use the inline version of `perform_enqueued_jobs()`, without
a block, which properly ignores errors catched by retry_on.
2021-03-16 11:49:14 +01:00
Paul Chavard
96a832bc19
Add SerializerService
2021-03-02 12:42:22 +01:00
Paul Chavard
a591d5528e
Add job exception log methods to champ and dossier
2021-02-05 18:56:27 +01:00
kara Diaby
f3c4040d2d
add grace period to deleted dossiers
2020-12-16 15:00:26 +01:00
Paul Chavard
48e7822e34
Remove titres identite after a dossier is processed
2020-12-10 15:21:25 +01:00
Christophe Robillard
5562e65bf3
refacto: rename administration to super_admin
2020-11-05 16:03:55 +01:00
Paul Chavard
4dfc1c719f
Fix geo areas computations
2020-10-01 15:09:38 +02:00
Paul Chavard
1bd59c72e5
Include in exports types_de_champ from all revisions
2020-09-30 13:42:38 +02:00
Paul Chavard
973973ab6a
Do not enqueue web hooks for empty urls
2020-09-22 17:03:19 +02:00
clemkeirua
f96377d878
refactor Dossier#with_notifications
2020-09-21 08:28:42 +00:00
clemkeirua
d01a53eb72
remove :cached_notifications gate
2020-09-21 08:28:42 +00:00
clemkeirua
c7b96d3d43
add feature-flip for instructeurs on cached notifications
2020-09-08 15:40:42 +00:00
clemkeirua
52ea5ef89a
make Dossier#with_notifications great again
...
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-09-08 15:40:42 +00:00
Paul Chavard
1488e0964b
update models specs to use revisions
2020-09-02 11:26:26 +02:00
Pierre de La Morinerie
aefdd5d2a1
models: require belong_to associations on attestation_template
2020-08-18 15:57:36 +02:00
Christophe Robillard
1253bb5994
store instructeur_email in traitement
2020-07-08 18:15:15 +02:00
Christophe Robillard
a072d35211
use traitement model
...
when a dossier is terminated (accepte, refuse or classe_sans_suite),
we store now `processed_at` and `motivation` in a traitement instance
2020-07-08 18:15:15 +02:00
Christophe Robillard
f631acd118
update state date in aasm after callbacks
...
call aasm event methods, not state methods directly
2020-07-08 18:15:15 +02:00
Pierre de La Morinerie
060bf1f9ca
factories: flesh out the default etablissement for a dossier
2020-07-06 11:41:25 +02:00
Paul Chavard
20705d6e30
Do not send draft norifications to users on inactive démarches
2020-05-27 16:36:46 +02:00
Paul Chavard
dfc004d7bb
Unarchive dossier when repasser_en_instruction
2020-05-12 19:05:18 +02:00
Paul Chavard
843e033c38
Allow instructeurs to download a GeoJSON document for a given dossier
2020-04-30 15:49:43 +02:00