Commit graph

493 commits

Author SHA1 Message Date
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
Pierre de La Morinerie
38c4da2deb lib: document ProgressReport usage 2021-07-20 16:51:32 +02:00
Pierre de La Morinerie
fda59c9231 lib: remove outdated tasks 2021-07-20 15:34:31 +02:00
Christophe Robillard
55efe367bf percentile returns always an integer 2021-06-17 16:31:53 +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
Pierre de La Morinerie
872f6b0153 lib: add migration helpers for making a column unique 2021-04-13 18:09:59 +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
Pierre de La Morinerie
1cb430a87a lib: remove unused AttestationClosedMailDiscrepancyMailer 2021-03-19 07:57:56 +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
b0735aafe0 config: fix DynamicSmtpSettingsInterceptor warning again
This warning re-appeared when running mailer tests:

```
DISABLE_SPRING=1 bin/rspec spec/mailers/administration_mailer_spec.rb
```

It is now fixed properly, in a way recommanded by the documentation.
2021-03-04 22:52:19 +01:00
Paul Chavard
a03d812d19 Add github actions CI 2021-02-23 10:35:30 +01:00
Pierre de La Morinerie
819325c761 zeitwerk: move our Array extension to initializers/core_ext 2021-02-11 12:30:43 +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
Christophe Robillard
b4256f9560 add rake task for importing instructeurs from csv
Co-authored-by: sim <mail@simon.lehericey.net>
2021-01-20 15:03:17 +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
Paul Chavard
ce0c50fbec remove eclint
eclint is dead https://github.com/jedmao/eclint/issues/226#issuecomment-689193653
2020-12-10 13:11:02 +01:00
simon lehericey
3894bfd3a6 fix cron namespace 2020-12-08 15:21:35 +01:00
Christophe Robillard
2ee5b1f6cb fix superadmin rake 2020-11-05 18:56:03 +01:00
Christophe Robillard
3fdb045356 create a superadmin account
rake task create a superadmin account, and send
reset password instructions
2020-11-05 16:03:55 +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
simon lehericey
15d967439e Remove host references from public sources 2020-08-12 15:10:08 +00:00
Christophe Robillard
f2dcb61521 transform job in task for set dossiers_last_updated_at 2020-08-12 16:10:15 +02:00
Pierre de La Morinerie
e6d8581b06 app: add annotate
Annotations will be generated only for models, and sorted (to avoid differences
depending on the order in which migrations are ran).

The annotations will be automatically updated every time `rails db:migrate`
is run on a development environment.
2020-08-12 11:45:53 +02:00
Paul Chavard
6709b9ed20 Fix cloned revisions task 2020-07-28 17:10:12 +02:00
clemkeirua
602d91f232 fix haml linter declaration
This is necessary in order to boot delayed_job -_-
Without this, it attempts to inherit a missing class
2020-07-28 09:42:30 +02:00
clemkeirua
52548d7646 ajout du nom d'application dans les mailers 2020-07-23 16:17:52 +02:00
clemkeirua
03864f60cf added a custom rubocop linter in order to avoid hardcoding application name 2020-07-23 16:17:15 +02:00
clemkeirua
4cfe41ce25 added a custom haml linter in order to avoid hardcoding application name 2020-07-23 16:16:36 +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
Judith
235a406295 Spectral removed and replaced by Marianne-thin 2020-06-24 13:11:04 +00:00
Judith
1b767b8250 Spectral Italic (Regular) added 2020-06-24 13:11:04 +00:00
Judith
6390cb1300 Marianne fonts -regular, -bold and -thin added 2020-06-24 13:11:04 +00:00
Pierre de La Morinerie
b05798b305 mina: fix rollback
Attempt to fix some requests failing in production during a rollback,
probably due to an incorrectly restarted server.
2020-06-23 15:09:08 +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
Pierre de La Morinerie
77ab7d1462 tasks: add a rollback task 2020-05-18 12:59:12 +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
6dc1f3e2c4 Use human readable expressions instead of cron gibberish
https://github.com/floraison/fugit#fugitnat
2020-04-07 12:44:58 +02:00
Paul Chavard
60cb9bcf09 Remove brouillons deleted dossiers 2020-03-31 16:54:33 +02:00
Paul Chavard
5005c54891 Add base cron job 2020-03-31 12:25:46 +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
cbaa584bd0 lint: improve Rubocop detection
Instead on relying on the environment, we try to load the Rubocop cop
only if Rubocop is currently loaded.
2020-02-03 11:09:11 +01:00
clemkeirua
eb20dd9153 only load unscoped custom rule in development 2020-01-30 15:23:21 +01:00
Pierre de La Morinerie
cf101d64d8 lint: add a Rubocop rule to forbid the use of unscoped
`unscoped` often has an effect broader than intended. For instance:

```
user.dossiers.unscoped.destroy_all
```

will not destroy all the user's dossier, including the hidden ones,
but **all the dossiers of all users**.

Instead, narrower unscoping should be used:

```
user.dossiers.unscope(where: :hidden).destroy_all
```

(Or even better, use the new `Dossier.with_hidden` scope).
2020-01-28 17:32:38 +01:00
Pierre de La Morinerie
96932faa3f models: add a Dossier#with_hidden scope, and remove unscoped usages 2020-01-28 17:32:38 +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
Christophe Robillard
0f881f942b raise if trying to del a user who can't be deleted 2020-01-13 10:06:43 +01:00
Christophe Robillard
c72ce977f7 refactor delete_user_account task 2020-01-13 10:06:43 +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
Paul Chavard
fe84e8e0f7 Remove carrierwave 2019-11-12 15:26:18 +01:00
simon lehericey
3c5eaed2f3 Add web3 and web4 2019-10-16 10:58:54 +02: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
d2fdaacb5d Add Api::V2::Schema 2019-09-24 10:47:21 +02:00
Paul Chavard
8fcf1353f3 Remove duplicated attachments 2019-09-17 18:12:53 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00