Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !4795

Merged
Created 11 years ago by Administrator@rootOwner

Issue-4769 - Unable to update case of label

  • Overview 17
  • Commits 1
  • Changes 2

Created by: dblessing

Labels are saved in the database with the case they were originally created with. Before this change if a user created a label with the same text but different case the label would use the original case and no new label would be created in the database. With this change, labels are now case-sensitive.

Steps to test:

  1. Before this change, create a new issue with a new label "FIxMe"
  2. Edit the issue and change the label to "FixMe"
  3. Note that the label reverted to "FIxMe"
  4. Apply this change
  5. Edit the issue again and change the label to "FixMe"
  6. Note that the new case was preserved. If you also look in the database in the "tags" table you will see that both labels are present - "FIxMe" and "FixMe".
Loading
Loading

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    I should add that I came upon this solution based on the README for the acts-as-taggable-on project at https://github.com/mbleigh/acts-as-taggable-on/blob/master/README.md

    By Administrator on 2013-08-16T14:58:52 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling bd7dbaf330bea9dbbafb14f474c698040e61527e on bke-drewb:issue-4769 into 0e387919 on gitlabhq:master.

    By Administrator on 2013-08-16T15:24:43 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    Looks like an unrelated test failure on Ruby 2.0.

    By Administrator on 2013-08-16T16:13:18 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: axilleas

    Cool, nice catch! 👍

    BTW, if you refer in your commit message to the id of the issue like #4769 you ensure that the bug report will close auomatically once the PR is merged ;)

    By Administrator on 2013-08-16T16:27:10 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: Razer6

    @jacobvosmaer Looks good

    By Administrator on 2013-09-29T09:22:10 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jacobvosmaer

    Is this something we might want to have a spec for?

    /cc @randx

    By Administrator on 2013-09-30T07:10:19 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    @jacobvosmaer I think no.

    @bke-drewb Can you provide me an example when you might need a case-sensitive labels?

    Because now I dont see a reason to change it

    By Administrator on 2013-09-30T13:35:49 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    @randx Really it's a matter of fixing typos, for readability and usability. I worked on this after talking with a person who had messed up a label and then couldn't fix it. So if you create a label such as "mYmEssEdUplAbel" then you have no way to create a correct label like "MyMessedUpLabel". I think it's either this solution, allow editing, or downcase all labels before storing. But then I'd say, why not case-sensitive?

    By Administrator on 2013-09-30T13:59:02 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    Maybe better force lowercase then? To prevent typos

    By Administrator on 2013-09-30T19:24:41 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    Maybe. That will mean that all labels appear as lowercase all the time. Is that what you want for the UI/UX?

    By Administrator on 2013-09-30T19:26:49 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    @bke-drewb I think it will be someone who wants camelCase labels etc. So I decided to accept your current solution.

    By Administrator on 2013-10-01T11:56:08 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    @bke-drewb your current fix applies only on project labels. See https://github.com/gitlabhq/gitlabhq/blob/master/app/models/issue.rb#L36

    By Administrator on 2013-10-01T11:58:00 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    I will fix that and update this PR.

    By Administrator on 2013-10-02T13:10:07 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    I added the change to the issue model as well. Tested and everything works as expected.

    By Administrator on 2013-10-02T13:20:57 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: coveralls

    Coverage Status

    Coverage remained the same when pulling 45de7d26 on bke-drewb:issue-4769 into 45efba58 on gitlabhq:master.

    By Administrator on 2013-10-02T13:44:57 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: alison-gravley

    Thanks for continuing to work on this. We use a lot of camel case for readability and having them all lower case would drive project leads crazier than they already are. Hope to see this in 6.2. Thanks again!

    By Administrator on 2013-10-18T11:48:47 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dblessing

    @randx this should be good to go now

    By Administrator on 2013-11-08T19:31:50 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
0 Reviewers
Request review from
Milestone
No milestone
None
None
Time tracking
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/dblessing/issue-4769

    0 pending comments