Plugin for assigning users to a topic
Go to file
Andrei Prigorshnev 0bcd0a1fee
FIX: Unassign buttons on the activity/assigned page don't work (#559)
We've noticed that when unassigning a topic on the `activity/assigned` one of 
two incorrect things happens when pressing this button:
1. The first topic on the page gets unassigned instead of the selected one
2. No topics get unassigned (that happens when the first topic on the list is 
not assigned and only has assigned _posts_)

That happens because this handler for all buttons somehow always use the 
same state - the state of the first topic on the page:

f2906e0885/assets/javascripts/discourse/components/assign-actions-dropdown.js (L55-L68)

There seem to be some nuances in select-kit and I'm not sure whether 
this should be qualified as a bug in select-kit. However, I've noticed that in other cases when we use `DropdownSelectBoxComponent` we use the `onChange` handler rather 
than `onSelect`.

So I switched this code to using `onChange` and that resolved the issue, 
the `onChange` handler has access to correct state.

Tests will be in a follow-up.
2024-04-04 20:03:03 +04:00
.github/workflows DEV: Update CI workflows (#424) 2023-01-10 18:03:19 +00:00
app FIX: Recreate notifications on topic reopening 2024-03-18 10:56:08 +01:00
assets FIX: Unassign buttons on the activity/assigned page don't work (#559) 2024-04-04 20:03:03 +04:00
config Update translations (#557) 2024-04-02 18:19:42 +02:00
db DEV: Rewrite post-migration in pure SQL 2023-11-15 09:50:54 +01:00
lib FIX: Assignments limit shouldn't prevent from reassigning a post (#556) 2024-03-29 15:50:02 +04:00
spec FIX: Assignments limit shouldn't prevent from reassigning a post (#556) 2024-03-29 15:50:02 +04:00
svg-icons UX: improve custom icons for group assign (#441) 2023-02-13 17:19:25 -05:00
test/javascripts FEATURE: Add buttons for unassigning from posts to the topic level assign menu (#554) 2024-03-29 18:10:04 +04:00
.discourse-compatibility DEV: Stop using FoundUserWithStatusSerializer (#546) 2024-03-14 17:44:48 +04:00
.eslintrc.cjs DEV: Use `@discourse/lint-configs` (#517) 2023-10-23 12:08:11 +02:00
.git-blame-ignore-revs DEV: Ignore stree commit from git blame 2022-07-27 13:48:51 -03:00
.gitignore DEV: Use `@discourse/lint-configs` (#517) 2023-10-23 12:08:11 +02:00
.prettierrc.cjs DEV: Use `@discourse/lint-configs` (#517) 2023-10-23 12:08:11 +02:00
.rubocop.yml DEV: Introduce syntax_tree for ruby formatting (#408) 2022-12-23 20:35:55 +00:00
.streerc DEV: Introduce syntax_tree for ruby formatting (#408) 2022-12-23 20:35:55 +00:00
.template-lintrc.cjs DEV: Update linting (#534) 2023-11-29 23:02:00 +01:00
Gemfile DEV: Bump rubocop-discourse and correct violations (#409) 2022-12-23 19:55:31 +00:00
Gemfile.lock DEV: Fix new Rubocop offenses (#548) 2024-02-29 18:23:48 +01:00
LICENSE Update LICENSE (#529) 2023-11-15 20:11:33 +01:00
README.md DEV: Modernization/cleanup (#480) 2023-06-22 10:06:37 +02:00
package.json DEV: Update linting (#538) 2024-01-15 11:24:20 +00:00
plugin.rb FIX: Recreate notifications on topic reopening 2024-03-18 10:56:08 +01:00
translator.yml DEV: Switch from Transifex to Crowdin 2020-07-16 14:00:20 +02:00
yarn.lock DEV: Update linting (#538) 2024-01-15 11:24:20 +00:00

README.md

Assign Plugin

Allows you to assign topics and individual posts (both private and public) to a user or group.

For more information, please see: https://meta.discourse.org/t/discourse-assign/58044