Bug fix for work_item_assignees_with_edit
What does this MR do and why?
Bug fix for work_item_assignees when the user cannot invite members. It also solves another bug where the assignees are wrongly updated when click outside
:Behind work_items_mvc_2
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
Screen_Recording_2024-01-23_at_1.49.18_PM | Screen_Recording_2024-01-23_at_1.48.40_PM |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- In rails console enable FF
Feature.enable(:work_items_mvc_2)
- Apply the below patch
diff --git a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
index 76f1938c3ed8..6185c2fdded5 100644
--- a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
+++ b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
@@ -126,7 +126,7 @@ export default {
:assignees="workItemAssignees.assignees.nodes"
:allows-multiple-assignees="workItemAssignees.allowsMultipleAssignees"
:work-item-type="workItemType"
- :can-invite-members="workItemAssignees.canInviteMembers"
+ :can-invite-members="false"
@error="$emit('error', $event)"
/>
<work-item-assignees-inline
- Visit any work item with assignees
- Click on edit button , see that you are not able to see an extra border when not having the ability to invite members
For the 2nd point
- Add multiple assignees for example 8
- Click on edit and open the dropdown
- Click on apply , see that the number of assignees should be same
Edited by Deepika Guliani