Commit Graph
80 Commits
Author SHA1 Message Date
Zeger-Jan van de Weg 6e5461c6ee Merge branch 'master' into 2489-soft-delete-issues 2016-03-21 19:32:37 +01:00
Zeger-Jan van de Weg 3b088fc5b5 Minor improvements on IssuableActions 2016-03-21 16:59:35 +01:00
Kamil Trzciński 3fca30d27f Merge branch 'feature/issue-move' into 'master'
Ability to move issue to another project

Tasks:

- [x] Create scaffold of service that will move issue to another project.
- [x] Close old issue, add system note about moving issue to a new project.
- [x] Create a new issue, add system note about issue being moved from old project.
- [x] Check if issue can be moved to another project before executing service
- [x] Check permissions when moving an issue (`:admin_issue` ability)
- [x] Display select box for a new project when editing an issue
- [x] Show only projects that issue can be moved into in that select box
- [x] Add project select handler, helper and some permission filters to it
- [x] Preserve as much information as possible, including author
- [x] Prepare mechanisms that unfolds local references in issue description
- [x] Rewrite issue description with references unfolding and add some specs for it
- [x] Rewrite all system notes and comments attached to issue that is being moved
- [x] Update `Label` so that is was able to create cross reference labels (separate MR)
- [x] Add notifications about moving issue to another project
- [x] Display confirmation alert/message when issue move has been requested
- [x] Make it possible to undo selecting project where issue will be moved to
- [x] Add column to issue, that will indicate if it has been moved to another project
- [x] Do not allow to move issue that has been already moved
- [x] Write top-to-bottom feature spec in RSpec instead of Spinach

UI:

![issue_move_ui](/uploads/b3c6b563362c1fded9082cc0f51e5a74/issue_move_ui.png)

![issue_move_tooltip](/uploads/2ab913b06f52df1cafde9abe89bd9cb8/issue_move_tooltip.png)

Closes #3024

See merge request !2831
2016-03-21 14:01:19 +00:00
Grzegorz Bizon f0211a4ea9 Do not pass params that are not used in issue move service 2016-03-20 09:28:06 +01:00
Robert Speicher 085538c2bd Use the configured Kaminari "per page" default 2016-03-19 17:37:54 -04:00
Zeger-Jan van de Weg 7342a4566c Dry destroy action on issuables 2016-03-19 21:24:05 +01:00
Zeger-Jan van de Weg 212e83bab3 Soft delete issuables 2016-03-19 21:23:03 +01:00
Grzegorz Bizon 0115ad66d2 Merge branch 'master' into feature/issue-move
* 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
2016-03-19 18:50:15 +01:00
Grzegorz Bizon 9b13ce0b7a Improvements in issue move feaure (refactoring)
According to endbosses' suggestions.
2016-03-19 18:46:01 +01:00
Douglas Barbosa Alexandre 34ee75379c Restrict access to confidential issues 2016-03-17 20:55:38 -03:00
Douglas Barbosa Alexandre 6b86d3fb80 Add an option to user make an issue confidential 2016-03-17 20:55:38 -03:00
Grzegorz Bizon 57eb395488 Do not pass unsanitized params to issue move service 2016-03-17 07:39:15 +01:00
Grzegorz Bizon c8e7d1ed8e Add issue move implementation to controller 2016-03-17 07:39:15 +01:00
Zeger-Jan van de WegandZeger-Jan van de Weg 228007dfbc new-branch-button 2016-03-15 20:21:11 +01:00
Rémy Coutable c98089b2b2 Move the #toggle_subscription controller method to a concern 2016-03-15 18:22:03 +01:00
Rémy Coutable 54ec7e9599 Improving the original label-subscribing implementation
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
2016-03-15 18:22:02 +01:00
Tap 2e81b1558b Label description and Label row
- Add label description
- Show label row when filtering issues or merge requests by label
2016-02-17 21:52:12 +08:00
Yorick Peterse f7240e03a6 Fix autocomplete for new issues/MRs/snippets 2016-01-15 11:29:53 +01:00
Rémy Coutable 9d7f88c122 Show referenced MRs & Issues only when the current viewer can access them 2016-01-13 11:59:10 +01:00
Dmitriy Zaporozhets c6c244315a Implement new sidebar for merge request page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-11 20:11:23 +01:00
Greg Smethells 0272f27401 display referenced merge requests in issue description with CI status 2015-12-11 10:14:55 -06:00
Jose Corcuera b9df1a6355 Strip attributes for Milestone and Issuable. #3428 2015-11-26 10:16:50 -05:00
Valery Sizov fd2c0fe446 award emoji 2015-11-19 01:25:27 +02:00
Drew Blessing 752d528019 Fix trailing space issue with merge requests and issues. Fixes #2514 2015-11-10 15:41:49 -06:00
Stan Hu 9bfc531ec6 Redirect to a default path if HTTP_REFERER is not set
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.

