summaryrefslogtreecommitdiff
path: root/app/models/label.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed label removal from issueccr/51052_keep_labels_on_issueChantal Rollison2018-11-051-1/+1
|
* Add subscribe filter to labels pageDmitriy Zaporozhets2018-10-041-0/+9
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Added FromUnion to easily select from a UNIONYorick Peterse2018-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
* Add sort dropdown to project labels page and group labels pageDmitriy Zaporozhets2018-09-101-0/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Use optionally_search for group labels index pageDmitriy Zaporozhets2018-09-071-0/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'frozen-string-enable-app-models' into 'master'Rémy Coutable2018-08-021-0/+2
|\ | | | | | | | | Enable frozen string in app/models/*.rb See merge request gitlab-org/gitlab-ce!20851
| * Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | | | | | Partially addresses #47424.
* | Add ability to filter labels by title or descriptionDmitriy Zaporozhets2018-07-311-0/+12
|/ | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Properly detect label reference if followed by period or question markDouwe Maan2018-06-181-5/+10
|
* Merge remote-tracking branch 'origin/master' into ↵Luke Bennett2018-05-281-2/+2
|\ | | | | | | 39549-label-list-page-redesign-with-draggable-labels
| * Revert the addition of goldiloaderYorick Peterse2018-04-181-2/+2
| | | | | | | | | | | | | | | | | | This reverts the addition of the "goldiloader" Gem and all use of it. While this Gem is very promising it's causing a variety of problems on GitLab.com due to it eager-loading too much data in places where we don't expect/can handle this. At least for the time being this means we have to go back to manually fixing N+1 query problems, but at least those should not cause a negative impact on availability.
* | Add/use Label#priority? and remove weird paddingLuke Bennett2018-04-191-0/+4
|/
* Use Goldiloader for handling N+1 queriesYorick Peterse2018-04-091-2/+2
| | | | | | | Goldiloader (https://github.com/salsify/goldiloader) can eager load associations automatically. This removes the need for adding "includes" calls in a variety of different places. This also comes with the added benefit of not having to eager load data if it's not used.
* Bring one group board to CEFelipe Artur2018-03-031-0/+1
|
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-111-0/+1
|
* Fix link text from group contextJarka Kadlecova2017-11-231-3/+3
|
* fix another N+1 query for label priorities34510-board-issues-sql-speedupmicael.bergeron2017-09-121-1/+6
| | | | added a QueryRecorder for IssuesController#index.json
* Fix failing specee_issue_928_backportFelipe Artur2017-09-061-1/+1
|
* Continue BE backportFelipe Artur2017-08-311-0/+1
|
* Group boards CE backportFelipe Artur2017-08-281-1/+2
|
* Added Cop to blacklist the use of `dependent:`Yorick Peterse2017-07-061-2/+2
| | | | | | | | This is allowed for existing instances so we don't end up 76 offenses right away, but for new code one should _only_ use this if they _have_ to remove non database data. Even then it's usually better to do this in a service class as this gives you more control over how to remove the data (e.g. in bulk).
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-6/+6
|
* Enable the Style/PreferredHashMethods coprc/enable-PreferredHashMethods-copRémy Coutable2017-06-021-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Provide default for calculating label text color (!11681)winh2017-05-251-0/+4
|
* Add board_move slash commandAlex Sanford2017-04-281-0/+1
|
* Remove heading and trailing spaces from label's color and titleblackst0ne2017-04-121-0/+6
|
* Added labels to the issue web hookLuke "Jared" Bennett2017-03-171-0/+4
|
* Revert "Enable Style/DotPosition"Douwe Maan2017-02-231-3/+3
| | | | | | | | | | | | | | | This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9. # Conflicts: # .rubocop.yml # .rubocop_todo.yml # lib/gitlab/ci/config/entry/global.rb # lib/gitlab/ci/config/entry/jobs.rb # spec/lib/gitlab/ci/config/entry/factory_spec.rb # spec/lib/gitlab/ci/config/entry/global_spec.rb # spec/lib/gitlab/ci/config/entry/job_spec.rb # spec/lib/gitlab/ci/status/build/factory_spec.rb # spec/lib/gitlab/incoming_email_spec.rb
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-231-9/+9
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-231-9/+9
|
* Enable Style/MutableConstantDouwe Maan2017-02-231-1/+1
|
* Enable Style/DotPositionDouwe Maan2017-02-231-3/+3
|
* validate length of label.titleTomáš Kukrál2017-01-091-0/+1
| | | | + add test for label.title length validation
* Fix cross-project references copy to include the project referencefix/cross-project-ref-pathJames Lopez2017-01-031-5/+5
| | | | Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
* Add shorthand support to gitlab markdown referencesOswaldo Ferreira2016-12-021-9/+6
|
* Use label subject to calculate number of issues/mrs within the groupDouglas Barbosa Alexandre2016-10-311-15/+15
|
* Use join instead of subquery on Label.unprioritized scopeDouglas Barbosa Alexandre2016-10-191-1/+8
|
* Abstract LabelPriority away into methods on Label modelDouglas Barbosa Alexandre2016-10-191-1/+15
|
* Fix issue board related controllers to expose label priority per projectDouglas Barbosa Alexandre2016-10-191-0/+6
|
* Fix sorting by label prioritiesDouglas Barbosa Alexandre2016-10-191-0/+11
|
* Add support to group labels prioritization on project levelDouglas Barbosa Alexandre2016-10-191-4/+6
|
* Add LabelPriority modelDouglas Barbosa Alexandre2016-10-191-6/+1
|
* Remove `::` for method call on Label#text_colorDouglas Barbosa Alexandre2016-10-191-1/+1
|
* Use reverse_merge on Label#issues_count and Label#merge_requests_countDouglas Barbosa Alexandre2016-10-191-2/+2
|
* Move common logic to reference group/project label to Label#to_referenceDouglas Barbosa Alexandre2016-10-191-0/+28
|
* Unfold references for group labels when moving issue to another projectDouglas Barbosa Alexandre2016-10-191-24/+0
|
* Validate if project label title does not exist at group levelDouglas Barbosa Alexandre2016-10-191-2/+3
|
* Add ProjectLabel modelDouglas Barbosa Alexandre2016-10-191-7/+0
|
* Validates uniqueness of title unless label is a templateDouglas Barbosa Alexandre2016-10-191-4/+2
|
* List group labels on project labels pageDouglas Barbosa Alexandre2016-10-191-6/+18
|