Fix display of promote to group label
What does this MR do?
Fix display of promote to group label
Since label presenter is used in label index view, label class check doesn't work as expected because the class is now LabelPresenter.
Also label.subject
doesn't work as expected now because Label's model
subject
method is shadowed by Gitlab's presenter's method which uses
subject
for referencing the original object.
Instead we use a presenter's method for both checks now.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62200
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Merge request reports
Activity
changed milestone to %11.11
added regression regression:11.1 labels
marked the checklist item Changelog entry as completed
1 Error 58dc21e7: The commit subject may not be longer than 72 characters 1 Warning 52764ec5: This commit’s subject line is acceptable, but please try to reduce it to 50 characters. 1 Message Consider setting merge_request
to 28637 in changelogs/unreleased/jp-label-fix.yml. See the documentation.Commit message standards
One or more commit messages do not meet our Git commit message standards. For more information on how to write a good commit message, take a look at How to Write a Git Commit Message.
Here is an example of a good commit message:
Reject ruby interpolation in externalized strings When using ruby interpolation in externalized strings, they can't be detected. Which means they will never be presented to be translated. To mix variables into translations we need to use `sprintf` instead. Instead of: _("Hello #{subject}") Use: _("Hello %{subject}") % { subject: 'world' }
This is an example of a bad commit message:
updated README.md
This commit message is bad because although it tells us that README.md is updated, it doesn't tell us why or how it was updated.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.
Category Reviewer Maintainer backend Reuben Pereira ( @rpereira2
)Jen-Shin Lin ( @godfat
)frontend Jacques Erasmus ( @jerasmus
)Fatih Acet ( @fatihacet
)Generated by
DangerEdited by 🤖 GitLab Bot 🤖- Resolved by Lin Jen-Shin
@vshushlin could you please review?
assigned to @vshushlin
- Resolved by Jan Provaznik
@wlsf82 per https://gitlab.com/gitlab-org/quality/team-tasks/issues/128#note_170783578 could you please review feature specs?
assigned to @wlsf82
added Plan [DEPRECATED] typebug labels
- Resolved by Lin Jen-Shin
@jprovaznik I think we also need to change https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/helpers/labels_helper.rb#L203 to fix the tooltip on the subscribe button.
And I think https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/helpers/labels_helper.rb#L8 would cause a bug too.
Though we can do those in a separate issue / MR
Edited by Heinrich Lee Yu
- Resolved by Lin Jen-Shin
- Resolved by Jan Provaznik
mentioned in issue #62217 (closed)
unassigned @vshushlin
- Resolved by Lin Jen-Shin
Thanks @vshushlin, @godfat could you please merge?
assigned to @godfat
unassigned @wlsf82
- Resolved by Lin Jen-Shin
- Resolved by Lin Jen-Shin
- Resolved by Lin Jen-Shin
added 1 commit
- 52764ec5 - Apply suggestion to spec/helpers/labels_helper_spec.rb
added 1 commit
- 58dc21e7 - Apply suggestion to spec/features/projects/labels/user_promotes_label_spec.rb
enabled an automatic merge when the pipeline for 58dc21e7 succeeds
@jprovaznik Thanks! Looks good to me, and I applied the suggestions and set merge when pipeline succeeds. Glad that now I can still merge even when I applied the suggestions.
- https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/220450380 -> https://gitlab.com/gitlab-org/gitlab-ce/issues/62283
- Danger -> We're squashing
mentioned in commit 9c2d0d87
mentioned in issue #41311 (closed)
Automatically picked into https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28679, will merge into
11-11-stable
ready for11.11.2
.mentioned in commit f5610f59
mentioned in merge request !28679 (merged)
mentioned in issue gitlab-org/release/tasks#799 (closed)
mentioned in issue #62801 (closed)
mentioned in issue gitlab-org/release/tasks#800 (closed)
mentioned in issue gitlab-org/release/tasks#804 (closed)
mentioned in merge request !31038 (merged)
added devopsplan label