Commit graph

2362 commits

Author SHA1 Message Date
simon lehericey
725798da6a [fix #4361] Update user table sign_in 2019-10-08 10:09:16 +02:00
Paul Chavard
e7ed408e08 Auto-link valeur des champs
closes #2865
2019-10-07 21:20:24 +02:00
Paul Chavard
2c486b8fe2 Bump some javascript dependencies 2019-10-07 15:40:27 +02:00
clemkeirua
053cc5cfc5 [fix #4058] instructeur peut passer accepte → instruction 2019-10-07 15:17:33 +02:00
Paul Chavard
3f36153807 [GraphQL] Add groupe_instructeurs to demarche 2019-09-26 11:25:14 +02:00
Nicolas Bouilleaud
03c950ea97 Move followed_dossiers_with_notifications to a Dossier scope
Instead of instructeur.followed_dossiers_with_notifications, we can now write instructeur.followed_dossiers.with_notifications.

Yay composition!
2019-09-25 14:10:00 +02:00
Nicolas Bouilleaud
a4166d3c57 Refactor Instructeur.notifications_* methods
- rename `dossiers_id_with_notifications` to `followed_dossiers_with_notifications`,
- rename `notifications_per_procedure` to `procedures_with_notifications`,
- return an ActiveRecord::Relation instead of the result of the query, so that the call place can compose it,
- `merge` with the wanted Dossier scope in the call places, don’t bother passing it as a parameter,
- use the “state” (now “scope”) parameter as a scope method that can be just applied on `Dossier`.
2019-09-25 14:10:00 +02:00
Paul Chavard
4b885f7a12 Add basic graphql test 2019-09-24 10:47:21 +02:00
Paul Chavard
5a7eb734ff Dump graphql schema for reference 2019-09-24 10:47:21 +02:00
Nicolas Bouilleaud
f74fde3f80 Avoid sending notification emails about archived dossiers 2019-09-20 11:06:33 +02:00
Nicolas Bouilleaud
a2131d0fcc Don’t unfollow when archiving
It was slightly broken in two ways:
- it doesn’t make other instructeurs unfollow the dossier
- if the dossier is unarchived, instructeurs don’t refollow automatically.
2019-09-20 11:06:33 +02:00
Nicolas Bouilleaud
769621de46 Explicitly pass the “state” param in notifications_*_procedure methods 2019-09-20 11:06:33 +02:00
simon lehericey
a2f82ab8be Add groupe_instructeur_label to export v2 2019-09-19 12:30:12 +02:00
simon lehericey
f577484aa2 Add groupe_instructeur_label to export v1 2019-09-19 12:30:12 +02:00
simon lehericey
8660d4af30 Instructeur: only export its dossiers 2019-09-19 12:24:40 +02:00
simon lehericey
e2acb0a946 ProcedurePresentation: can use groupe instructeur 2019-09-18 15:51:02 +02:00
simon lehericey
f5bbc9e2f9 InstructeurProcedureShow: show dossier for all the gi involved 2019-09-18 15:51:02 +02:00
simon lehericey
9b16bd2037 Dossier: retrieve all dossiers for a procedure 2019-09-18 15:51:02 +02:00
simon lehericey
21577a0f0b Instructeur: dedup procedures with multiple gi 2019-09-18 15:51:02 +02:00
Paul Chavard
8fcf1353f3 Remove duplicated attachments 2019-09-17 18:12:53 +02:00
simon lehericey
dec42e4886 Instructeur procedure index: show stats by procedure
Also sum the count from differents groupe_instructeur from the same procedure
2019-09-17 17:19:14 +02:00
simon lehericey
d338f9b9f3 Factory: can create a dossier with a defined gi 2019-09-17 17:19:14 +02:00
Paul Chavard
11b4698ef3 Fix test 2019-09-17 16:58:11 +02:00
pedong
d2a78abc3a [fix #3975] set buttons floating in dossier page 2019-09-17 16:58:11 +02:00
Nicolas Bouilleaud
78da268ded Improve feature tests for procedure cloning and creation 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
543f9894c1 Make sure the “commencer” link uses the proper test path 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
c26a701a17 Refactor and redesign publish modal
* remove the autocomplete menu
* use ujs to pre-validate the procedure
* tweak the UI
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
bd1e0aba38 Add Procedure path suggestion 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
00c37eccb3 Simplify procedure.path and publish event
* Get rid of the “reopen” event, merge it with “publish” (it’s the same code)
* Remove the “availability” states; “available with brouillon” makes no sense since the brouillons path are always uuids
* Instead of checking if publish can happen, just try it and handle the errors
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
92e6032115 Remove path availability dead code when creating/editing a procedure
There’s no “path” field anymore in the Procedure form, it can only be set when publishing.
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
8fa630d2bb Remove Gestionnaire.visible_procedures
It is actually the same thing as Gestionnaire.procedures. It already included the procedures with paths as well as the archived procedures, and in production, there were no Gestionnaire for who procedures was returning a different result than visible_procedures (expect for two baddata brouillon procedures with a nil path).

In addition, Procedure.path is now nonnull, which means the Procedure.avec_lien scope is pointless.

Finally, the current spec showed that the only procedure not visible to the gestion was the one he was not assigned to.
2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
e9c6ed80e4 Migration: Index and make Procedure.path nonnull 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
fc416ee2ec Fix procedure_locked_spec
`login_as administrateur, scope: :administrateur` doesn’t seem to actually do anything, but testing for the _absence_ of content can’t break.

- Make the test fail if login fails,
- Fix the login,
- Write the opposite test,
- Update the searched content to the actual text used in the partial
2019-09-17 14:50:37 +02:00
clemkeirua
949a0c21e6 gestion des 2 formats de bouton monavis 2019-09-17 13:39:45 +02:00
Paul Chavard
ff2b6ca3ea Fix service controller 2019-09-17 12:37:37 +02:00
Paul Chavard
8a691d534a Fix AdministrateurUsageStatisticsService 2019-09-17 12:37:37 +02:00
Paul Chavard
adfa80142a Cleanup application_controller and current_user 2019-09-17 12:37:37 +02:00
Paul Chavard
b97cbd3402 Serialize champ repetition for tags
closes #4272
2019-09-12 17:23:18 +02:00
Paul Chavard
3b8d3b7967 Add Style/CollectionMethods to rubocop 2019-09-12 14:48:18 +02:00
Pierre de La Morinerie
503c393a87 helpscout: use replies_sent to compute contact rate
The `conversations_count` we previously used counts replies, but also
all conversations that were tagged or re-tagged during the month – with
made counting the actual work spent on user support brittle.

Counting the replies is a better estimation of what we get.

Unfortunately this also removes the filtering-by-tag feature. To
mitigate this, the reports are now scoped to a specific mailbox. This
allows to create extra mailboxes for conversations that should't be
counted in the stats.
2019-09-11 17:26:10 +02:00
Paul Chavard
c370c2f475 Cleanup FlipFlop 2019-09-10 23:52:44 +02:00
Pierre de La Morinerie
d94a5cee8e spec: during js specs, cleanup database using deletion
This attempts to solve the database deadlock on cleanup by fiddling
with the settings.

Ref #4293
2019-09-10 16:40:02 +02:00
Paul Chavard
65e227c44b Migrate to flipper 2019-09-10 16:10:14 +02:00
clemkeirua
feb9c32537 search attachments inside bloc repetables 2019-09-10 15:30:44 +02:00
Paul Chavard
347f03d2a9 Redirect to pdf attachement old name if not attached 2019-09-10 15:06:47 +02:00
Paul Chavard
3eb3ae001e Rename “Passé en construction le” to 'Déposé le' for clarity 2019-09-10 14:59:10 +02:00
Chaïb Martinez
dd6c6bfe7a mailers: add a NO_REPLY address to transactional emails 2019-09-10 13:37:28 +02:00
Pierre de La Morinerie
aa1cf6788b mailers: turn revert_to_instruction into a notification email 2019-09-10 13:29:06 +02:00
pedong
25596ca2f2 [fix #4181] add service to procedure API 2019-09-10 11:06:28 +02:00
Paul Chavard
7ffb98e616 Remove carrierwave uploaders 2019-09-10 10:49:12 +02:00