mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 15:46:08 +10:00
Merge remote-tracking branch 'origin/master' into feature-admin-emails
Conflicts: db/schema.rb
This commit is contained in:
@@ -42,7 +42,8 @@ class JiraService < Service
|
||||
{ type: 'text', name: 'project_url', placeholder: 'Url to JIRA, http://jira.example' },
|
||||
{ type: 'text', name: 'username', placeholder: '' },
|
||||
{ type: 'password', name: 'password', placeholder: '' },
|
||||
{ type: 'text', name: 'api_version', placeholder: '2' }
|
||||
{ type: 'text', name: 'api_version', placeholder: '2' },
|
||||
{ type: 'text', name: 'jira_issue_transition_id', placeholder: '2' }
|
||||
]
|
||||
end
|
||||
|
||||
@@ -69,7 +70,7 @@ class JiraService < Service
|
||||
}]
|
||||
},
|
||||
'transition' => {
|
||||
'id' => '2'
|
||||
'id' => jira_issue_transition_id
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,17 @@
|
||||
%strong
|
||||
= @group.created_at.stamp("March 1, 1999")
|
||||
|
||||
- if @group.ldap_cn.present?
|
||||
%li
|
||||
%span.light LDAP group cn:
|
||||
%strong
|
||||
= @group.ldap_cn
|
||||
|
||||
%li
|
||||
%span.light LDAP access level:
|
||||
%strong
|
||||
= @group.human_ldap_access
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title
|
||||
@@ -50,11 +61,11 @@
|
||||
= paginate @projects, param_name: 'projects_page', theme: 'gitlab'
|
||||
|
||||
- if @group.shared_projects.any?
|
||||
.ui-box
|
||||
.title
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
Projects shared with #{@group.name}
|
||||
%small
|
||||
(#{@group.shared_projects.count})
|
||||
%span.badge
|
||||
#{@group.shared_projects.count}
|
||||
%ul.well-list
|
||||
- @group.shared_projects.sort_by(&:name).each do |project|
|
||||
%li
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
- if current_user && current_user.can?(:manage_group, @group)
|
||||
.pull-right
|
||||
- if ldap_enabled? && @group.ldap_cn.present?
|
||||
= link_to reset_access_group_ldap_path(@group), class: 'btn grouped', data: { confirm: "Reset the access level of all other LDAP group team members to '#{@group.human_ldap_access}'?" }, method: :put do
|
||||
= link_to reset_access_group_ldap_path(@group), class: 'btn btn-grouped', data: { confirm: "Reset the access level of all other LDAP group team members to '#{@group.human_ldap_access}'?" }, method: :put do
|
||||
Reset access
|
||||
|
||||
= link_to '#', class: 'btn btn-new js-toggle-button' do
|
||||
@@ -28,6 +28,14 @@
|
||||
.js-toggle-content.hide.new-group-member-holder
|
||||
= render "new_group_member"
|
||||
|
||||
- if ldap_enabled? && @group.ldap_cn.present?
|
||||
.bs-callout.bs-callout-info
|
||||
The members of this group are synced with the LDAP group with cn
|
||||
%code #{@group.ldap_cn}
|
||||
\. They are given
|
||||
%code #{@group.human_ldap_access}
|
||||
access.
|
||||
|
||||
.panel.panel-default.prepend-top-20
|
||||
.panel-heading
|
||||
%strong #{@group.name}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
class AddJiraIssueTransitionIdToServices < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :services, :jira_issue_transition_id, :string, default: '2'
|
||||
Service.reset_column_information
|
||||
Service.where(jira_issue_transition_id: nil).update_all jira_issue_transition_id: '2'
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :services, :jira_issue_transition_id
|
||||
end
|
||||
end
|
||||
+4
-3
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20140811083829) do
|
||||
ActiveRecord::Schema.define(version: 20140811155127) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -273,10 +273,10 @@ ActiveRecord::Schema.define(version: 20140811083829) do
|
||||
t.string "type"
|
||||
t.string "title"
|
||||
t.string "token"
|
||||
t.integer "project_id", null: false
|
||||
t.integer "project_id", null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "active", default: false, null: false
|
||||
t.boolean "active", default: false, null: false
|
||||
t.string "project_url"
|
||||
t.string "subdomain"
|
||||
t.string "room"
|
||||
@@ -285,6 +285,7 @@ ActiveRecord::Schema.define(version: 20140811083829) do
|
||||
t.string "username"
|
||||
t.string "password"
|
||||
t.string "api_version"
|
||||
t.string "jira_issue_transition_id", default: "2"
|
||||
end
|
||||
|
||||
add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree
|
||||
|
||||
@@ -55,5 +55,13 @@ describe JiraService, models: true do
|
||||
body: /Issue solved with/
|
||||
).once
|
||||
end
|
||||
|
||||
it "calls the api with jira_issue_transition_id" do
|
||||
@jira_service.jira_issue_transition_id = 'this-is-a-custom-id'
|
||||
@jira_service.execute(@sample_data, JiraIssue.new("JIRA-123"))
|
||||
WebMock.should have_requested(:post, @api_url).with(
|
||||
body: /this-is-a-custom-id/
|
||||
).once
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user