Commit graph

284 commits

Author SHA1 Message Date
Martin
6000de2095 feat(manager/outdated_procedure): enhance procedure cleanup 2022-10-17 13:35:37 +02:00
Paul Chavard
eb5b9fd9e5 fix(iban): apply correct format to all ibans 2022-10-11 10:45:03 +02:00
Martin
202ae209a3 correctif(routing_criteria_name ne doit pas etre vide): ne pas oublier les procedures.routing_criteria_name ayant une chaine de caractère vide ex: ' ' 2022-10-11 10:23:38 +02:00
Martin
45459343a7 fix(procedure.clone): le clonage des procédure était bloqué car nous avions des données inconsistantes 2022-10-11 09:33:48 +02:00
Martin
285c7d704a fix(type_de_champ.data): drop former orphan from type_de_champ and champ without coordinates 2022-10-07 11:08:36 +02:00
Martin
ba1035bd30 fix(data): remove orphaned targeted_user_links 2022-10-04 13:37:53 +02:00
Martin
17ed80b18a clean(Champs::Engagement): migrate to Champs::Checkbox, some for TypeDeChamp 2022-09-27 19:09:28 +02:00
Christophe Robillard
f846393ec0 make populate_zones an after_party task 2022-09-26 16:58:53 +02:00
Martin
d9432ccd3b fix(etablissement.as_degraded_mode): backfill missing data via a cron 2022-09-23 15:12:25 +02:00
Martin
daeab50321 fix(data): backfill etablissement as degraded mode 2022-09-22 18:02:47 +02:00
Paul Chavard
3cea20c46a fix(after_party): split foreign key cleanup task 2022-09-14 11:20:35 +02:00
Paul Chavard
74c6273d17 fix(db): remove bad data 2022-09-13 12:28:04 +02:00
Martin
b9e7bdc01e fix(migration): following e764aade13 ; we still need to remove those columns otherwise destroying a procedure fails due to index on types_de_champ.revision_id 2022-08-22 16:00:56 +02:00
Colin Darie
db968a1ffc fix(db): remove DossierTransfer without email 2022-08-03 11:44:54 +02:00
Christophe Robillard
f556b39910 fix(db): remove bad attachments
destroy attachments with blobs that doesn't exist
2022-07-28 10:11:27 +02:00
Colin Darie
67d2cb2061 chore(schema): add exports#job_status
Same behavior as Archive

On destroy tous les exports existants qui n'ont pas cette notion de status.
2022-07-26 17:53:24 +02:00
Paul Chavard
e9d0ccbdf9 task(dossier): remove orphan champs 2022-07-06 13:28:00 +02:00
Martin
4ef2fe37e6 fix(20220614053743_fix_procedure_presentation_with_depose_since): missed case of procedure_presentation with Mis à jour depuis 2022-06-14 17:11:20 +02:00
Martin
56f7133799 fix(procedure_presentation): can not present a 'virtual field' like depose_since
fix(data): add migration to remove fields depose_since from existing procedure presentation
2022-06-14 09:02:37 +02:00
Paul Chavard
baad32905f fix(procedure): fix wrong parents 2022-06-01 09:33:39 +02:00
Christophe Robillard
b6d0d1a101 remove old FindDubiousProceduresJob from delayed_job table 2022-05-25 14:44:53 +02:00
Martin
863358f389 clean(data): remove old cron UpdateAdministrateurUsageStatisticsJob from delayed job table 2022-05-17 16:57:55 +02:00
Martin
7fcf566382 sentry(3002560608): some Dossier ready to be purged are missing the hidden_by_reason 2022-05-16 21:18:13 +02:00
Martin
9798e268df fix(sentry/3139111475): clean up some "corrupted" data, some dossier still have depose_at nil while en_construction_at is set 2022-05-16 13:58:50 +02:00
Paul Chavard
f5a2747af7 fix(revision): add fix_child_types_de_champ task to create join tables on repetition children 2022-05-12 12:54:18 +02:00
simon lehericey
62aecd3b2e after_party: fix wrong parent 2022-05-10 13:52:58 +02:00
Martin
75da4d8c8d Revert "migration(fix.data): when a repetable revision_types_de_champ points to a non active revision type de champs, relink it to the actuel revision_type_de_champs pointing to the stable id of its parent.type_de_champ.stable_id"
This reverts commit 19360e7aac.
2022-05-09 18:45:35 +02:00
Martin
19360e7aac migration(fix.data): when a repetable revision_types_de_champ points to a non active revision type de champs, relink it to the actuel revision_type_de_champs pointing to the stable id of its parent.type_de_champ.stable_id 2022-05-09 18:01:02 +02:00
Paul Chavard
27f9a820cc feat(dossier): add preview flag 2022-04-28 11:52:38 +02:00
Paul Chavard
90dd5bc9c5 fix(dossiers): dossier extend_conservation actually works 2022-04-08 13:40:28 +02:00
simon lehericey
c00e21adb9 after_party task which removes duplicate attestation 2022-04-05 13:01:32 +02:00
Pierre de La Morinerie
6dd742dcdf db: add a data migration to remove invalid roles
This prepares a future migration where we can add database constraints
to those roles.
2022-03-29 08:30:48 +02:00
François Vantomme
04c3739a3d fix(after_party): rescue from PG::UndefinedColumn
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column types_de_champ.procedure_id does not exist

