summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-13 17:57:39 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-13 17:57:39 +0000
commitb8cc501c3e93d225b826f646a673a97dd0baea9f (patch)
tree4e7c1aab0630ffa26f9549e9ed50ae0189a1ee1e
parent917ae13bf8d31296ab5de6f494727d9b94d60265 (diff)
parent01c6806f804d9b76042229e11077190975eb8bf0 (diff)
downloadgitlab-ce-b8cc501c3e93d225b826f646a673a97dd0baea9f.tar.gz
Merge branch 'add_tracker_integration_doc' into 'master'
Add tracker integration doc and help page on service Added documentation on how to enable tracker integration. Fix the active link on the admin page. Added help under the JIRA service page. See merge request !1508
-rw-r--r--app/models/project_services/jira_service.rb14
-rw-r--r--app/views/admin/services/_form.html.haml4
-rw-r--r--app/views/layouts/nav/_admin.html.haml2
-rw-r--r--doc/integration/external-issue-tracker.md35
-rw-r--r--doc/integration/redmine_configuration.pngbin0 -> 118752 bytes
-rw-r--r--doc/integration/redmine_service_template.pngbin0 -> 198077 bytes
6 files changed, 49 insertions, 6 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index a159c287485..4c056605ea8 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -14,9 +14,23 @@
#
class JiraService < IssueTrackerService
+ include Rails.application.routes.url_helpers
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
+ def help
+ issue_tracker_link = help_page_path("integration", "external-issue-tracker")
+
+ line1 = "Setting `project_url`, `issues_url` and `new_issue_url` will "\
+ "allow a user to easily navigate to the Jira issue tracker. "\
+ "See the [integration doc](#{issue_tracker_link}) for details."
+
+ line2 = 'Support for referencing commits and automatic closing of Jira issues directly ' \
+ 'from GitLab is [available in GitLab EE.](http://doc.gitlab.com/ee/integration/jira.html)'
+
+ [line1, line2].join("\n\n")
+ end
+
def title
if self.properties && self.properties['title'].present?
self.properties['title']
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml
index d8242e37621..5df8849317b 100644
--- a/app/views/admin/services/_form.html.haml
+++ b/app/views/admin/services/_form.html.haml
@@ -9,6 +9,10 @@
.alert.alert-danger
- @service.errors.full_messages.each do |msg|
%p= msg
+ - if @service.help.present?
+ .bs-callout
+ = preserve do
+ = markdown @service.help
- @service.fields.each do |field|
- name = field[:name]
diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml
index 4f864926d08..74334b12e63 100644
--- a/app/views/layouts/nav/_admin.html.haml
+++ b/app/views/layouts/nav/_admin.html.haml
@@ -46,7 +46,7 @@
%span
Applications
- = nav_link(controller: :application_settings) do
+ = nav_link(controller: :services) do
= link_to admin_application_settings_services_path, title: 'Service Templates' do
%i.fa.fa-copy
%span
diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md
index ba4df9f8fe0..53d6898b6e8 100644
--- a/doc/integration/external-issue-tracker.md
+++ b/doc/integration/external-issue-tracker.md
@@ -1,13 +1,38 @@
# External issue tracker
-GitLab has a great issue tracker but you can also use an external issue tracker such as JIRA, Bugzilla or Redmine. This is something that you can turn on per GitLab project. If for example you configure JIRA it provides the following functionality:
+GitLab has a great issue tracker but you can also use an external issue tracker such as Jira, Bugzilla or Redmine. You can configure issue trackers per GitLab project. For instance, if you configure Jira it allows you to do the following:
-- the 'Issues' link on the GitLab project pages takes you to the appropriate JIRA issue index;
-- clicking 'New issue' on the project dashboard creates a new JIRA issue;
-- To reference JIRA issue PROJECT-1234 in comments, use syntax PROJECT-1234. Commit messages get turned into HTML links to the corresponding JIRA issue.
+- the 'Issues' link on the GitLab project pages takes you to the appropriate Jira issue index;
+- clicking 'New issue' on the project dashboard creates a new Jira issue;
+- To reference Jira issue PROJECT-1234 in comments, use syntax PROJECT-1234. Commit messages get turned into HTML links to the corresponding Jira issue.
![Jira screenshot](jira-integration-points.png)
-You can configure the integration in the gitlab.yml configuration file.
+## Configuration
+
+### Project Service
+
+You can enable an external issue tracker per project. As an example, we will configure `Redmine` for project named gitlab-ci.
+
+Fill in the required details on the page:
+
+![redmine configuration](redmine_configuration.png)
+
+* `description` A name for the issue tracker (to differentiate between instances, for example).
+* `project_url` The URL to the project in Redmine which is being linked to this GitLab project.
+* `issues_url` The URL to the issue in Redmine project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the url. This id is used by GitLab as a placeholder to replace the issue number.
+* `new_issue_url` This is the URL to create a new issue in Redmine for the project linked to this GitLab project.
+
+
+### Service Template
+
+It is necessary to configure the external issue tracker per project, because project specific details are needed for the integration with GitLab.
+The admin can add a service template that sets a default for each project. This makes it much easier to configure individual projects.
+
+In GitLab Admin section, navigate to `Service Templates` and choose the service template you want to create:
+
+![redmine service template](redmine_service_template.png)
+
+After the template is created, the template details will be pre-filled on the project service page.
Support to add your commits to the Jira ticket automatically is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jira.html).
diff --git a/doc/integration/redmine_configuration.png b/doc/integration/redmine_configuration.png
new file mode 100644
index 00000000000..6b145363229
--- /dev/null
+++ b/doc/integration/redmine_configuration.png
Binary files differ
diff --git a/doc/integration/redmine_service_template.png b/doc/integration/redmine_service_template.png
new file mode 100644
index 00000000000..1159eb5b964
--- /dev/null
+++ b/doc/integration/redmine_service_template.png
Binary files differ