summaryrefslogtreecommitdiff
path: root/app/models/concerns
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'separate-banzai-references' into 'master' Douwe Maan2016-06-013-53/+68
|\ | | | | | | | | | | | | | | | | Separate reference gathering from rendering This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query. cc @rspeicher @DouweM See merge request !3969
| * Refactor ParticipableYorick Peterse2016-06-012-43/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several changes to this module: 1. The use of an explicit stack in Participable#participants 2. Proc behaviour has been changed 3. Batch permissions checking == Explicit Stack Participable#participants no longer uses recursion to process "self" and all child objects, instead it uses an Array and processes objects in breadth-first order. This allows us to for example create a single Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using a ReferenceExtractor removes the need for running potentially many SQL queries every time a Proc is called on a new object. == Proc Behaviour Changed Previously a Proc in Participable was expected to return an Array of User instances. This has been changed and instead it's now expected that a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return value of the Proc is ignored. == Permissions Checking The method Participable#participants uses Ability.users_that_can_read_project to check if the returned users have access to the project of "self" _without_ running multiple SQL queries for every user.
| * Refactor MentionableYorick Peterse2016-05-261-10/+9
| | | | | | | | | | | | | | Caching is now always enabled when rendering attributes as there's no reason to not cache them. The method Mentionable#all_references has also been modified to take an optional Gitlab::ReferenceExtractor instance to allow other code to create one and re-use it between multiple calls.
* | Add leading comment space copissue_15557Felipe Artur2016-05-311-7/+6
| |
* | Fix error 500 when sorting issues by milestone due date and filtering by labelsFelipe Artur2016-05-311-2/+19
|/
* Fix outer join when filtering milestonesissue_15221_2Felipe Artur2016-05-241-0/+2
|
* Fix bug when ordering by milestone due date and filtering by milestoneFelipe Artur2016-05-241-1/+0
|
* improve ordering sql for milestonesFelipe Artur2016-05-241-2/+2
|
* Fix ordering for MysqlFelipe Artur2016-05-241-2/+2
|
* Fix issues/MRs filter when ordering by milestone due dateFelipe Artur2016-05-241-1/+3
|
* Add API endpoints for un/subscribing from/to a labelAhmad Sherif2016-05-121-0/+6
| | | | Closes #15638
* Fix an issue when filtering merge requests with more than one labelRémy Coutable2016-05-101-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'fix/todos-for-private-group-mentions' into 'master' Douwe Maan2016-05-091-2/+2
|\ | | | | | | | | | | | | Fix adding a todo for private group memebers See merge request !4081
| * Fix adding a todo for private group membersAhmad Sherif2016-05-071-2/+2
| | | | | | | | Fixes #14002
* | API: Expose Issue#user_notes_countcnam-dep2016-05-091-0/+4
|/
* Use outer join for issues ordering by milestones due.Takuya Noguchi2016-05-061-2/+3
|
* Use a better message when milestone is newly createdchange_message_for_newly_created_milestoneArinde Eniola2016-04-291-1/+1
| | | | | | | | | | make some changes for the checks to determine when the messages should be displayed add item to changelog and also integration test make some changes to the test make some changes
* Render canceled status if any of the jobs canceledGrzegorz Bizon2016-04-271-1/+1
| | | | | This status will be returned only when there are no failed jobs that are not allowed to fail.
* Merge branch 'fix/label-filters' into 'master' Douwe Maan2016-04-211-1/+8
|\ | | | | | | | | | | | | Filter labels by including ALL filter titles Fixed query to use `AND` and not `OR`. Refactored relevant specs See merge request !3815
| * udpated a few things based on MR feedback. Also added model specJames Lopez2016-04-201-1/+8
| |
| * filter labels by including all filter titles as part of the queryJames Lopez2016-04-191-1/+1
| |
* | Merge remote-tracking branch 'origin/master' into ci-commit-as-pipelineci-commit-as-pipelineKamil Trzcinski2016-04-191-4/+6
|\ \ | |/ | | | | | | # Conflicts: # db/schema.rb
| * Use GitHub Issue/PR number as iid to keep referencesDouglas Barbosa Alexandre2016-04-181-4/+6
| | | | | | | | | | With these changes we don’t lost the issue/pr references when importing them to GitLab.
* | Make some logic less twistableKamil Trzcinski2016-04-171-1/+1
| |
* | Write specs for this featureKamil Trzcinski2016-04-161-1/+1
| |
* | Rename CiStatus to StatusableKamil Trzcinski2016-04-161-2/+2
| |
* | Update handling of skipped statusKamil Trzcinski2016-04-131-1/+9
| |
* | Support skipped statusKamil Trzcinski2016-04-131-0/+3
| |
* | Merge remote-tracking branch 'origin/master' into ci-commit-as-pipelineKamil Trzcinski2016-04-131-15/+0
|\ \ | |/
| * Merge branch 'master' into decouple-member-notificationDouglas Barbosa Alexandre2016-04-081-1/+2
| |\
| * | Update NotificationService to use NotificationSettings instead of membershipDmitriy Zaporozhets2016-03-301-15/+0
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Fix CiStatus implementation and testsKamil Trzcinski2016-04-131-9/+11
| | |
* | | Optimise CI status accessorKamil Trzcinski2016-04-121-16/+22
| | |
* | | Optimise CI status accessorKamil Trzcinski2016-04-121-0/+1
| | |
* | | Fix rest of rspec and spinach testsKamil Trzcinski2016-04-121-2/+4
| | |
* | | Fix specsKamil Trzcinski2016-04-111-1/+2
| | |
* | | Use Ci::Commit as PipelineKamil Trzcinski2016-04-111-0/+58
| |/ |/|
* | Fix bug related to filtering Issues by Label/Milestone.issue_14853Rubén Dávila2016-04-021-1/+1
| | | | | | | | This problem only was affecting the dev env.
* | Destroy related todos when an issue is deletedDouglas Barbosa Alexandre2016-03-301-0/+1
|/
* Fix sorting issues/mrs by votes on the groups pagefix-sorting-by-votes-on-groups-pageDouglas Barbosa Alexandre2016-03-211-1/+1
| | | | | | | | The `non_archived` scope applied here https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/conc erns/issues_action.rb#L5 overrides the previous `ORDER BY` applied inside the IssuesFinder, with the default scope of the Project model, resulting in SQL errors.
* Merge branch 'master' into 2489-soft-delete-issuesZeger-Jan van de Weg2016-03-211-0/+9
|\
| * Merge branch 'master' into feature/issue-moveGrzegorz Bizon2016-03-191-8/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (121 commits) Dedupe labels in labels selector in Dashboard pages Refactor colors and lists Add a safeguard in MergeRequest#compute_diverged_commits_count Fix an issue when the target branch of a MR had been deleted Add avatar to issue and MR pages header Cleanup somce css colors Re-group scss variables Refactor `Todo#target` Fixes issue with filter label missing on labels & milestones Rename `Todo#to_reference` to `Todo#target_reference` Fixed failing tests Updated controller with before_action Fixed other issues based on feedback Fixes issue on dashboard issues Full labels data in JSON Fixed issue with labels dropdown getting wrong labels Update CHANGELOG Use `Note#for_project_snippet?` to skip notes on project snippet Use `Commit#short_id` instead of `Commit.truncate_sha` Reuse `for_commit?` on conditional validations Update schema info comment on todo related files ... Conflicts: app/models/issue.rb db/schema.rb spec/models/issue_spec.rb
| * | Improvements in issue move feaure (refactoring)Grzegorz Bizon2016-03-191-0/+9
| | | | | | | | | | | | According to endbosses' suggestions.
* | | Dry destroy action on issuablesZeger-Jan van de Weg2016-03-192-5/+6
| | |
* | | Hide delete botton on edit pageZeger-Jan van de Weg2016-03-191-2/+1
| | |
* | | Soft delete issuablesZeger-Jan van de Weg2016-03-191-1/+6
| |/ |/|
* | Restrict access for confidential issues on milestone viewDouglas Barbosa Alexandre2016-03-171-8/+12
|/
* Improving the original label-subscribing implementationRémy Coutable2016-03-152-18/+17
| | | | | | | 1. Make the "subscribed" text in Issuable sidebar reflect the labels subscription status 2. Current user mut be logged-in to toggle issue/MR/label subscription
* Original implementation to allow users to subscribe to labelsTimothy Andrew2016-03-152-23/+50
| | | | | | | | | | | | | | | | | | 1. Allow subscribing (the current user) to a label - Refactor the `Subscription` coffeescript class - The main change is that it accepts a container, and conducts all DOM queries within its scope. We need this because the labels page has multiple instances of `Subscription` on the same page. 2. Creating an issue or MR with labels notifies users subscribed to those labels - Label `has_many` subscribers through subscriptions. 3. Adding a label to an issue or MR notifies users subscribed to those labels - This only applies to subscribers of the label that has just been added, not all labels for the issue.
* Use ILIKE/LIKE for Issuable.search and full_searchYorick Peterse2016-03-111-2/+19
|