fixes: #7036
2022-03-23 10:57:32 +01:00
François Vantomme
6a6947c064 fix(after_party): check constant presence before processing
NameError: uninitialized constant TmpDossiersMigrateRevisionsJob

refs: #7032
2022-03-22 12:07:40 +01:00
François Vantomme
a1354e7996 fix(after_party): rescue from ActiveRecord::ConfigurationError
ActiveRecord::ConfigurationError: Can't join 'TypeDeChamp' to
association named 'drop_down_list'; perhaps you misspelled it?

refs: #7030
2022-03-22 12:02:43 +01:00
François Vantomme
28f9bd62d1 fix(after_party): use find_or_create_by to respect idempotency 2022-03-17 10:10:10 +01:00
François Vantomme
021bdd4db6 fix(after_party): use find_or_create_by to respect idempotency
instead of create!
2022-03-17 10:02:43 +01:00
François Vantomme
b89541568c fix(after_party): remove APP_ENV condition 2022-03-16 17:56:06 +01:00
François Vantomme
93233be5c9 fix(after_party): add the missing second argument to send_expiration_notices method
ArgumentError: wrong number of arguments (given 1, expected 2)
app/services/expired_dossiers_deletion_service.rb:72:in `send_expiration_notices'
lib/tasks/deployment/20200401123317_process_expired_dossiers_en_construction.rake:11:in `block (2 levels) in <main>'

refs: 7028
2022-03-16 17:56:06 +01:00
Pierre de La Morinerie
1b69accd10 tasks: rename after_party task to the proper name
The name of the file must be exactly the same than the name of the
task.
2022-03-15 16:20:15 +01:00
Pierre de La Morinerie
d2f12e5188 db: copy user-related ids to the respective models 2022-03-15 15:57:22 +01:00
François Vantomme
5d448fd152 fix(export): set a random UUID key before forcing not null 2022-03-15 08:57:39 +01:00
Paul Chavard
4c567632e5 fix(migration): add with_discarded to seed_hidden_at_dossiers 2022-03-09 17:53:49 +01:00
Paul Chavard
bcbcd11c42 migrate(dossier): fill hidden_by_administration_at and hidden_by_user_at from hidden_at 2022-03-09 17:41:28 +01:00
Pierre de La Morinerie
30d7cf634a tasks: restore older after_party tasks
Turns out deleting the tasks after 6 months only may not be enough for instances deploying
only once a year, for instance.

