Refactor reviewers_dropdown_options and assignees_dropdown_options
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !44097 (merged) should be addressed:
-
@reprazent started a discussion: (+1 comment) I'm wondering if we should override this entire method in
ee
and use thesuper
value to merge in the "multiple_reviewers" options instead.I'm thinking something along these lines in EE:
override :reviewers_dropdown_options def reviewers_dropdown_options options = super if merge_requests_supports_multiple_reviewers options.deep_merge!( title: _('Select reviewer(s)'), data: { 'dropdown-header': _('Reviewer(s)') 'max-select': nil } ) end options end
That way we'd only have one method to adjust and we don't need to jump around as much between both files. And we wouldn't have to introduce the empty method in CE. WDYT?
I haven't tried how the
deep_merge
will affect thedata
hash though😬 . We might have to do the adjustment like you're currently doing it.
Edited by 🤖 GitLab Bot 🤖