Commit 68ee87135d58ab6ef05ac5c2c80c582c72c2f9dd

Authored by Nathan Broadbent
1 parent d8aa60d8
Exists in master and in 1 other branch production

Make reported_by an optional argument for issue trackers #create_issue method

app/models/issue_trackers/fogbugz_tracker.rb
... ... @@ -22,7 +22,7 @@ class IssueTrackers::FogbugzTracker < IssueTracker
22 22 end
23 23 end
24 24  
25   - def create_issue(problem, reported_by)
  25 + def create_issue(problem, reported_by = nil = nil)
26 26 fogbugz = Fogbugz::Interface.new(:email => username, :password => password, :uri => "https://#{account}.fogbugz.com")
27 27 fogbugz.authenticate
28 28  
... ...
app/models/issue_trackers/github_issues_tracker.rb
... ... @@ -19,7 +19,7 @@ class IssueTrackers::GithubIssuesTracker < IssueTracker
19 19 end
20 20 end
21 21  
22   - def create_issue(problem, reported_by)
  22 + def create_issue(problem, reported_by = nil)
23 23 client = Octokit::Client.new(:login => username, :token => api_token)
24 24 issue = client.create_issue(project_id, issue_title(problem), body_template.result(binding).unpack('C*').pack('U*'), options = {})
25 25 problem.update_attribute :issue_link, issue.html_url
... ...
app/models/issue_trackers/lighthouse_tracker.rb
... ... @@ -18,7 +18,7 @@ class IssueTrackers::LighthouseTracker < IssueTracker
18 18 end
19 19 end
20 20  
21   - def create_issue(problem, reported_by)
  21 + def create_issue(problem, reported_by = nil)
22 22 Lighthouse.account = account
23 23 Lighthouse.token = api_token
24 24 # updating lighthouse account
... ...
app/models/issue_trackers/mingle_tracker.rb
... ... @@ -27,7 +27,7 @@ class IssueTrackers::MingleTracker < IssueTracker
27 27 end
28 28 end
29 29  
30   - def create_issue(problem, reported_by)
  30 + def create_issue(problem, reported_by = nil)
31 31 properties = ticket_properties_hash
32 32 basic_auth = account.gsub(/https?:\/\//, "https://#{username}:#{password}@")
33 33 Mingle.set_site "#{basic_auth}/api/v1/projects/#{project_id}/"
... ...
app/models/issue_trackers/pivotal_labs_tracker.rb
... ... @@ -13,7 +13,7 @@ class IssueTrackers::PivotalLabsTracker < IssueTracker
13 13 end
14 14 end
15 15  
16   - def create_issue(problem, reported_by)
  16 + def create_issue(problem, reported_by = nil)
17 17 PivotalTracker::Client.token = api_token
18 18 PivotalTracker::Client.use_ssl = true
19 19 project = PivotalTracker::Project.find project_id.to_i
... ...
app/models/issue_trackers/redmine_tracker.rb
... ... @@ -25,7 +25,7 @@ class IssueTrackers::RedmineTracker < IssueTracker
25 25 end
26 26 end
27 27  
28   - def create_issue(problem, reported_by)
  28 + def create_issue(problem, reported_by = nil)
29 29 token = api_token
30 30 acc = account
31 31 RedmineClient::Base.configure do
... ...