This reverts commit 77b65f3aa0.
2022-02-22 15:39:16 +01:00
Paul Chavard
fac77d97ef task(attestation_template): reassign_redundant_attestation_templates 2022-02-11 11:30:24 +01:00
Paul Chavard
e269077c40 refactor(attestation_template): cleanup relationships 2022-02-11 08:45:32 +01:00
Paul Chavard
1fc7db2562 fix(attestation_template): fix migration task 2022-02-08 16:22:59 +01:00
François Vantomme
284483c3db fix(task): deal nicely with nil claimant_type on avis table 2022-02-08 16:14:59 +01:00
François Vantomme
c466d225e8 fix(task): deal nicely with dropped instructeur_id column on avis table 2022-02-08 16:03:58 +01:00
Paul Chavard
0ad44bcfdb
Merge pull request #6924 from adullact/fix/6882-afterparty-backfill-claimant
[AfterParty] échec de la tâche 20210311085419_backfill_claimant_id_for_experts_on_avis_table
2022-02-08 14:58:41 +01:00
Paul Chavard
a680ceba01
Merge pull request #6925 from adullact/fix/6883-afterparty-backfill-experts-procedure
[AfterParty] échec de la tâche 20210324081552_backfill_experts_procedure_id_on_avis_table
2022-02-08 14:58:11 +01:00
Paul Chavard
537112acee
Merge pull request #6926 from adullact/fix/6884-afterparty-rename-conservation-extension
[AfterParty] échec de la tâche 20210429172327_rename_conservation_extension
2022-02-08 12:00:50 +01:00
François Vantomme
eea3087ef0
fix(task): deal nicely with dropped instructeur_id column on avis table 2022-02-04 19:12:28 +01:00
François Vantomme
efe0b307a1
fix(task): reword duplicated task name 2022-02-04 18:59:56 +01:00
François Vantomme
feabae75c6
fix(task): temporary bypass ignored en_construction_conservation_extension column on Dossier 2022-02-04 18:51:29 +01:00
François Vantomme
ab06ec2887
fix(task): deal nicely with dropped tmp_expert_migrated column on avis table 2022-02-04 18:46:16 +01:00
Paul Chavard
ff806782de feat(attestation): migration task to revise attestations 2022-01-19 18:00:37 +01:00
Christophe Robillard
84c648eef0 manual task for populating zones 2021-12-15 19:37:32 +01:00
Paul Chavard
a5b3bc1e79 fix(task): fix scope in set_dossiers_processed_at 2021-12-07 16:15:43 +01:00
Paul Chavard
612b3bd82d fix(task): use dossier.read_attribute instead of direct read 2021-12-07 13:36:59 +01:00
Paul Chavard
5e0f8a5816 task(type_de_champ): migrate type_de_champ parent_id 2021-12-06 21:45:54 +01:00
Martin
1bb868714c fix(spec/lint/review): lint and fix spec of previous commits, also fix based on tchak feedback 2021-12-06 07:05:17 +01:00
Martin
ce87878ff0 refactor(traitement.process_expired): move process expired to procedure 2021-12-03 16:32:36 +01:00
Christophe Robillard
5b8d872b6e populate zones 2021-12-02 19:16:11 +01:00
Pierre de La Morinerie
65c1966dc2 lib: fix after_party task name 2021-11-30 15:51:25 +01:00
Pierre de La Morinerie
103502931a tasks: populate Instructeur.bypass_email_login_token again
The task was run once in April 2021, but the new features enabled since
have not been synchronized.
2021-11-30 13:41:25 +01:00
Paul Chavard
68f6c01548 task(traitements): add depose_at to existing dossiers 2021-11-25 12:57:55 +03:00
Paul Chavard
18808358f9 fix(dossiers): add processed_at to processed dossiers 2021-11-11 09:37:09 +01:00
Paul Chavard
70c33afcfe fix(avis): remove avis without dossier 2021-10-06 18:10:55 +02:00
Pierre de La Morinerie
9741108094 lib: remove the 'migrated' key on filters
In a9a4f6e2a8, a task to migrate
ProcedurePresentation's filters was added.

This task added a "migrated: true" key to all migrated filters.

Now that this task has run, we can safely remove the extra key.

In a previous version of this commit, the migration would fail for
invalid ProcedurePresentation records. This is now fixed.
2021-08-24 08:42:22 -05:00
Pierre de La Morinerie
6475cdff7a
Revert "Suppression de la clef "migrated": true sur les filtres des ProcedurePresentation" 2021-07-23 09:26:13 +02:00
Pierre de La Morinerie
fd74d9a062 lib: remove the 'migrated' key on filters
In a9a4f6e2a8, a task to migrate
ProcedurePresentation's filters was added.

This task added a "migrated: true" key to all migrated filters.

