Commit Graph

92 Commits

Author SHA1 Message Date
Jacob Schatz bb59a1f98e Merge branch 'assign-to-issuable-opener' into 'master'
Issuable can be assigned to author

Closes #9014

The only difference with #9014 is that I thoughed the author should also be
able to assign the issue. If this is unwanted behavior Ill revert it.

/cc @DouweM

See merge request !2765
2016-04-15 15:43:26 +00:00
Yorick Peterse 31e28ebceb
Load related MRs/branches asynchronously
Currently this works by loading the HAML partials via XHR. While this is
not the nicest setup it _is_ the easiest setup using the tools we
currently have.

Loading this data asynchronously doesn't make loading the related
MRs/branches itself faster, it merely ensures that loading the issue
itself is not slowed down.

Fixes gitlab-org/gitlab-ce#14949
2016-04-13 17:24:21 +02:00
Zeger-Jan van de Weg 3339513ca6 Merge branch 'master' into assign-to-issuable-opener 2016-03-29 17:26:59 +02:00
Jacob Schatz 53a831124e Edit button leaves modal open
Add user avatar to user selection
2016-03-25 09:54:05 -04:00
Alfredo Sumaran deee55f0bb Remove unnecessary sentence 2016-03-25 08:10:25 -04:00
Jacob Schatz e8d8411016 Adds new dropdown ajax to user selection 2016-03-25 08:07:57 -04:00
Jacob Schatz 3753ace9ba Add labels as proper POST arrays using new dropdown 2016-03-25 08:07:57 -04:00
Jacob Schatz 024dc8073e Add milestone sidebar update via JSON 2016-03-25 08:04:57 -04:00
Jacob Schatz a76ee508fb Ajax call to milestones via new dropdowns 2016-03-25 08:04:57 -04:00
Jacob Schatz ff86138d76 Sidebar milestone updatable via JSON 2016-03-25 08:04:57 -04:00
Jacob Schatz 16ba5eb4d8 Updates sidebar milestone to use new dropdowns 2016-03-25 08:03:16 -04:00
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 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
Zeger-Jan van de Weg df27b3a174 Issuable can be assigned to author
Closes #9014

The only difference with #9014 is that I thoughed the author should also be
able to assign the issue. If this is unwanted behavior Ill revert it.
2016-02-22 12:10:56 +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