Commit graph

14337 commits

Author SHA1 Message Date
maatinito
9df0d98109 Fix csv download of stats
https://medium.com/@mitsun.chieh/activerecord-relation-with-raw-sql-argument-returns-a-warning-exception-raising-8999f1b9898a
2021-12-10 16:48:11 +01:00
Paul Chavard
58adcf14e4
Merge pull request #6741 from tchak/fix-bulk_messages_groupe_instructeurs
fix(bulk_messages): destroy bulk messages with procedures
2021-12-09 16:20:43 +01:00
Paul Chavard
c7b1dc7f87 fix(bulk_messages): destroy bulk messages with procedures 2021-12-09 16:16:40 +01:00
Pierre de La Morinerie
14af63d32f
Merge pull request #6742 from betagouv/main 2021-12-09 13:11:33 +01:00
Paul Chavard
78784d1c62
Merge pull request #6740 from betagouv/fix-instructeur-daily-notifications
Correction de la requête de notification quotidienne des Instructeurs
2021-12-09 12:21:56 +01:00
Pierre de La Morinerie
0e35bc609d notifications: don't preload dossiers on instructeurs
This request currently times out almost every night in production.

It's because although Instructeurs are loaded in batches (default batch
size is 1000), loading all dossiers for 1000 instructeurs is slow.

Turns out the code executed after this query to compute notifications
doesn't even use these dossiers. Indeed it is faster not to preload
them: both the initial query and the total treatment time are shorter.

Here's a quick benchmark made locally (but using production data):

- Before this commit:

	Benchmark.measure { pp Instructeur.includes(assign_to: { procedure: :dossiers }).where(assign_tos: { daily_email_notifications_enabled: true }).limit(100).m
ap(&:email_notification_data) }

Only the initial query : 35s
Total time : 97s

- Without preloading dossiers:

	Benchmark.measure { pp Instructeur.includes(assign_to: :procedure).where(assign_tos: { daily_email_notifications_enabled: true }).limit(100).m
ap(&:email_notification_data) }

Only the initial query : 0.08s (400x faster)
Total time : 29s (3,3x faster)

Plus it doesn't timeout, of course.
2021-12-09 12:10:00 +01:00
Paul Chavard
0a96e2f5a0
Merge pull request #6739 from tchak/feat-helpscout-tags
feat(helpscout): add a tag to messages submited through contact form
2021-12-09 12:00:40 +01:00
Paul Chavard
b67818e425 feat(helpscout): add a tag to messages submited through contact form 2021-12-09 11:47:13 +01:00
Paul Chavard
a0ce6fa388
Merge pull request #6738 from tchak/fix-graphql-nil-attestation
fix(graphql): do not crash if attestation is nil
2021-12-08 13:24:18 +01:00
Paul Chavard
efd8ddb99e fix(graphql): do not crash if attestation is nil 2021-12-08 13:12:42 +01:00
LeSim
dd380530ea
Merge pull request #6709 from betagouv/small_wording_fixes
Petites corrections textuelles
2021-12-08 11:25:29 +01:00
simon lehericey
3bdf6b63d9 small wording fixes 2021-12-08 11:19:30 +01:00
LeSim
afea30b9c9
Merge pull request #6733 from betagouv/zone-wording
Introduit dès à présent le concept de zone à l'administrateur
2021-12-08 10:59:59 +01:00
Christophe Robillard
4ffd25a321 introduce zone concept from now on 2021-12-08 10:56:17 +01:00
LeSim
e7b7bd8b7b
Merge pull request #6710 from adullact/feature/api-particulier-pole-emploi
[API Particulier] (3/4) Support de Pôle emploi
2021-12-08 10:43:00 +01:00
François Vantomme
6ab8ac0662 feat (api particulier): add Pole emploi field 2021-12-08 10:36:25 +01:00
François Vantomme
4cfc9f7d86 feat(api particulier): add Pole Emploi adapter 2021-12-08 10:36:11 +01:00
François Vantomme
2e05a3fde2 feat(api particulier): add Pole Emploi locales 2021-12-08 10:36:11 +01:00
François Vantomme
cfb8c184fe perf(api particulier): use filter_map instead of map.compact
https://docs.rubocop.org/rubocop-performance/cops_performance.html#performancemapcompact
2021-12-08 10:36:11 +01:00
François Vantomme
a24cf18c9d feat (api particulier): add Pole Emploi support to sources service 2021-12-08 10:36:11 +01:00
François Vantomme
62bc2efbaa style(api particulier): mentionne Pôle Emploi dans les locales 2021-12-08 09:49:53 +01:00
mfo
bf669116c9
Merge pull request #6732 from betagouv/main
2021-12-07-05
2021-12-07 16:23:07 +01:00
LeSim
8caa1e810e
Merge pull request #6731 from tchak/fix-set_dossiers_processed_at
fix(task): fix scope in set_dossiers_processed_at
2021-12-07 16:18:24 +01:00
Paul Chavard
a5b3bc1e79 fix(task): fix scope in set_dossiers_processed_at 2021-12-07 16:15:43 +01:00
Pierre de La Morinerie
8778b24110
Merge pull request #6723 from betagouv/fix-uri-encode 2021-12-07 15:29:42 +01:00
Pierre de La Morinerie
c75dba701d lib: replace URI.encode by CGI.escape
URI.encode was removed in Ruby 3.

