Commit baef45e9c183d4dedd1c76c0bd1854b46d7ccb1a
1 parent
892c84ea
Exists in
master
and in
1 other branch
Added #url to issue trackers, for links on apps#index table
Showing
7 changed files
with
32 additions
and
2 deletions
Show diff stats
app/models/issue_tracker.rb
app/models/issue_trackers/fogbugz_tracker.rb
... | ... | @@ -40,5 +40,9 @@ class IssueTrackers::FogbugzTracker < IssueTracker |
40 | 40 | def body_template |
41 | 41 | @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/fogbugz_body.txt.erb")) |
42 | 42 | end |
43 | + | |
44 | + def url | |
45 | + "http://#{account}.fogbugz.com/" | |
46 | + end | |
43 | 47 | end |
44 | 48 | ... | ... |
app/models/issue_trackers/github_issues_tracker.rb
... | ... | @@ -32,4 +32,8 @@ class IssueTrackers::GithubIssuesTracker < IssueTracker |
32 | 32 | def body_template |
33 | 33 | @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/github_issues_body.txt.erb").gsub(/^\s*/, '')) |
34 | 34 | end |
35 | + | |
36 | + def url | |
37 | + "https://github.com/#{project_id}/issues" | |
38 | + end | |
35 | 39 | end | ... | ... |
app/models/issue_trackers/lighthouse_tracker.rb
... | ... | @@ -2,7 +2,7 @@ class IssueTrackers::LighthouseTracker < IssueTracker |
2 | 2 | Label = "lighthouseapp" |
3 | 3 | Fields = [ |
4 | 4 | [:account, { |
5 | - :placeholder => "abc from abc.lighthouseapp.com" | |
5 | + :placeholder => "abc from http://abc.lighthouseapp.com" | |
6 | 6 | }], |
7 | 7 | [:api_token, { |
8 | 8 | :placeholder => "API Token for your account" |
... | ... | @@ -37,5 +37,9 @@ class IssueTrackers::LighthouseTracker < IssueTracker |
37 | 37 | def body_template |
38 | 38 | @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/lighthouseapp_body.txt.erb").gsub(/^\s*/, '')) |
39 | 39 | end |
40 | + | |
41 | + def url | |
42 | + "http://#{account}.lighthouseapp.com" | |
43 | + end | |
40 | 44 | end |
41 | 45 | ... | ... |
app/models/issue_trackers/mingle_tracker.rb
... | ... | @@ -3,7 +3,7 @@ class IssueTrackers::MingleTracker < IssueTracker |
3 | 3 | Fields = [ |
4 | 4 | [:account, { |
5 | 5 | :label => "Mingle URL", |
6 | - :placeholder => "abc from http://abc.fogbugz.com/" | |
6 | + :placeholder => "http://mingle.example.com/" | |
7 | 7 | }], |
8 | 8 | [:project_id, { |
9 | 9 | :placeholder => "Mingle project" |
... | ... | @@ -56,5 +56,11 @@ class IssueTrackers::MingleTracker < IssueTracker |
56 | 56 | hash |
57 | 57 | end |
58 | 58 | end |
59 | + | |
60 | + def url | |
61 | + acc_url = account.start_with?('http') ? account : "http://#{account}" | |
62 | + URI.parse("#{acc_url}/projects/#{project_id}").to_s | |
63 | + rescue URI::InvalidURIError | |
64 | + end | |
59 | 65 | end |
60 | 66 | ... | ... |
app/models/issue_trackers/pivotal_labs_tracker.rb
... | ... | @@ -24,5 +24,9 @@ class IssueTrackers::PivotalLabsTracker < IssueTracker |
24 | 24 | def body_template |
25 | 25 | @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/pivotal_body.txt.erb")) |
26 | 26 | end |
27 | + | |
28 | + def url | |
29 | + "https://www.pivotaltracker.com/" | |
30 | + end | |
27 | 31 | end |
28 | 32 | ... | ... |
app/models/issue_trackers/redmine_tracker.rb
... | ... | @@ -50,5 +50,11 @@ class IssueTrackers::RedmineTracker < IssueTracker |
50 | 50 | def body_template |
51 | 51 | @@body_template ||= ERB.new(File.read(Rails.root + "app/views/issue_trackers/textile_body.txt.erb")) |
52 | 52 | end |
53 | + | |
54 | + def url | |
55 | + acc_url = account.start_with?('http') ? account : "http://#{account}" | |
56 | + URI.parse("#{acc_url}?project_id=#{project_id}").to_s | |
57 | + rescue URI::InvalidURIError | |
58 | + end | |
53 | 59 | end |
54 | 60 | ... | ... |