Commit graph

279 commits

Author SHA1 Message Date
Nicolas Bouilleaud
df865e71dc Make sure that there always is at least one administrator per Procedure 2019-05-06 16:19:08 +02:00
Pierre de La Morinerie
d855468cb6 dossiers: display the estimate of the entire processing time
Displaying separate estimations for en_construction and en_instruction
doesn't really make sense for the users: they want to know how
long it is going to take overall, not the petty details of our workflow.
2019-04-30 15:56:27 +02:00
Pierre de La Morinerie
8bd1064532 tasks: populate Procedure.administrateurs even for hidden procedures
The previous procedure migration (created in
f7af01e0dc) worked fine, but didn't run
on hidden procedures (due to the default scope).
2019-04-29 16:35:34 +02:00
Paul Chavard
639facaf2a Add new types_de_champ#move api 2019-04-03 14:38:07 +02:00
Mathieu Magnin
27c8e9dcb8 Use the same clone_attachment method for all attributes on procedure.clone 2019-03-28 17:17:29 +01:00
Pierre de La Morinerie
abeb58caa5 dossiers: displays an "Start an other dossier" item in action dropdown 2019-03-28 15:26:15 +01:00
pedong
c0a928ac7a [fix #3440] use attachment.download for get attachment file 2019-03-26 17:11:59 +01:00
Mathieu Magnin
4e27872a25 [Fix #3650] when cloning a procedure, do not forget pj_templates 2019-03-26 15:31:09 +01:00
Pierre de La Morinerie
b1a7018d30 procedure: ignore bad data when computing usual_instruction_time
Fix #3655
2019-03-20 17:48:54 +01:00
Pierre de La Morinerie
ed1f6ec38d procedure: fix verification delay
The verification delay was ignoring all dossiers not closed yet.
2019-03-19 15:51:51 +01:00
Paul Chavard
bb8ba75d22 Explicitly pass current_administrateur on publish 2019-03-12 11:59:01 +01:00
Paul Chavard
01b966ff66 Check demarche ownership on multiple administrateurs 2019-03-12 11:59:01 +01:00
Mathieu Magnin
44f28ec565 Remove feature flag for publish draft 2019-03-12 11:26:07 +01:00
Paul Chavard
84383fc3c1 Assigne admins to procedure.administrateurs 2019-02-20 17:10:57 +01:00
Mathieu Magnin
dd27167c5d Enforce Timezone rule in Rubocop 2019-02-18 16:19:42 +01:00
Paul Chavard
a0a1ce11c8 Add repetition to apercu 2019-02-07 12:29:27 +01:00
Paul Chavard
6b39128be3 Clone nested types_de_champ 2019-02-06 10:05:27 +01:00
Pierre de La Morinerie
db8289a19d procedure: ensure a procedure can't be deleted while it has dossiers 2019-01-23 17:19:36 +01:00
Frederic Merizen
5e37400834 [#2180] Only retain old PJ API when cloning for same admin 2019-01-17 17:40:40 +01:00
Frederic Merizen
d1c0418c89 [#2180] Refactor - extract local variable 2019-01-17 17:40:40 +01:00
Frederic Merizen
651fd6149b [#2180] When cloning a procedure, convert types de PJ to types de champ PJ 2019-01-17 17:40:40 +01:00
Mathieu Magnin
2ce6d01aec Procedure has a default generated path when created 2019-01-17 14:04:58 +01:00
Paul Chavard
e1a1a2b2ad Add new admin procedure update action 2019-01-17 11:20:31 +01:00
simon lehericey
99bfd19b41 [fix #3268] Jobs: use automatic_operation 2019-01-16 17:20:12 +01:00
simon lehericey
a197285742 [fix #2612] Admin: add missing steps to admin UI 2019-01-09 16:25:00 +01:00
simon lehericey
8ca7eb1c54 Procedure: cloning set the current admin gestionnaire of the procedure 2019-01-09 16:25:00 +01:00
Paul Chavard
1beefe4469 Fix champ repetition belongs_to associations 2019-01-08 11:56:33 +00:00
Pierre de La Morinerie
d77530c461 Make Procedure state consistent after switching types de champ order
Fixes an issue where, after clicking the "move champ up" button,
the new form is rendered with an incoherent order.
2019-01-03 15:13:14 +01:00
Mathieu Magnin
b40c706d98 [Fix #3192] Clone service if procedure is transferred 2018-12-20 15:45:48 +01:00
Paul Chavard
eb9edc1cee Order types de champ in scope 2018-12-20 14:14:15 +01:00
gregoirenovel
df7e0a9881 Remove dead code 2018-12-19 14:59:15 +01:00
Frederic Merizen
d1cfe4468d Encourager la création de champs PJ plutôt que de vieilles PJS 2018-12-19 11:57:23 +01:00
pedong
f70f276ae9 [fix #2813] set lien_notice nil when clone a procedure 2018-12-06 21:28:08 +01:00
Paul Chavard
35494df78e Procedure export dossiers with champs siret 2018-12-05 17:09:39 +01:00
Paul Chavard
1883c57c87 Add stable ids to types_de_champ after every update 2018-11-29 11:41:13 +01:00
Paul Chavard
36f6f54337 Remove unused carto models 2018-11-27 16:11:25 +01:00
Paul Chavard
a079eaea5c Add procedure gestionnaire_for_cron_job method 2018-11-27 12:49:40 +01:00
Paul Chavard
971a08c92a Add expose legacy carto api flag 2018-11-20 10:53:14 +01:00
Paul Chavard
2462e42b53 Stop using legacy api carto after migration 2018-11-20 10:53:14 +01:00
Pierre de La Morinerie
83031b5cdd procedure: compute the usual instruction time only for the last month 2018-11-13 17:23:31 +01:00
Pierre de La Morinerie
e59bec51ef procedure: use 90th percentile to estimate the completion delay 2018-11-08 18:29:17 +01:00
Pierre de La Morinerie
5c921182ea procedure: rename mean_instruction_time to usual_instruction_time
Ref #2970
2018-11-08 17:20:06 +01:00
Paul Chavard
80189def98 Remove n+1 calls from API queries 2018-11-08 14:45:09 +01:00
Paul Chavard
e391fe6bec Clarify procedure path availability code 2018-10-30 15:59:37 +01:00
Paul Chavard
b42095363e Refactor procedure model 2018-10-30 12:01:45 +01:00
Paul Chavard
78dc582588 Remove ProcedurePath 2018-10-30 12:01:45 +01:00
simon lehericey
2238e5bd9f Time.now => Time.zone.now 2018-10-26 10:10:20 +00:00
simon lehericey
13ffa61435 DateTime.now => Time.zone.now 2018-10-26 10:10:20 +00:00
Frederic Merizen
0e9b40ccf6 [#2750] Move fields from Procedure to ProcedurePresentation 2018-10-10 09:07:57 +02:00
Frederic Merizen
efcac5192a [#2750] Move fields_for_select to ProcedurePresentation 2018-10-10 09:07:57 +02:00
Paul Chavard
bcbfc370b2 Add button in manager to transition démarche in brouillon state
fix #2565
2018-10-09 16:14:18 +02:00
Frederic Merizen
eafd0e8348 Evite de cacher la whitelist trop longtemps 2018-10-04 18:09:39 +02:00
gregoirenovel
c91a1cf474 Enable Style/SymbolArray 2018-10-03 12:15:48 +02:00
simon lehericey
4d4dba1550 Procedure: small renaming on mean_time 2018-09-27 15:02:38 +02:00
Paul Chavard
f94a24d7ce Add path field to procedure information form 2018-09-26 10:53:45 +02:00
Paul Chavard
f6a6d8f457 Fix destroy dossiers on procedure reset 2018-09-26 10:53:45 +02:00
Frederic Merizen
1419e9b73f [#2622] Change sort to proper JSONB 2018-09-24 19:39:01 +02:00
gregoirenovel
8ea021fb69 Factorize code in a method 2018-09-19 12:31:59 +02:00
gregoirenovel
6b98c36dad Add Dossier#mean_traitement_time for the upcoming page de garde 2018-09-19 12:31:59 +02:00
gregoirenovel
f3a257d81d Show the mean verification time in the Résumé tab 2018-09-19 12:31:59 +02:00
gregoirenovel
d55c9dff4d Show the mean instruction time in the Résumé tab 2018-09-19 12:31:59 +02:00
Paul Chavard
36812793d4 Do not clone procedure path 2018-09-18 14:40:02 +02:00
Frederic Merizen
63fc0b3bc3 [Fix #2584] Move Field related code to a service 2018-09-18 13:49:34 +02:00
Paul Chavard
b042efdcba Update procedure path attribute when procedure_path changes 2018-09-18 13:21:29 +02:00
Paul Chavard
b772256a97 Read from path attribute instead of procedure_path when possible 2018-09-18 13:21:18 +02:00
Paul Chavard
2787f040af Add path attribute to Procedure model 2018-09-18 13:21:18 +02:00
Paul Chavard
3f6cc668a7 Implement check_availability route 2018-09-12 12:37:15 +02:00
Paul Chavard
be51802983 Add reopen aasm event 2018-09-11 10:38:31 +02:00
Paul Chavard
5a794cbb08 Use Procedure#publish_or_reopen! 2018-09-11 10:38:31 +02:00
Paul Chavard
ec3a0dc4cf Use Procedure#publish_with_path! 2018-09-11 10:38:31 +02:00
Paul Chavard
b3f8b68b99 Add Procedure#publish_with_path! 2018-09-11 10:38:31 +02:00
Paul Chavard
f2f3c54147 Procedure: update -> update! 2018-09-11 10:38:31 +02:00
Paul Chavard
7a322266fa Make aasm related methods private 2018-09-11 10:38:31 +02:00
Paul Chavard
23170f54c0 Instructeur should see published drafts 2018-09-07 11:20:16 +01:00
gregoirenovel
2d3b553e4d Use enum to the fullest with TypeDeChamp.type_champs 2018-08-29 17:31:08 +02:00
Paul Chavard
aec02a9b8a Remove references to test_procedure 2018-08-14 16:30:43 +02:00
Paul Chavard
7237ff80cc Drop procedure dossiers when updating brouillon 2018-08-14 11:21:05 +02:00
Paul Chavard
3be678dbe5 Add publish_draft feature flag 2018-08-13 19:27:28 +02:00
Pierre de La Morinerie
b0a9e49549 procedures: group new_from_existing list by organization
As procedures are not grouped by Service (which are unique to an
administrator) but by organization, this allows procedures with the same
organization name to be displayed together.
2018-07-03 23:43:42 +02:00
Paul Chavard
93d6d72df5 Do not copy service info when cloning from library 2018-06-28 11:33:10 +02:00
Frederic Merizen
346687bd33 [#1946] Once durees de conservation have been set, forbid unsetting them 2018-06-01 16:46:39 +02:00
Frederic Merizen
42765efb91 [#1946] Add validation to durees conservation 2018-06-01 16:46:39 +02:00
simon lehericey
c72421fb9e Procedure: Once deliberation or cadre_juridique have been set, forbid unsetting them 2018-06-01 11:12:53 +02:00
simon lehericey
1f0e46a4ff Procedure: required juridique stuff only if needed 2018-06-01 11:12:53 +02:00
simon lehericey
0e690c90cc Procedure: clone the deliberation 2018-05-31 16:56:28 +02:00
simon lehericey
fa14db1cbf Procedure: add deliberation 2018-05-31 16:56:28 +02:00
simon lehericey
a96889310b Procedure: add legal reference 2018-05-31 16:55:31 +02:00
gregoirenovel
dc045bdefb [Fix #1808] Use &. where possible 2018-05-31 11:49:25 +02:00
Mathieu Magnin
55a3d59e38 Create new model to store deleted dossier metadatas 2018-05-30 18:01:36 +02:00
Paul Chavard
86b2cb211e Do not attempt to archive already archived procedures 2018-05-29 14:29:26 +02:00
Paul Chavard
87d7bd4fb2 Fix clone procedure 2018-05-28 14:58:40 +02:00
Paul Chavard
ad24fd5991 Remove entreprise and rna_information models 2018-05-24 17:54:51 +02:00
Paul Chavard
7fb7d77886 Use aasm_state in scopes 2018-05-24 17:49:24 +02:00
Paul Chavard
6b683cc491 procedure AASM derived state 2018-05-23 16:31:27 +02:00
Paul Chavard
550ddc8d97 procedure AASM callbacks 2018-05-23 16:31:27 +02:00
Paul Chavard
9cf87d6063 procedure AASM states and events 2018-05-23 16:31:27 +02:00
Paul Chavard
94d253c6dc Add commencer/test/:procedure_path route 2018-05-23 11:32:26 +02:00
Paul Chavard
ffef1a644c procedure_path should check for test and regular procedure 2018-05-23 11:32:26 +02:00
Paul Chavard
785fe3410e Clone procedure notice 2018-05-22 17:43:44 +02:00
simon lehericey
928227a610 Procedure: remove now duplicate organisation and direction 2018-05-18 16:21:27 +02:00