gitlab-org--gitlab-foss/app/helpers
Douwe Maan 030c82267f Merge branch '23341-fix-viewing-mr-from-deleted-project' into 'master'
Fix a 500 error viewing an MR with a deleted source project

## What does this MR do?

Allows merged MRs to be shown without any 500 errors if the source project is removed

## Are there points in the code the reviewer needs to double check?

31c37c6c38 fixed this for closed MRs only. I had trouble understanding the introduced helper and logic, so reverted it and keyed everything on the existence of the source project or branch directly.

commits.json returns a 500 error for a closed or merged MR; the approach taken in the above MR was to hide the commits... tab, so I've run with that.

For merged MRs, the commits (but not the pipeline data) are in the target project, so we *could* do better, but it's a fairly nasty intervention to make it happen.

## Why was this MR needed?

Viewing merged MRs should work even if the fork they came from has been deleted or unlinked.

## Screenshots (if relevant)

![Screen_Shot_2016-10-19_at_17.56.37](/uploads/1aeadd5147b9a4ad29b946b1c7ea52cb/Screen_Shot_2016-10-19_at_17.56.37.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #23341

See merge request !6991
2016-10-20 14:03:10 +00:00
..
appearances_helper.rb Enable CacheMarkdownField for the remaining models 2016-10-07 02:54:26 +01:00
application_helper.rb Cache the issuable counters for 2 minutes 2016-09-30 12:02:54 +02:00
application_settings_helper.rb Enable CacheMarkdownField for the remaining models 2016-10-07 02:54:26 +01:00
auth_helper.rb
avatars_helper.rb Removes 'hidden-xs' class from user_avatar helper in order for it to be visible in environments list. 2016-10-06 11:32:58 +01:00
award_emoji_helper.rb Simpler arguments passed to named_route on toggle_award_url helper method 2016-10-19 21:58:12 +02:00
blob_helper.rb Move editor paths to helper 2016-08-19 16:17:14 +01:00
boards_helper.rb Moved data attribute values into helper method 2016-10-12 12:50:47 +01:00
branches_helper.rb implements the basic filter functionality 2016-07-19 19:30:10 +01:00
broadcast_messages_helper.rb Enable CacheMarkdownField for the remaining models 2016-10-07 02:54:26 +01:00
builds_helper.rb Remove unnecessary retried check & fix test failures 2016-10-18 08:29:29 -05:00
button_helper.rb Adds btn-transparent class in correct place due to changes in master 2016-10-11 11:03:47 +01:00
ci_status_helper.rb Commit status icon now links to pipelines tab of commit view 2016-09-27 22:11:13 +01:00
commits_helper.rb Eliminate unneeded calls to Repository#blob_at when listing commits with no path 2016-08-17 17:07:08 +02:00
compare_helper.rb Project tools visibility level 2016-09-01 11:47:59 -03:00
dashboard_helper.rb
diff_helper.rb Avoid commit lookup on diff_helper 2016-08-10 13:09:07 +02:00
dropdowns_helper.rb Uses the selected values from the controller not the params 2016-07-20 10:48:02 +01:00
emails_helper.rb
events_helper.rb Stop event_commit_title from escaping its output 2016-10-18 13:49:52 +01:00
explore_helper.rb Enable Style/SpaceAroundEqualsInParameterDefault cop 2016-08-06 04:03:01 +02:00
external_wiki_helper.rb speed up ExternalWikiService#get_project_wiki_path 2016-07-19 09:06:58 -04:00
form_helper.rb
git_helper.rb Improve merge request version feature 2016-09-07 10:24:48 +03:00
gitlab_markdown_helper.rb Enable CacheMarkdownField for the remaining models 2016-10-07 02:54:26 +01:00
gitlab_routing_helper.rb Add back the space which Sublime can't easily tell: 2016-10-14 20:11:56 +08:00
graph_helper.rb
groups_helper.rb Syntax fixes and better tests for helper methods. Updated docs. 2016-09-15 14:10:49 -05:00
icons_helper.rb
import_helper.rb Don't create groups for unallowed users when importing projects 2016-08-31 12:55:45 -03:00
issuables_helper.rb Added issuable_filters_present to check for active filters before rendering the reset button 2016-10-07 14:25:20 +01:00
issues_helper.rb Optimize the award_user_list helper spec 2016-10-07 16:34:58 +02:00
javascript_helper.rb
kerberos_spnego_helper.rb
labels_helper.rb Disable subscribing to group-level labels 2016-10-19 14:58:28 -02:00
lfs_helper.rb Use GitLab Routing helpers for the documentation URL in LfsHelper 2016-09-26 17:23:00 -05:00
members_helper.rb Show member roles to all users on members page 2016-08-11 11:08:07 -05:00
merge_requests_helper.rb Fix the merge request view when source projects or branches are removed 2016-10-20 12:24:27 +01:00
milestones_helper.rb Merge branch 'master' into revert-c676283b 2016-10-03 09:10:20 +01:00
namespaces_helper.rb few fixes based on MR feedback 2016-09-20 10:15:20 +02:00
nav_helper.rb remove dead code - 'collapsed_nav' cookie no longer used since a1fbdbb6 (see MR !4579) 2016-09-07 14:02:21 -05:00
notes_helper.rb Fix note form hint showing slash commands supported for commits 2016-09-20 13:58:14 +02:00
notifications_helper.rb
page_layout_helper.rb ensure the 'fixed layout' preference is honored whenever possible 2016-09-20 00:51:00 -05:00
preferences_helper.rb Add visibility level to project repository 2016-10-17 18:12:18 -02:00
projects_helper.rb Add visibility level to project repository 2016-10-17 18:12:18 -02:00
runners_helper.rb
search_helper.rb Make search results use the markdown cache columns, treating them consistently 2016-10-07 02:54:26 +01:00
selects_helper.rb fix group links 404 2016-10-05 09:57:54 +01:00
sentry_helper.rb Fix Sentry not reporting right program for Sidekiq workers 2016-08-25 19:42:52 -07:00
services_helper.rb Add option to confidential issues events to trigger services 2016-08-31 18:34:45 -03:00
sidekiq_helper.rb Remove original regexp 2016-09-08 19:41:25 +02:00
snippets_helper.rb Reordered dropdown options 2016-09-07 15:12:03 +01:00
sorting_helper.rb Restore Largest repository sort option on admin projects page 2016-08-15 16:01:23 -05:00
submodule_helper.rb
tab_helper.rb
tags_helper.rb filters tags by name 2016-08-31 11:42:33 +01:00
time_helper.rb Cleanup the use of duration and optimize some queries 2016-08-10 23:12:02 +08:00
todos_helper.rb Removed try method call on due date 2016-10-03 15:07:35 +01:00
tree_helper.rb Update tree view to sort folders with submodules 2016-08-09 14:08:47 +01:00
triggers_helper.rb
u2f_helper.rb
version_check_helper.rb
visibility_level_helper.rb
workhorse_helper.rb Verify JWT messages from gitlab-workhorse 2016-09-05 15:05:31 +02:00