Now that this task has run, we can safely remove the extra key.
2021-07-20 16:51:32 +02:00
Paul Chavard
a0d4c9d54c Fix published revisions 2021-06-03 13:11:16 +02:00
Paul Chavard
55080706ce Convert geo_areas properties to jsonb 2021-05-24 11:57:00 +02:00
Paul Chavard
109e5e74b2 Use interval string representation 2021-05-11 15:29:41 +02:00
Paul Chavard
58a90eb4a6 fix update_all query 2021-05-11 14:53:41 +02:00
Paul Chavard
4a874a282c Add progress report 2021-05-11 14:08:51 +02:00
Paul Chavard
d0fe78351e Update lib/tasks/deployment/20210429172327_rename_conservation_extension.rake
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-05-11 14:08:51 +02:00
Paul Chavard
e1b3ea122c Update lib/tasks/deployment/20210429172327_rename_conservation_extension.rake
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-05-11 14:08:51 +02:00
Paul Chavard
1e0d6ea28f Rename en_construction_conservation_extension to conservation_extension 2021-05-11 14:08:51 +02:00
Pierre de La Morinerie
77b65f3aa0 tasks: remove older after_party tasks 2021-05-06 15:19:37 +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
Paul Chavard
88db6fb661 rename en_construction_conservation_extension in conservation_extension 2021-04-29 19:50:30 +02:00
simon lehericey
c683fad3f3 [#6084] add after_party task to fill missing data 2021-04-13 09:59:28 +02:00
simon lehericey
dbb1acbd75 add after_party task to populate bypass_email 2021-04-13 09:43:38 +02:00
kara Diaby
fdc6521d02 After party task to backfill experts_procedure_id on avis table 2021-03-24 09:23:26 +01:00
kara Diaby
81d4db2afc backfill missing experts_procedure_id on avis table 2021-03-23 15:15:34 +01:00
kara Diaby
1c134fdf09 after party task to clean existing data on avis table 2021-03-22 15:29:28 +01:00
kara Diaby
2325023b1a after party task to fill claimant_type on avis table 2021-03-18 11:38:52 +01:00
Paul Chavard
24138f4d2f fix n+1 on remove_invalid_geometries after_party 2021-03-16 18:25:14 +01:00
Paul Chavard
c37feba8d1 Remove invalid geo areas 2021-03-11 15:51:09 +01:00
kara Diaby
53ba442235 fix after party task 2021-03-10 09:04:23 +01:00
kara Diaby
6383e6b9e7 Revert "Revert "Claimant type to avis table""
This reverts commit f4fd220d43.
2021-03-10 08:48:55 +01:00
Kara Diaby
f4fd220d43
Revert "Claimant type to avis table" 2021-03-09 13:40:10 +01:00
kara Diaby
0870ebfd90 After party backfill claimant type on avis table 2021-03-09 10:15:19 +01:00
Pierre de La Morinerie
150ddab660 zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
kara Diaby
b39d9d41f0 Add afterparty task to create experts from instructeurs after deploy 2021-01-22 14:31:02 +01:00
simon lehericey
e9e91037fc add task to skip content type validation for old pj 2021-01-18 14:07:35 +01:00
Paul Chavard
f33544f067 Fix type_de_champ repetition revision after clone
fix #5769
2021-01-12 10:57:34 +01:00
Paul Chavard
d2bcbaa180 Fix stable filters migration 2020-12-17 17:10:56 +01:00
Paul Chavard
a9a4f6e2a8 Add migration task to use stable_id in filters 2020-12-17 10:51:09 +01:00
simon lehericey
0be246c86b add after_party task to setup stats 2020-10-06 16:12:01 +02:00
Paul Chavard
f71d2a608e Fix MultiLineString geometries 2020-09-22 09:12:55 +02:00
Paul Chavard
5ad31518dc improuve fix geo areas geometry task 2020-08-13 16:00:17 +01:00
Paul Chavard
970aa627d2 Fix geo areas with GeometryCollection or MultiPolygon 2020-08-13 12:50:35 +01:00
Paul Chavard
6709b9ed20 Fix cloned revisions task 2020-07-28 17:10:12 +02:00
Paul Chavard
bc09b61684 Add migration service and task 2020-07-21 19:35:30 +02:00
clemkeirua
96e82c75d6 use more idiomatic update 2020-07-15 09:00:12 +00:00
clemkeirua
c93d17bcaa add rake task to update typedechamp 2020-07-15 09:00:12 +00:00
Pierre de La Morinerie
c41afc425e tasks: remove old after_party tasks
Fixes a task that since became invalid:

> NameError: uninitialized constant SeekAndDestroyExpiredDossiersJob
> /lib/tasks/deployment/20191203142402_enable_seek_and_destroy_job
2020-07-09 18:18:09 +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
Paul Chavard
38718cd5b4 Add DropDownList migration task 2020-06-25 13:14:17 +02:00
Paul Chavard
c4896b45ad Prepare to remove dossier procedure_id 2020-06-11 16:13:44 +02:00
Paul Chavard
cbe7249b67 Fix remaining etablissements with shared dossier 2020-05-28 16:54:58 +02:00
Christophe Robillard
a923215139 fix fix champ etablissement 2020-05-27 18:46:04 +02:00
Christophe Robillard
35458761da fix champ etablissement 2020-05-27 18:04:56 +02:00
Paul Chavard
f0148184ca Remove legacy carto code 2020-05-13 12:17:04 +02:00
Paul Chavard
0d628bb96b Task to split GeoArea with selection utilisateur in multiple polygons 2020-04-15 18:07:09 +02:00
Paul Chavard
afc76f3066 Only run process expired dossiers task on production servers 2020-04-09 11:19:58 +02:00
Paul Chavard
d810fdf474 Process expired dossiers en construction 2020-04-09 11:19:58 +02:00
Paul Chavard
60cb9bcf09 Remove brouillons deleted dossiers 2020-03-31 16:54:33 +02:00
maatinito
d56635ebb1 removed obsolete after_party tasks
They no longer work on fresh database
2020-03-18 12:46:35 +01:00
kara Diaby
5dc5230791 Step1 : add new column to Assign_tos and make sure that the data is saved on form submit 2020-02-20 16:14:56 +01:00
Paul Chavard
1cd913913a Fix old tasks 2020-02-13 12:32:18 +01:00
Paul Chavard
a3cf7fce3a Remove old (< 2019) migration tasks 2020-02-13 11:42:11 +01:00
Pierre de La Morinerie
1448d5b098 models: add a Procedure#with_hidden scope, and remove unscoped usages
This avoids the broad use of `unscoped` to remove the `hidden_at`
clause.
2020-01-28 17:32:38 +01:00
simon lehericey
ce7ab89934 Add purge stale export job 2019-12-18 13:13:15 +01:00
simon lehericey
508ba8f116 Add seek_and_destroy_expired_dossier 2019-12-03 17:18:53 +01:00
Paul Chavard
ee7df3d5cf Migrate procedures archivee to close 2019-11-28 16:07:14 +01:00
Pierre de La Morinerie
669f21d1d8 tasks: replace puts by rake_puts
It avoids tasks logs to clutter the tests output.
2019-10-08 16:54:57 +02:00
simon lehericey
725798da6a [fix #4361] Update user table sign_in 2019-10-08 10:09:16 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
Paul Chavard
e975e2a0aa Add an active_storage attachmens rename task 2019-09-10 10:49:12 +02:00
simon lehericey
875313e01e add defaut groupe instructeur to hidden procedure 2019-09-09 13:41:08 +02:00
clemkeirua
47255175a2 fix rake task for linking dossier and groupe_instructeur 2019-09-09 09:55:44 +02:00
simon lehericey
3ead6bde9d AfterParty: link dossier and groupe_instructeur 2019-09-03 06:51:38 +02:00
simon lehericey
a0555bc820 Remove obsolete tasks 2019-09-03 06:47:02 +02:00
simon lehericey
97884c4349 Link AssignTo et GroupeInstructeur 2019-09-02 11:41:12 +02:00
simon lehericey
115d91387c A procedure has a default groupe instructeur 2019-09-02 11:41:12 +02:00
simon lehericey
bf3dd319c1 Task: catch various exception 2019-08-20 14:37:35 +02:00
Nicolas Bouilleaud
e27fbf1a95 Remove nonworking after_party rake tasks
These tasks mention symbols that have been renamed or removed. (Gestionnaire, Procedure.administrateur (single), or VirusScan.)

They won’t be run again.

I guess some (most) of the other after_party and rake tasks could be removed too; it’s just that those prevent `rake after_party:run` to execute on a clean install.
2019-08-20 14:01:38 +02:00
simon lehericey
77c11d8b79 fix_procedure_presentation 2019-08-20 11:28:18 +02:00
simon lehericey
65d862b59d Populate the column 2019-08-14 15:06:15 +02:00
simon lehericey
766d1ce51c Populate the column 2019-08-13 15:15:16 +02:00
Paul Chavard
586141a596 Add selection_utilisateur geo_area to all champs carte with value 2019-08-01 11:38:09 +02:00
Nicolas Bouilleaud
b066ccbc89 Make sure Procedure.path is not null in our data 2019-07-29 13:53:33 +02:00
Mathieu Magnin
d13b7f953f Migrate mail body to ActionText 2019-07-03 13:15:49 +02:00
Paul Chavard
fb0ef15e3c Export dossiers v2 2019-07-02 14:20:29 +02:00
Paul Chavard
46c1bbbc6f Official support for declarative demarches 2019-07-02 14:12:26 +02:00