Closes #3122

Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Zeger-Jan van de Weg 94a788f66d Only accept open issues and merge requests 2015-10-16 09:59:32 +02:00
Zeger-Jan van de Weg 9f9f0c35ec Show merge requests which close current issue 2015-10-16 09:46:59 +02:00
Yorick Peterse e5925d073e Renamed Note.inc_associations to with_associations 2015-10-15 12:05:01 +02:00
Yorick Peterse 1554786c6a Eager load various issue/note associations
This ensures we don't end up running N+1 queries for the objects in the
affected collections.
2015-10-15 12:05:01 +02:00
Douwe Maan b0164771ec Simplify code around (cross)-references 2015-10-12 11:54:46 +02:00
Stan Hu f33fe50f0d Disable internal issue tracker if external tracker in use
Closes #2006
2015-07-17 22:59:31 -07:00
Dmitriy Zaporozhets d63371ad78 Update controller filters
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 16:44:21 +02:00
Dmitriy Zaporozhets 342d553709 Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Dmitriy Zaporozhets a5f23435f7 Improve performance for issue#show page
* store @participants in variable
* store result of subscribed? call into variable

In total it reduce amount of SQL queries for issue with 10 comments/participants twice.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-24 12:49:34 +02:00
Nikita Verkhovin 241f5971ba Add search issues/MR by number 2015-05-18 13:09:13 +06:00
Jeroen van Baarsen 5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Valery Sizov 1b437ec349 tests 2015-03-16 21:38:41 +02:00
Valery Sizov 410d25c8ca rename table subscribe; make it polymorfic 2015-03-16 15:22:50 +02:00
Valery Sizov 9698b36c1c Subscription 2015-03-15 19:44:59 +02:00
Dmitriy Zaporozhets f0cbbd70bb Use same constant for amount of items per page 2015-03-12 15:37:00 -07:00
Douwe Maan b673d87227 Send notifications and leave system comments when bulk updating issues. 2015-03-06 15:01:13 +01:00
Dmitriy Zaporozhets 128012dba8 More use of shortcut routes 2015-02-25 19:50:01 -08:00
Dmitriy Zaporozhets 9459e9db24 Fix updating issue 500 error 2015-02-22 22:26:09 -08:00
Vinnie Okada 76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Dmitriy Zaporozhets 016981c009 Refactor issuable list pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-24 11:04:33 +02:00
Dmitriy Zaporozhets 47634e392f Refactor issues and merge requests lists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-23 18:49:39 +02:00
Dmitriy Zaporozhets e0f30c605b Add author filter for issues & merge requests pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-05 17:13:07 +02:00
Vinnie Okada 9f0083a96c Add task lists to issues and merge requests
Make the Markdown parser recognize "[x]" or "[ ]" at the beginning of a
list item and turn it into a checkbox input.  Users who can modify the
issue or MR can toggle the checkboxes directly or edit the Markdown to
manage the tasks.  Task status is also displayed in the MR and issue
lists.
2014-10-05 22:15:27 -05:00
Dmitriy Zaporozhets 810028f3f3 Dont show blocked users in assignee filter
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 19:05:27 +03:00
Dmitriy Zaporozhets 8b00d01c67 Search by issue/mr title and description
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-27 12:47:30 +03:00