Commit Graph

11 Commits

Author SHA1 Message Date
Loïc Guitaut cac9a763dd FEATURE: Allow to reassign to same user
Currently, when only one user is available for the random auto-assign
and if that user was already assigned, then the assign will fail.

This patch addresses this issue by allowing to reassign a user who’s
already assigned. A new parameter (`allow_self_reassign`) has been added
to `Assigner#assign` with a default value of `false`.
2023-11-27 16:17:25 +01:00
Loïc Guitaut fbd1fa3794 FEATURE: Add a fallback to auto-assign
Currently, when the auto-assign logic can’t find a user to assign, it
will fail saying there was no one to assign. The current logic is this
one:
- Don’t pick anyone who’s been picked in the last 180 days
- If no one has been found, then try the same thing but only for the
  last 14 days.
While this is working relatively well for large enough groups, it
doesn’t work at all with very small groups (like 2 people) and it
creates unnecessary noise.

This patch addresses this issue by adding a fallback to the current
logic. Now, if the two first rules fail, instead of saying that no one
was assigned, we assign the least recently assigned person. This way,
the logic will continue to work with large groups but will also work
nicely with small groups.
2023-11-22 10:11:15 +01:00
David Taylor 46dd26963c
DEV: Introduce syntax_tree for ruby formatting (#408) 2022-12-23 20:35:55 +00:00
David Taylor 4902ba6993
DEV: Bump rubocop-discourse and correct violations (#409) 2022-12-23 19:55:31 +00:00
Bianca Nenciu 4046c9fb40
FIX: Find better users for automatic assignment (#370)
There were two problems with the way current automation script for automatic
assignment works:

- it tried to assign users that were not allowed to be assigned because they
were not part of groups that are allowed to use discourse-assign - fixed by
skipping users that are not a part of assign_allowed_on_groups groups

- it assigned new users - fixed by adding a new user that can skip new users
2022-08-25 15:13:33 +03:00
Rafael dos Santos Silva 6116f26642 DEV: Apply syntax_tree formatting 2022-07-27 13:48:51 -03:00
Vinoth Kannan 4ab491ec14
FIX: include users who were assigned to a post instead of topic. (#347)
While assigning a random user in group to the topic posts, if we didn't include the users who were assigned to indivitual posts then the same users will be assigned again and again.
2022-06-09 04:31:29 +05:30
Joffrey JAFFEUX f657239a4b
FEATURE: improves random assign to assign to a post (#300) 2022-03-14 10:55:50 +01:00
janzenisaac 5910fd5569
FIX: Refactor assign / reassign to combine logic (#250)
* Refactor and combine assign / reassign logic
2021-12-02 13:12:00 -06:00
Joffrey JAFFEUX 7747bb81a0
FIX: more accurate and flexible random assign automation (#222)
- allows to define the number of days within which a user is considered recently assigned
- more correct by now using post custom fields
2021-10-19 17:31:17 +02:00
Joffrey JAFFEUX 0046041e9e
FEATURE: improves random assign automation (#166)
- Makes a best attempt at being random and assigning people who haven’t been assigned for a long time
- Uses timezones and holidays
- Allows to define a minimum delay between assignments
- Creates a post if no one is available
2021-08-20 12:22:37 +02:00