Commit graph

63 commits

Author SHA1 Message Date
Damien Le Thiec
0131a41266
Merge branch 'main' into feature/add_rna_type_de_champs 2022-10-05 12:38:24 +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
Christophe Robillard
bc5ea8e906 update zones with new government 2022-09-26 16:58:53 +02:00
Damien Le Thiec
2791871c9a Clean exports tests 2022-09-21 15:56:01 +02:00
Paul Chavard
e9d0ccbdf9 task(dossier): remove orphan champs 2022-07-06 13:28:00 +02: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
77e42dd0e2 Update spec/lib/tasks/deployment/20220112184331_revise_attestation_templates_spec.rb
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2022-02-08 16:22:59 +01:00
Paul Chavard
1fc7db2562 fix(attestation_template): fix migration task 2022-02-08 16:22:59 +01:00
Christophe Robillard
f9609b0b0b fix zone specs
by reenabling task before the next spec is run
2021-12-23 09:58:31 +01:00
Christophe Robillard
822c754581 add namespace for populate_zones task 2021-12-16 17:20:06 +01:00
Christophe Robillard
84c648eef0 manual task for populating zones 2021-12-15 19:37:32 +01:00
Christophe Robillard
5b8d872b6e populate zones 2021-12-02 19:16:11 +01: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
Pierre de La Morinerie
fda59c9231 lib: remove outdated tasks 2021-07-20 15:34:31 +02:00
Pierre de La Morinerie
77b65f3aa0 tasks: remove older after_party tasks 2021-05-06 15:19:37 +02:00
simon lehericey
ed404f129b remove now falling spec of obsolete task 2021-05-05 14:28:20 +02:00
simon lehericey
c683fad3f3 [#6084] add after_party task to fill missing data 2021-04-13 09:59:28 +02:00
Pierre de La Morinerie
150ddab660 zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
Paul Chavard
d2bcbaa180 Fix stable filters migration 2020-12-17 17:10:56 +01: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
Paul Chavard
c4896b45ad Prepare to remove dossier procedure_id 2020-06-11 16:13:44 +02:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Paul Chavard
1ce1c1e6d0 use discard 2020-02-13 12:31:59 +01:00
Paul Chavard
a3cf7fce3a Remove old (< 2019) migration tasks 2020-02-13 11:42:11 +01:00
simon lehericey
8ae592fe25 [fix #4361] administrateur active 2019-10-24 18:32:48 +02:00
simon lehericey
725798da6a [fix #4361] Update user table sign_in 2019-10-08 10:09:16 +02:00
Paul Chavard
5a7eb734ff Dump graphql schema for reference 2019-09-24 10:47:21 +02:00
Paul Chavard
7ffb98e616 Remove carrierwave uploaders 2019-09-10 10:49:12 +02:00
simon lehericey
b9f35a9763 ensure that the task is idempotent 2019-09-09 14:08:09 +02:00
simon lehericey
875313e01e add defaut groupe instructeur to hidden procedure 2019-09-09 13:41:08 +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
eb75a563b8 Fix old after_party spec 2019-09-02 11:41:12 +02:00
Paul Chavard
079ffadfce Attestation files migration task 2019-08-27 17:43:06 +02:00
Paul Chavard
d02e0fc556 Fix and test migrate_procedure_logo task 2019-08-22 11:28:03 +02:00
simon lehericey
77c11d8b79 fix_procedure_presentation 2019-08-20 11:28:18 +02:00
Paul Chavard
e9ba7700d4 Remove commentaire file uploader 2019-08-20 10:24:13 +02:00
Pierre de La Morinerie
6459e9cf37 tasks: fix the commentaires migration task to work with hidden dossiers
By default `commentaire.dossier` doesn't return the dossier if it is
hidden.
2019-08-01 15:43:09 +02:00
Pierre de La Morinerie
e975fe4ade tasks: remove task to migrate old pieces justificatives 2019-07-30 16:11:17 +02:00
Paul Chavard
be3283a9a8 Add commentaire pj migration task 2019-07-10 15:35:29 +02:00
Mathieu Magnin
d13b7f953f Migrate mail body to ActionText 2019-07-03 13:15:49 +02:00
Pierre de La Morinerie
0b49e61ec0 tasks: repair updated_at of dossiers wrongly touched by PJ migration
When running the PJ migration task, migrated dossiers have their
updated_at attribute modified.

This means a yellow notification badge pops up on the Instructeurs
pages.

This PR repairs the affected dossiers, by restoring an approximative
updated_at from the latest workflow value (or the timestamp of the
migrated champ).
2019-06-06 11:11:29 +02:00
Pierre de La Morinerie
60121a1be6 task_helper: ensure that incrementing above 100% doesn’t raise an error 2019-05-29 12:06:32 +02:00
Pierre de La Morinerie
4cf54e0d28 tasks: add progress report to the pjs migration task
Progress is indicated per migrated champ.
2019-05-28 10:42:18 +02:00