Commit graph

12617 commits

Author SHA1 Message Date
kara Diaby
5b7b2d4966 change routes 2021-04-06 10:38:46 +02:00
kara Diaby
f4acc83269 change procedures controller 2021-04-06 10:38:46 +02:00
Pierre de La Morinerie
4d00aea7b3
Merge pull request #6045 from betagouv/cleanup-inverse-relationships
Nettoyage de la relation inverse Dossier ↔︎ Champs (#6045)
2021-04-06 10:34:45 +02:00
Pierre de La Morinerie
3499f5af9a models: remove invalid Dossier ↔︎ Champ inverse relationship
`Dossier.champs` is not really an inverse of `Champs.dossier`: when a
Champ record is created, it should not always be added to dossier.champs
(for instance if the champ is private).

NB: this breaks the workaround we added in #3907 to fix the parent
dossier not being touched in some cases (the workaround was to add an
inverse relationship, but we now have to remove it).

The new workaround is to watch for `changed_for_autosave?` on champs.
Unlike `changed?`, `changed_for_autosave?` also detects changes to
attachments. This allows us to touch both `last_champ_updated_at` and
`updated_at` in a single pass.
2021-04-06 10:26:17 +02:00
Pierre de La Morinerie
6eadcf614d spec: improve the dossier_controller timestamp specs
Make the specs clearer, and better test the various timestamps.
2021-04-06 10:26:17 +02:00
Pierre de La Morinerie
fc4d8362dc models: fix typo in comments 2021-04-06 10:26:17 +02:00
Pierre de La Morinerie
79d6ac18f0
Merge pull request #6048 from tchak/make-export-key-not-null
Migration : ajout d'une contrainte 'NOT NULL' sur la colonne exports#key
2021-04-06 09:59:37 +02:00
Paul Chavard
7f3d4a26ad Make exports#key not-null 2021-04-02 17:42:24 +01:00
Paul Chavard
bc48d7043f
Merge pull request #6047 from betagouv/main
2021-04-02-01
2021-04-02 15:46:39 +01:00
Paul Chavard
fc49b7952e
Merge pull request #6046 from tchak/fix-pdf-rendering
Améliore le rendu des dossiers en PDF
2021-04-02 15:37:23 +01:00
Paul Chavard
ac17352693 Improuve generated dossier PDF 2021-04-02 14:22:59 +01:00
Paul Chavard
91c84d13b3
Merge pull request #6042 from tchak/improuve-exports
Simplify export unicity check and use create_or_find_by
2021-04-02 09:56:29 +02:00
Paul Chavard
fd48b86b7f Simplify export unicity check and use create_or_find_by 2021-04-01 21:14:16 +01:00
Pierre de La Morinerie
b0e38f366e
Merge pull request #6044 from betagouv/bump_and_remove_mimemagic_deps
Maj de rails 6.3.1 et calcxls pour enlever mimemagic dep, maj skylight
2021-04-01 15:12:47 +02:00
simon lehericey
43f0a4ba48 update caxlsx (remove mimemagic dep) 2021-04-01 11:57:16 +02:00
simon lehericey
19bc60c555 update rails to 6.1.3 (remove mimemagic dep) 2021-04-01 11:57:16 +02:00
simon lehericey
f6564ddc66 update skylight 2021-04-01 11:57:16 +02:00
simon lehericey
5b69e087c7 fix sentry test 2021-04-01 11:57:16 +02:00
Pierre de La Morinerie
7edce745eb
Merge pull request #6040 from betagouv/dependabot/npm_and_yarn/y18n-4.0.1
Mise à jour de y18n de 4.0.0 à 4.0.1
2021-03-30 19:46:29 +02:00
dependabot[bot]
5e7804d52f
Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 16:16:14 +00:00
Pierre de La Morinerie
ea53566594
Merge pull request #6039 from betagouv/update-accessibilite-link
Mise à jour de la déclaration d'accessibilité (#6039)
2021-03-30 15:59:05 +02:00
Christophe Robillard
dbfc878bf5 supprime la page accessibilité 2021-03-30 15:12:18 +02:00
Christophe Robillard
d89dc785f0 met à jour le lien de bas de page Accessibilité
Ce lien pointe désormais vers notre site de documentation
2021-03-30 15:08:20 +02:00
Pierre de La Morinerie
5bc40595c6
Merge pull request #6035 from betagouv/last-part-of-active-storage-migration
Base de donnée : ajout d'une contrainte 'not null' sur la colonne `service_name` de la table `active_storage_blobs` (#6035)
2021-03-30 13:02:39 +02:00
Pierre de La Morinerie
e865a894f2 db: add last part of ActiveStorage::Blob migration
On DS, we split the ActiveStorage schema migration from Rails 6.1 into two migrations:
1. one for adding the column and filling the data asynchronousely
2. one for marking the column as non-null

This is the second part of this migration: it marks the column as non-null.
2021-03-30 12:54:13 +02:00
Pierre de La Morinerie
b4f8ffb748
Merge pull request #6034 from betagouv/db-cleanup
Correction de modifications mineures oubliées lors de mises à jour précédentes de la base de donnée (#6034)
2021-03-30 12:52:01 +02:00
Pierre de La Morinerie
dd9c3c3fbd db: fix missing change in schema 2021-03-30 10:46:17 +02:00
Pierre de La Morinerie
798b4a65cc models: fix db structure comment in etablissement.rb
The column is not removed yet, but it is ignored.
2021-03-30 10:45:31 +02:00
LeSim
d9ca8798af
Merge pull request #6033 from betagouv/main
2021-03-29-02
2021-03-29 22:38:44 +02:00
LeSim
edbb5c325d
Merge pull request #6031 from betagouv/fix_deployment
Répare le déploiement (maj mimemagic et test du fichier i_am_a_webserver)
2021-03-29 18:55:48 +02:00
simon lehericey
5624e87867 add webserver file logic 2021-03-29 18:45:40 +02:00
simon lehericey
c5bcf62d09 update mimemagic 2021-03-29 18:45:40 +02:00
simon lehericey
d8cb52efa8 remove unused debase 2021-03-29 18:45:40 +02:00
Kara Diaby
667880db9e
Merge pull request #6030 from betagouv/main
2021-03-29-01
2021-03-29 11:10:57 +02:00
Kara Diaby
95931bea50
Merge pull request #6029 from betagouv/back-avis-btn
Ajoute l'onglet avis sur l'interface instructeur
2021-03-29 10:26:14 +02:00
kara Diaby
4fc4e19ee6 Ajoute l'onglet avis sur l'interface instructeur, qui renvoie vers le profil expert 2021-03-27 17:00:19 +01:00
Pierre de La Morinerie
9b9e744fcc
Merge pull request #6022 from tchak/fix-export-n+1
Instructeur : amélioration des performances de l'export des dossiers (#6022)
2021-03-25 19:49:23 +01:00
Paul Chavard
23104f15a4 Fix export n+1 queries 2021-03-25 19:22:12 +01:00
Pierre de La Morinerie
a19107ef7e
Merge pull request #6026 from betagouv/main 2021-03-25 19:17:09 +01:00
Pierre de La Morinerie
c68b20b1d3
Merge pull request #6025 from betagouv/fix-active-storage-migration
Correction de la migration ActiveStorage incluse dans le passage à Rails 6.1 (#6025)
2021-03-25 19:07:18 +01:00
Pierre de La Morinerie
a08c18eb81 db: fix ActiveStorage migration to Rails 6.1
1. Executing an `update_all` on a lot of records is slow. Instead we
backfill the column in batches (without locking the table).

2. We can't mark the colum as not-null, because already running
instances still using the old code will not use the service_name
column yet.

  A later migration will backfill the remaining data and make the column
non-null.
2021-03-25 18:08:29 +01:00
Pierre de La Morinerie
9f11bbaae1
Merge pull request #6023 from betagouv/main 2021-03-25 15:27:59 +01:00
Pierre de La Morinerie
703f13c34d
Merge pull request #6020 from betagouv/sentry-version-number
CI : envoie le tag de version à Sentry (au lieu du SHA1) (#6020)
2021-03-25 14:57:04 +01:00
Pierre de La Morinerie
1a35ba1906 ci: use the tag (2021-09-12) for Sentry releases
Previously the commit sha1 was used, which was harder to read.
2021-03-25 14:47:46 +01:00
Pierre de La Morinerie
d9ff621e4a
Merge pull request #5955 from betagouv/rails-6.1
Mise à jour vers Rails 6.1 (#5955)
2021-03-25 13:32:59 +01:00
Pierre de La Morinerie
f6f013e87f specs: fix Avis query in specs 2021-03-25 13:24:53 +01:00
Pierre de La Morinerie
3f3d6ae399 controllers: use template: rather than file: to render PDFs
ActionView now throws an error if a relative path is used with `file:`.
2021-03-25 13:24:53 +01:00
Pierre de La Morinerie
185c74d891 dossier: fix SQL deprecation error
ActiveRecord 6.1 disallows passing strings to the `order()` function, to
prevent SQL injections.

Here we know that the order string is safe: `ts_vector` is constant,
and `ts_query` is properly escaped.

Wrap the SQL fragment in Arel.sql to bypass the error.
2021-03-25 13:24:53 +01:00
Pierre de La Morinerie
21356e42b8 specs: remove unused require 2021-03-25 13:24:53 +01:00
Pierre de La Morinerie
305a312815 db: migrate ActiveStorage to Rails 6.1 2021-03-25 13:24:53 +01:00