Commit graph

20 commits

Author SHA1 Message Date
Martin
72a3f6e89c refactor(export/archives): holds user profile asking for the archive or export 2024-02-16 11:23:38 +01:00
Colin Darie
428b869181
fix(exports): display exact number of dossiers count at time generation 2023-10-09 11:23:16 +02:00
Colin Darie
640f729413
feat(exports): persist instructeur requestor & dossiers count 2023-10-09 11:23:15 +02:00
Colin Darie
d4198869fb
chore(exports): dropdown menu re-uses the same pending export or create a fresh one
Pour permettre d'avoir des données fraiches dans un export tout
en conservant l'historique des exports,
la demande d'export depuis le menu créé toujours un nouvel export sauf:
- si un autre export identique est déjà en préparation
- si un autre export identique s'est terminé il y a moins de 5 minutes

Co-Authored-By: Lisa Durand <lisa.c.durand@gmail.com>
2023-09-28 15:23:31 +02:00
Colin Darie
ec46faf690
fix(exports): don't duplicate exports when belonging to multiple groupe instructeurs 2023-09-28 12:35:24 +02:00
Colin Darie
82dd05c189
chore(exports): finders by groupe instructeurs compatible across exports components
Co-Authored-By: Lisa Durand <lisa.c.durand@gmail.com>
2023-09-28 12:35:07 +02:00
Paul Chavard
0c0618aa79 feat(export): add GeoJSON export 2022-11-18 10:04:35 +01:00
Martin
fb73838bb8 bug(export.global): Export.find_for_groupe_instructeurs devrait remonter les exports globaux 2022-10-31 14:32:17 +01:00
Martin
cf51be85e0 bug(export): la creation d'une archive avec un filtre different devrait etre effective, ce n'est pas le cas 2022-10-31 09:29:27 +01:00
Martin
c921e6e1ee fix(ProcedureExportService): downloadable_sorted_batch is scoped by export, no need to re-filter them via downloadablable_sorted_batch otherwise export for supprimes_recemment does not includes dossier.supprimes_recemment 2022-10-10 11:11:21 +02:00
Colin Darie
f1957e51f8 fix(exports): purge stuck (pending) exports, not generated or failed
Avec l'autre PR, ça reproduit le comportement d'avant, c'est à dire
que quoiqu'il arrive un export est purgé :
- soit 16h après sa génération (on a 16h pour le télécharger)
- soit 12h après sa création, et qu'il est bloqué

Auparavant, tous les exports étaient purgés au bout de 3h quelle que soit
le statut.
2022-07-27 15:26:59 +02:00
Colin Darie
6845b2ed08 fix(export): fix PurgeStaledExportsJob regression with stale scope
cc #7547
2022-07-26 14:26:22 +02:00
Martin
bf277d4802 bug(export): expect dossiers_for_export not to include dossiers brouillon
fix(export.dossiers_for_export): add missing visible_by_administration
2022-05-10 16:09:12 +02:00
Paul Chavard
d14e132305 feat(export): add zip format support 2022-04-12 14:54:54 +02:00
Paul Chavard
e82dc9c8b5 feat(exports): add ability to create exports with filters 2022-04-06 17:08:38 +02:00
Paul Chavard
f238710044 Add last_month export 2021-06-23 09:23:10 +02:00
simon lehericey
8b73d8804c fetch all exports at once by groupe_instructeurs_ids 2021-04-29 11:23:41 +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
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
simon lehericey
d0939ae1a4 Add Export Model 2019-12-18 13:13:15 +01:00