Fix an error when adding a phone number to a Helpscout ticket.
2021-12-07 15:25:26 +01:00
mfo
86b6b5df65
Merge pull request #6730 from betagouv/main
2021-12-07-04
2021-12-07 15:22:41 +01:00
Pierre de La Morinerie
799ca8e499
Merge pull request #6726 from betagouv/update-sentry 2021-12-07 15:17:06 +01:00
Pierre de La Morinerie
dc003113e6 gems: update sentry-rails to 4.8.1 2021-12-07 15:09:56 +01:00
Pierre de La Morinerie
f1c267fe81
Merge pull request #6729 from tchak/revert-fix 2021-12-07 15:09:36 +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
5615baa985 Revert "Merge pull request #6724 from tchak/fix-approximative_expiration_date"
This reverts commit c95a67d970, reversing
changes made to 032989a400.
2021-12-07 13:32:39 +01:00
Paul Chavard
436569b08c Revert "Merge pull request #6727 from tchak/fix-approximative_expiration_date-again"
This reverts commit 951f974478, reversing
changes made to c95a67d970.
2021-12-07 13:32:27 +01:00
Pierre de La Morinerie
c7b1549063
Merge pull request #6728 from betagouv/main
2021-12-07-03
2021-12-07 13:11:30 +01:00
Pierre de La Morinerie
951f974478
Merge pull request #6727 from tchak/fix-approximative_expiration_date-again
Désactivation temporaire de l'expiration des dossiers
2021-12-07 13:09:59 +01:00
Paul Chavard
48ee830586 fix(dossier): fix approximative_expiration_date again 2021-12-07 13:02:53 +01:00
Pierre de La Morinerie
4b35e4a328
Merge pull request #6725 from betagouv/main 2021-12-07 12:55:43 +01:00
Pierre de La Morinerie
c95a67d970
Merge pull request #6724 from tchak/fix-approximative_expiration_date 2021-12-07 12:51:57 +01:00
Paul Chavard
60d4bcc4f7 fix(dossier): fix approximative_expiration_date 2021-12-07 12:47:27 +01:00
LeSim
032989a400
Ajoute le support du endpoint DGFIP de l'api particulier
[API Particulier] (2/4) Support de DGFiP
2021-12-07 11:09:00 +01:00
François Vantomme
2110ef072c feat(api particulier): add DGFiP field 2021-12-07 11:03:05 +01:00
François Vantomme
08405226b7 style(api particulier): fix a typo in CNAF tests 2021-12-07 11:03:05 +01:00
François Vantomme
f0913edebd feat(api particulier): add DGFiP adapter 2021-12-07 11:03:05 +01:00
François Vantomme
abad34ea7c feat(api particulier): add DGFiP locales 2021-12-07 11:03:05 +01:00
François Vantomme
97de7c197d feat(api particulier): add DGFIP support to sources service 2021-12-07 11:03:05 +01:00
François Vantomme
8ca8bdb6c4 fix(api particulier): correction d'une typo dans les locales 2021-12-07 11:03:05 +01:00
François Vantomme
4c8697656b style(api particulier): mentionne DGFIP dans les locales 2021-12-07 11:03:05 +01:00
Paul Chavard
685601be87
Merge pull request #6722 from betagouv/main
2021-12-07-01
2021-12-07 10:55:15 +01:00
Paul Chavard
e51d2235ed
Merge pull request #6668 from tchak/feat-add-parent-to-procedure-revision-type-de-champ
Add parent to procedure revision type de champ
2021-12-06 21:53:06 +01:00
Paul Chavard
5e0f8a5816 task(type_de_champ): migrate type_de_champ parent_id 2021-12-06 21:45:54 +01:00