Commit Graph

272 Commits

Author SHA1 Message Date
Martin Wortschack 5660690787 Externalize strings in projects controllers
- concerns
- dashboard
- groups
- import
2019-03-27 16:52:52 +00:00
Rubén Dávila 24226b9fe2 Update last_activity_on for Users on some main GET endpoints
In order to have an accurate date about the last activity of a User
we need to update the last_activity_on field when the User is visiting
some basic pages of GitLab like pages related to Dashboards, Projects,
Issues and Merge Requests
2019-02-05 09:55:31 -05:00
Sean McGivern 70b92fb380 Merge branch '19745-forms-with-task-lists-can-be-overwritten-when-editing-simultaneously' into 'master'
Forms with task lists can be overwritten when editing simultaneously

See merge request gitlab-org/gitlab-ce!23938
2019-02-04 08:52:22 +00:00
Heinrich Lee Yu 65eb988dae
Use common error for unauthenticated users
Removes special error message when creating new issues
2019-01-31 16:51:17 +01:00
Brett Walker 10649c49ab
Added 'handle_update_task' for new task handling 2019-01-30 23:18:16 +01:00
Brett Walker 58a005cf2c
Pass down the new state of the checkbox
and whitelist the `update_task` parameter
2019-01-30 23:18:15 +01:00
Mario de la Ossa 49c74068ae
Save sorting preference for Issues/MRs in BE
In order to let users' sorting preferences transfer between devices, we
save the preference for issues and MRs (one preference for issues, one
for MRs) in the backend inside the UserPreference object
2019-01-28 12:48:05 -06:00
Heinrich Lee Yu 993cff046d Remove import_issues_csv feature flag
Also remove test for the feature flag
2019-01-11 22:11:18 +08:00
Heinrich Lee Yu 63e9969ca3 Refactor upload service to return uploader
Also changes old calls to the service
2019-01-07 11:16:58 +08:00
Heinrich Lee Yu 3c02697114 Import CSV Backend
Process CSV uploads async using a worker then email results
2019-01-07 11:16:58 +08:00
Heinrich Lee Yu 876ab436fa Add Import CSV Frontend
Added button and modal to accept CSV file for uploading
2019-01-07 11:16:58 +08:00
Phil Hughes 2bb468d6b9
Remove issue_suggestions feature flag
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55166
2018-12-13 09:43:36 +00:00
Cindy Pallares fe5f75930e
Merge branch 'security-fix-pat-web-access' into 'master'
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request"

See merge request gitlab/gitlabhq!2583
2018-11-28 19:13:59 -05:00
Phil Hughes 50e21a89a0
Suggests issues when typing title
This suggests possibly related issues when the user types a title.

This uses GraphQL to allow the frontend to request the exact
data that is requires. We also get free caching through the Vue Apollo
plugin.

With this we can include the ability to import .graphql files in JS
and Vue files.
Also we now have the Vue test utils library to make testing
Vue components easier.

Closes #22071
2018-11-27 15:10:40 +00:00
Sean McGivern 02268a85be Extract EE-specific lines from issues controller 2018-10-24 10:13:58 +01:00
Felipe Artur 0ae48e0687 Move issue related_branches to service
Moves the related_branches method from Issue model
to RelatedBranchesService
2018-10-04 15:59:14 -03:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Sean McGivern c73da6c1e7 Move Issue#{referenced,closed_by}_merge_requests to service
These methods don't really need to be on the Issue model. Issue#related_branches
can also be moved to a service, but we can do that in a separate commit.

This commit does not change any behaviour; it just moves code around, renames
the service, and refactors the specs.
2018-08-21 12:40:44 +01:00
Bob Van Landuyt f1d3ea63cf Show the status of a user in interactions
The status is shown for
- The author of a commit when viewing a commit
- Notes on a commit (regular/diff)
- The user that triggered a pipeline when viewing a pipeline
- The author of a merge request when viewing a merge request
- The author of notes on a merge request (regular/diff)
- The author of an issue when viewing an issue
- The author of notes on an issue
- The author of a snippet when viewing a snippet
- The author of notes on a snippet
- A user's profile page
- The list of members of a group/user
2018-07-30 15:01:26 +02:00
Imre Farkas 6954ebbe55
Render calendar feed inline when accessed from GitLab
With text/calendar as Content-Type, the browser always downloads the
content as a file (even ignoring the Content-Disposition header). We
want to display the content inline when accessed from GitLab, similarly
to the RSS feed.
2018-06-18 10:53:52 +02:00
Imre Farkas 20dfe25c15 Export assigned issues in iCalendar feed 2018-05-31 14:01:04 +00:00
Jacopo 5a29a304be Shows new branch/mr button even when branch exists 2018-04-19 13:56:36 +02:00
Bob Van Landuyt 71ccfde322 Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests
within a project.

