Commit Graph
117 Commits
Author SHA1 Message Date
Yorick Peterse e7849b0b25 Memoize reference_pattern/link_reference_pattern
These methods are called quite often in loops so by memoizing their
output we can reduce timings a bit.
2016-04-01 11:13:30 +02:00
Grzegorz Bizon 915bfedfa7 Do not allow to move issue if it has not been persisted 2016-03-23 09:41:39 +01:00
Douwe Maan ae7b2ef62c Merge branch 'master' into issue_12658
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
2016-03-21 23:22:21 +01:00
Robert Speicher ffc3acd498 Merge branch 'issues-show-performance' into 'master'
Improve performance of viewing individual issues

This MR does two things:

1. `Issue#related_branches` no longer performs Git operations that aren't needed
2. The output of `Repository#exists?` is now cached and flushed properly

Combined these two changes should further cut down the amount of Git operations performed when viewing individual issues (and possibly other pages).

See merge request !3296
2016-03-21 14:42:25 +00:00
Douwe Maan fd8d44ca61 Fix group project selection in IssuableFinder 2016-03-20 21:14:39 +01:00
Grzegorz Bizon 797af06491 Merge branch 'master' into feature/issue-move
* master:
  Fix bug where wrong commit ID was being used in a merge request diff to show old image
  Remove CHANGELOG item that was added during merge resolution
  Improve the "easy WIP & un-WIP from link" feature
  Fix specs
  \#to_branch_name now uses the iid as postfix
  Add label description in tooltip to labels in issue index and sidebar
  Easily (un)mark merge request as WIP using link
  Use specialized system notes when MR is (un)marked as WIP
  another attempt to fix oauth issue
  attempting to fix omniauth problem

Conflicts:
	app/assets/javascripts/issuable_form.js.coffee
2016-03-20 11:01:08 +01:00
Yorick Peterse 41b8d22631 Tweaked performance of Issue#related_branches
Requesting the branch names of a repository works even when it's empty,
thus there's no need to explicitly check for an empty repository.
Removing this check cuts down the amount of Git operations which in turn
cuts down request timings a bit. The regular expression used to compare
branches was also moved out of the loop so it's created only once.
2016-03-19 21:54:08 +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
Zeger-Jan van de Weg 70ca3370eb \#to_branch_name now uses the iid as postfix
Given the branch name 'mep-mep' with an iid being 1,
the current way, master's way, would yield a branch name of
1-mep-mep. The problem for larger projects however would be that
a developer might forget what iid the issue was.

When this developer would try to tab complete it would:
- Or result in 20+ branches possibly
- Or start with the wrong digit, try again with digit++
  - Would see 20 branches, repeat

Thus the obvious way of solving this is letting the dev tab complete
on the issue title, which is easier to remember.
2016-03-18 19:34:04 +01:00
Douglas Barbosa Alexandre 34ee75379c Restrict access to confidential issues 2016-03-17 20:55:38 -03:00
Zeger-Jan van de Weg 9337406671 Fix specs
Spinach was right, I was a fool..
2016-03-17 12:05:54 +01:00
Grzegorz Bizon b9036ba610 Prevent issue move if issue has been already moved 2016-03-17 11:48:51 +01:00
Grzegorz Bizon dda7f9635f Add field that references issue this issue has been moved to 2016-03-17 10:31:17 +01:00
Zeger-Jan van de Weg 4827458155 Incorporate the review and update spec
The feature spec now also tests the absence of the new branch button
2016-03-15 21:59:25 +01:00
Zeger-Jan van de Weg 2b97c92119 Incorporate review 2016-03-15 20:21:11 +01:00
Zeger-Jan van de WegandZeger-Jan van de Weg ad97bebfed Enhance new branch button on an issue 2016-03-15 20:21:11 +01:00
Zeger-Jan van de WegandZeger-Jan van de Weg 228007dfbc new-branch-button 2016-03-15 20:21:11 +01:00
Valery Sizov be7bc9d9b0 Backport some changes from EE 2016-01-22 11:24:44 +02: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
Yorick Peterse 19a0db30ba Removed ORDER BY in "of_group" scopes
These scopes don't care about the order. Removing the explicit "ORDER
BY" can speed up the queries by a little bit.
2016-01-07 15:34:37 +01:00
Yorick Peterse 0d0049c058 Don't pluck IDs when getting issues/MRs per group
This replaces plucking of IDs with a sub-query, saving the overhead of
loading the data in Ruby and then mapping the rows to an Array of IDs.
This also scales much better when dealing with a large amount of IDs
that would be involved.
2016-01-07 14:53:02 +01:00
Douwe Maan 5ef2048f65 Fix issue related cross-project MRs 2015-12-21 15:36:08 +01:00
Douwe Maan 6560d053ed Use lazy reference extractor to get issue's MRs 2015-12-15 16:57:11 +01:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00
Greg Smethells 0272f27401 display referenced merge requests in issue description with CI status 2015-12-11 10:14:55 -06:00
Douwe Maan f3ea06eb7f Autolink first so we don't pick up numeric anchors as issue references. 2015-12-01 15:53:32 +01:00
Douwe Maan d6a5b45c8e Recognize issue/MR/snippet/commit links as references. 2015-11-30 21:36:34 +01: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
Stan Hu d7812a95cf Re-annotate models 2015-09-06 07:48:48 -07:00
Robert Speicher 1a9da9178c Surround Project.reference_pattern in parenthesis inside other patterns 2015-05-26 15:49:22 -04:00
Robert Speicher b88da58cb6 Add reference_pattern to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher 0359d41b06 Implement gfm_reference directly in Mentionable
Except for Note, which still overrides it.
2015-05-26 15:48:31 -04:00
Robert Speicher c0faf91ff2 Add to_reference for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Douwe Maan e97cdb042d Remove old team scopes. 2015-03-15 13:50:38 +01:00
Dmitriy Zaporozhets e0aa5c371e Fix method overlap for issue sorting 2015-02-05 16:49:41 -08: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 03b44916ba Merge pull request #7754 from Bugagazavr/hooks
More information in merge request hook
2014-10-03 13:37:19 +03:00
Kirill Zaitsev 1c9d2e39c1 Hook attributes 2014-10-02 12:58:02 +04:00
Ciro Santilli 705fe01dca Factor issue and edit MR form label field and submit. 2014-09-22 21:24:25 +02:00
Dmitriy Zaporozhets 92deb451da Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-25 12:25:02 +03:00
Dmitriy Zaporozhets d45a6b2941 Migrate issue/mr labels from act_as_taggable to own labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-29 19:19:26 +03:00
Jeroen van Baarsen 16eea49277 Moved some behaviour to one place
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-07-25 22:23:42 +02:00
Dmitriy Zaporozhets 1dab15940d Remove protected_atrributes gem and start moving to strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 14:30:07 +03:00
Earle Bunao & Neil Calabrosoanderbunao 6a85cdf162 Implements drag and drop upload in creating issues 2014-05-23 16:22:42 +08:00
Dmitriy Zaporozhets 36f861f1b1 Re-annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-09 15:05:03 +03:00
Dmitriy Zaporozhets f08464c055 Remove author_id_of_changes from app
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 14:01:52 +02:00
Dmitriy Zaporozhets 36b065e634 Feature: reopen closed merge request
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-28 22:43:16 +02:00
Alexey Elizarov 984eb08cbe Duplicate opened scope for issue
Was it correct?
2013-12-17 23:32:19 +03:00
Drew Blessing 63723ef6df Fix dashboard event caching 2013-12-13 13:40:45 -06:00