Commit 6194e0851193d83de047786a7cdf5a157d5caeb2
1 parent
55fcdbe2
Exists in
master
and in
1 other branch
Adds username and password to redmine tracker config.
Showing
1 changed file
with
9 additions
and
1 deletions
Show diff stats
app/models/issue_trackers/redmine_tracker.rb
... | ... | @@ -9,6 +9,12 @@ if defined? RedmineClient |
9 | 9 | [:api_token, { |
10 | 10 | :placeholder => "API Token for your account" |
11 | 11 | }], |
12 | + [:username, { | |
13 | + :placeholder => "Your username" | |
14 | + }], | |
15 | + [:password, { | |
16 | + :placeholder => "Your password" | |
17 | + }], | |
12 | 18 | [:project_id, { |
13 | 19 | :label => "Ticket Project", |
14 | 20 | :placeholder => "Redmine Project where tickets will be created" |
... | ... | @@ -22,7 +28,7 @@ if defined? RedmineClient |
22 | 28 | |
23 | 29 | def check_params |
24 | 30 | if Fields.detect {|f| self[f[0]].blank? && !f[1][:optional]} |
25 | - errors.add :base, 'You must specify your Redmine URL, API token and Project ID' | |
31 | + errors.add :base, 'You must specify your Redmine URL, API token, Username, Password and Project ID' | |
26 | 32 | end |
27 | 33 | end |
28 | 34 | |
... | ... | @@ -31,6 +37,8 @@ if defined? RedmineClient |
31 | 37 | acc = account |
32 | 38 | RedmineClient::Base.configure do |
33 | 39 | self.token = token |
40 | + self.user = username | |
41 | + self.password = password | |
34 | 42 | self.site = acc |
35 | 43 | self.format = :xml |
36 | 44 | end | ... | ... |