So they need to be a allowed to create a branch and create a merge request.
2018-04-11 10:51:17 +02:00
Bob Van Landuyt 8ad9c4e873 Rename `create_merge_request` permissions
So we can distinguish between the permissions on the source and the
target project.

- `create_merge_request_from` indicates a user can create a merge
  request with the project as a source_project
- `create_merge_request_in` indicates a user can create a merge
  request with the project as a target_project
2018-04-11 10:51:15 +02:00
Fatih Acet 059ab73b8e Render MR Notes with Vue with behind a cookie 2018-02-28 00:10:43 +00:00
Sean McGivern c2fc40668c Refactor IssuableFinder to extract model-specific logic
By extracting a new `filter_items` method, we can override that in the
IssuesFinder and MergeRequestsFinder separately, so we don't need checks that
the model is the correct one, because we can just use the class we're in to know
that.

We can do the same for the VALID_PARAMS constant, by making it a class method.
2018-02-21 10:31:29 +00:00
Sean McGivern 16908f9718 Merge branch '26466-natural-sort-mrs' into 'master'
Group MR numbers on issue show page by project and namespace

Closes #26466

See merge request gitlab-org/gitlab-ce!8494
2018-02-13 14:39:09 +00:00
Jeff Stubler 9abbe3cc86 Change issue show page to group MRs by projects and namespaces
Closes #26466.
2018-02-13 07:47:09 -06:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
Christiaan Van den Poel 66ebb206b0 disables the shortcut to the issue boards when issues are disabled 2018-01-08 09:06:25 +00:00
Vitaliy @blackst0ne Klachkov 5bc32b65f1 Add an ability to use a custom branch name on creation from issues 2017-11-25 22:33:05 +11:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Jarka Kadlecova ad6e650262 Refactor issuables index actions 2017-11-07 14:34:12 +01:00
Jarka Kadlecova 064c8949bd CE port of code changed for epics 2017-11-02 07:14:35 +01:00
Eric Eastwood 6dc9028fbb Load participants async 2017-10-31 16:15:03 +00:00
Sean McGivern 17b4367045 Revert "Merge branch '36670-remove-edit-form' into 'master'"
This reverts commit 915e35a299, reversing
changes made to 9533786f52.
2017-10-26 15:53:55 +01:00
Sean McGivern a68a39e341 Merge branch '18608-lock-issues-v2' into 'master'
Resolve "Lock issue and merge request"

Closes #18608

See merge request gitlab-org/gitlab-ce!14531
2017-10-06 16:47:27 +00:00
Jarka Kadlecova 7f69659a5d Remove edit action for issues 2017-10-03 11:26:12 +02:00
Luke "Jared" Bennett ff7b545c8e
Merge remote-tracking branch 'origin/master' into 18608-lock-issues 2017-09-20 15:23:00 +01:00
Stan Hu 3b9c45a317 Remove unnecessary loading of discussions in `IssuesController#show`
Discussions are now done asynchronously via the `IssuesController#discussions`
endpoint, so this should no longer be needed. This was taking 32% of the load
time for GitLab CE issue 1.

Closes #38034
2017-09-19 01:56:39 -07:00
Stan Hu 8690ca5c28 Eliminate N+1 queries in loading discussions.json endpoint
In #37955,we see that the profile had a number of N+1 queries from repeated
access to `cross_reference_not_visible_for?`. This was optimized in previous
versions of GitLab by rendering all notes at once, counting the number of
visible references, and then using that number to check whether a system note
should be fully redacted.

There was also another N+1 query calling `ProjectTeam#member?`, which did not
take advantage of an optimization in prepare_notes_for_rendering that would
preload the maximum access level per project.

Closes #37955
2017-09-18 06:53:33 -07:00
Jarka Kadlecova b928720852 Support discussion locking in the backend 2017-09-14 14:50:32 +02:00
Sean McGivern 5f6545f36c Move issues index variable setting to a method
This makes it easier to reuse in EE.
2017-09-07 11:46:52 -04:00
micael.bergeron 966b1128d8 WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the
cost of having to mark notes with an attribute

this opens up the possibility for other special roles for notes
2017-09-06 09:00:57 -04:00
Yorick Peterse 42062a454a
Re-use issue/MR counts for the pagination system
This changes the issue and MR index pages so the pagination system
re-uses the output of the COUNT(*) query used to calculate the number of
rows per state (opened, closed, etc). This removes the need for an
additional COUNT(*) on both pages.
2017-09-05 11:53:45 +02:00
Eric Eastwood 90c60138db Move "Move to different project" to sidebar
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/34261
2017-09-03 22:03:17 -05:00
Douwe Maan b181d3124e Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	app/models/issue.rb
2017-08-30 10:14:56 +02:00
Maxim Rydkin 48d3e5fac6 replace `is_edited?` with `edited?` 2017-08-29 11:14:41 +03:00
Douwe Maan b7c1b05f30 No explicit `to_a` or instance variables needed. 2017-08-18 12:47:50 +02:00