jira-ruby-dmg 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +46 -0
- data/README.rdoc +309 -0
- data/Rakefile +28 -0
- data/example.rb +119 -0
- data/http-basic-example.rb +112 -0
- data/jira-ruby-dmg.gemspec +28 -0
- data/lib/jira/base.rb +497 -0
- data/lib/jira/base_factory.rb +49 -0
- data/lib/jira/client.rb +165 -0
- data/lib/jira/has_many_proxy.rb +43 -0
- data/lib/jira/http_client.rb +69 -0
- data/lib/jira/http_error.rb +16 -0
- data/lib/jira/oauth_client.rb +84 -0
- data/lib/jira/railtie.rb +10 -0
- data/lib/jira/request_client.rb +18 -0
- data/lib/jira/resource/attachment.rb +12 -0
- data/lib/jira/resource/comment.rb +14 -0
- data/lib/jira/resource/component.rb +10 -0
- data/lib/jira/resource/field.rb +10 -0
- data/lib/jira/resource/filter.rb +15 -0
- data/lib/jira/resource/issue.rb +76 -0
- data/lib/jira/resource/issuetype.rb +10 -0
- data/lib/jira/resource/priority.rb +10 -0
- data/lib/jira/resource/project.rb +31 -0
- data/lib/jira/resource/status.rb +10 -0
- data/lib/jira/resource/transition.rb +33 -0
- data/lib/jira/resource/user.rb +14 -0
- data/lib/jira/resource/version.rb +10 -0
- data/lib/jira/resource/worklog.rb +16 -0
- data/lib/jira/tasks.rb +0 -0
- data/lib/jira/version.rb +3 -0
- data/lib/jira.rb +33 -0
- data/lib/tasks/generate.rake +18 -0
- data/spec/integration/attachment_spec.rb +23 -0
- data/spec/integration/comment_spec.rb +55 -0
- data/spec/integration/component_spec.rb +42 -0
- data/spec/integration/field_spec.rb +35 -0
- data/spec/integration/issue_spec.rb +94 -0
- data/spec/integration/issuetype_spec.rb +26 -0
- data/spec/integration/priority_spec.rb +27 -0
- data/spec/integration/project_spec.rb +56 -0
- data/spec/integration/status_spec.rb +27 -0
- data/spec/integration/transition_spec.rb +52 -0
- data/spec/integration/user_spec.rb +25 -0
- data/spec/integration/version_spec.rb +43 -0
- data/spec/integration/worklog_spec.rb +55 -0
- data/spec/jira/base_factory_spec.rb +46 -0
- data/spec/jira/base_spec.rb +586 -0
- data/spec/jira/client_spec.rb +188 -0
- data/spec/jira/has_many_proxy_spec.rb +45 -0
- data/spec/jira/http_client_spec.rb +109 -0
- data/spec/jira/http_error_spec.rb +25 -0
- data/spec/jira/oauth_client_spec.rb +111 -0
- data/spec/jira/request_client_spec.rb +14 -0
- data/spec/jira/resource/attachment_spec.rb +20 -0
- data/spec/jira/resource/filter_spec.rb +97 -0
- data/spec/jira/resource/issue_spec.rb +107 -0
- data/spec/jira/resource/project_factory_spec.rb +13 -0
- data/spec/jira/resource/project_spec.rb +70 -0
- data/spec/jira/resource/worklog_spec.rb +24 -0
- data/spec/mock_responses/attachment/10000.json +20 -0
- data/spec/mock_responses/component/10000.invalid.put.json +5 -0
- data/spec/mock_responses/component/10000.json +39 -0
- data/spec/mock_responses/component/10000.put.json +39 -0
- data/spec/mock_responses/component.post.json +28 -0
- data/spec/mock_responses/field/1.json +15 -0
- data/spec/mock_responses/field.json +32 -0
- data/spec/mock_responses/issue/10002/comment/10000.json +29 -0
- data/spec/mock_responses/issue/10002/comment/10000.put.json +29 -0
- data/spec/mock_responses/issue/10002/comment.json +65 -0
- data/spec/mock_responses/issue/10002/comment.post.json +29 -0
- data/spec/mock_responses/issue/10002/transitions.json +49 -0
- data/spec/mock_responses/issue/10002/transitions.post.json +1 -0
- data/spec/mock_responses/issue/10002/worklog/10000.json +31 -0
- data/spec/mock_responses/issue/10002/worklog/10000.put.json +30 -0
- data/spec/mock_responses/issue/10002/worklog.json +98 -0
- data/spec/mock_responses/issue/10002/worklog.post.json +30 -0
- data/spec/mock_responses/issue/10002.invalid.put.json +6 -0
- data/spec/mock_responses/issue/10002.json +126 -0
- data/spec/mock_responses/issue/10002.put.missing_field_update.json +6 -0
- data/spec/mock_responses/issue.json +1108 -0
- data/spec/mock_responses/issue.post.json +5 -0
- data/spec/mock_responses/issuetype/5.json +8 -0
- data/spec/mock_responses/issuetype.json +42 -0
- data/spec/mock_responses/priority/1.json +8 -0
- data/spec/mock_responses/priority.json +42 -0
- data/spec/mock_responses/project/SAMPLEPROJECT.issues.json +1108 -0
- data/spec/mock_responses/project/SAMPLEPROJECT.json +84 -0
- data/spec/mock_responses/project.json +12 -0
- data/spec/mock_responses/status/1.json +7 -0
- data/spec/mock_responses/status.json +37 -0
- data/spec/mock_responses/user_username=admin.json +17 -0
- data/spec/mock_responses/version/10000.invalid.put.json +5 -0
- data/spec/mock_responses/version/10000.json +11 -0
- data/spec/mock_responses/version/10000.put.json +7 -0
- data/spec/mock_responses/version.post.json +7 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/support/clients_helper.rb +16 -0
- data/spec/support/matchers/have_attributes.rb +11 -0
- data/spec/support/matchers/have_many.rb +9 -0
- data/spec/support/matchers/have_one.rb +5 -0
- data/spec/support/shared_examples/integration.rb +190 -0
- metadata +301 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::Issue do
|
4
|
+
|
5
|
+
let(:client) { double(options: {rest_base_path: '/jira/rest/api/2'}) }
|
6
|
+
|
7
|
+
it "should find an issue by key or id" do
|
8
|
+
response = double()
|
9
|
+
response.stub(:body).and_return('{"key":"foo","id":"101"}')
|
10
|
+
JIRA::Resource::Issue.stub(:collection_path).and_return('/jira/rest/api/2/issue')
|
11
|
+
client.should_receive(:get).with('/jira/rest/api/2/issue/foo').
|
12
|
+
and_return(response)
|
13
|
+
client.should_receive(:get).with('/jira/rest/api/2/issue/101').
|
14
|
+
and_return(response)
|
15
|
+
|
16
|
+
issue_from_id = JIRA::Resource::Issue.find(client,101)
|
17
|
+
issue_from_key = JIRA::Resource::Issue.find(client,'foo')
|
18
|
+
|
19
|
+
issue_from_id.attrs.should == issue_from_key.attrs
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should search an issue with a jql query string" do
|
23
|
+
response = double()
|
24
|
+
issue = double()
|
25
|
+
response.stub(:body).and_return('{"issues": {"key":"foo"}}')
|
26
|
+
client.should_receive(:get).with('/jira/rest/api/2/search?jql=foo+bar').
|
27
|
+
and_return(response)
|
28
|
+
client.should_receive(:Issue).and_return(issue)
|
29
|
+
issue.should_receive(:build).with(["key", "foo"]).and_return('')
|
30
|
+
|
31
|
+
JIRA::Resource::Issue.jql(client,'foo bar').should == ['']
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should search an issue with a jql query string and fields" do
|
35
|
+
response = double()
|
36
|
+
issue = double()
|
37
|
+
response.stub(:body).and_return('{"issues": {"key":"foo"}}')
|
38
|
+
client.should_receive(:get).with('/jira/rest/api/2/search?jql=foo+bar%26fields%3Dfoo%2Cbar').
|
39
|
+
and_return(response)
|
40
|
+
client.should_receive(:Issue).and_return(issue)
|
41
|
+
issue.should_receive(:build).with(["key", "foo"]).and_return('')
|
42
|
+
|
43
|
+
JIRA::Resource::Issue.jql(client,'foo bar',['foo','bar']).should == ['']
|
44
|
+
end
|
45
|
+
|
46
|
+
it "provides direct accessors to the fields" do
|
47
|
+
subject = JIRA::Resource::Issue.new(client, :attrs => {'fields' => {'foo' =>'bar'}})
|
48
|
+
subject.should respond_to(:foo)
|
49
|
+
subject.foo.should == 'bar'
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "relationships" do
|
53
|
+
subject {
|
54
|
+
JIRA::Resource::Issue.new(client, :attrs => {
|
55
|
+
'id' => '123',
|
56
|
+
'fields' => {
|
57
|
+
'reporter' => {'foo' => 'bar'},
|
58
|
+
'assignee' => {'foo' => 'bar'},
|
59
|
+
'project' => {'foo' => 'bar'},
|
60
|
+
'priority' => {'foo' => 'bar'},
|
61
|
+
'issuetype' => {'foo' => 'bar'},
|
62
|
+
'status' => {'foo' => 'bar'},
|
63
|
+
'components' => [{'foo' => 'bar'}, {'baz' => 'flum'}],
|
64
|
+
'versions' => [{'foo' => 'bar'}, {'baz' => 'flum'}],
|
65
|
+
'comment' => { 'comments' => [{'foo' => 'bar'}, {'baz' => 'flum'}]},
|
66
|
+
'attachment' => [{'foo' => 'bar'}, {'baz' => 'flum'}],
|
67
|
+
'worklog' => { 'worklogs' => [{'foo' => 'bar'}, {'baz' => 'flum'}]},
|
68
|
+
}
|
69
|
+
})
|
70
|
+
}
|
71
|
+
|
72
|
+
it "has the correct relationships" do
|
73
|
+
subject.should have_one(:reporter, JIRA::Resource::User)
|
74
|
+
subject.reporter.foo.should == 'bar'
|
75
|
+
|
76
|
+
subject.should have_one(:assignee, JIRA::Resource::User)
|
77
|
+
subject.assignee.foo.should == 'bar'
|
78
|
+
|
79
|
+
subject.should have_one(:project, JIRA::Resource::Project)
|
80
|
+
subject.project.foo.should == 'bar'
|
81
|
+
|
82
|
+
subject.should have_one(:issuetype, JIRA::Resource::Issuetype)
|
83
|
+
subject.issuetype.foo.should == 'bar'
|
84
|
+
|
85
|
+
subject.should have_one(:priority, JIRA::Resource::Priority)
|
86
|
+
subject.priority.foo.should == 'bar'
|
87
|
+
|
88
|
+
subject.should have_one(:status, JIRA::Resource::Status)
|
89
|
+
subject.status.foo.should == 'bar'
|
90
|
+
|
91
|
+
subject.should have_many(:components, JIRA::Resource::Component)
|
92
|
+
subject.components.length.should == 2
|
93
|
+
|
94
|
+
subject.should have_many(:comments, JIRA::Resource::Comment)
|
95
|
+
subject.comments.length.should == 2
|
96
|
+
|
97
|
+
subject.should have_many(:attachments, JIRA::Resource::Attachment)
|
98
|
+
subject.attachments.length.should == 2
|
99
|
+
|
100
|
+
subject.should have_many(:versions, JIRA::Resource::Version)
|
101
|
+
subject.attachments.length.should == 2
|
102
|
+
|
103
|
+
subject.should have_many(:worklogs, JIRA::Resource::Worklog)
|
104
|
+
subject.worklogs.length.should == 2
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::ProjectFactory do
|
4
|
+
|
5
|
+
let(:client) { double() }
|
6
|
+
subject { JIRA::Resource::ProjectFactory.new(client) }
|
7
|
+
|
8
|
+
it "initializes correctly" do
|
9
|
+
subject.class.should == JIRA::Resource::ProjectFactory
|
10
|
+
subject.client.should == client
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::Project do
|
4
|
+
|
5
|
+
let(:client) { double("client", :options => {
|
6
|
+
:rest_base_path => '/jira/rest/api/2'
|
7
|
+
})
|
8
|
+
}
|
9
|
+
|
10
|
+
describe "relationships" do
|
11
|
+
subject {
|
12
|
+
JIRA::Resource::Project.new(client, :attrs => {
|
13
|
+
'lead' => {'foo' => 'bar'},
|
14
|
+
'issueTypes' => [{'foo' =>'bar'},{'baz' => 'flum'}],
|
15
|
+
'versions' => [{'foo' =>'bar'},{'baz' => 'flum'}],
|
16
|
+
})
|
17
|
+
}
|
18
|
+
|
19
|
+
it "has the correct relationships" do
|
20
|
+
subject.should have_one(:lead, JIRA::Resource::User)
|
21
|
+
subject.lead.foo.should == 'bar'
|
22
|
+
|
23
|
+
subject.should have_many(:issuetypes, JIRA::Resource::Issuetype)
|
24
|
+
subject.issuetypes.length.should == 2
|
25
|
+
|
26
|
+
subject.should have_many(:versions, JIRA::Resource::Version)
|
27
|
+
subject.versions.length.should == 2
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "issues" do
|
32
|
+
subject {
|
33
|
+
JIRA::Resource::Project.new(client, :attrs => {
|
34
|
+
'key' => 'test'
|
35
|
+
})
|
36
|
+
}
|
37
|
+
|
38
|
+
it "returns issues" do
|
39
|
+
response_body = '{"expand":"schema,names","startAt":0,"maxResults":1,"total":1,"issues":[{"expand":"editmeta,renderedFields,transitions,changelog,operations","id":"53062","self":"/rest/api/2/issue/53062","key":"test key","fields":{"summary":"test summary"}}]}'
|
40
|
+
response = double("response",
|
41
|
+
:body => response_body)
|
42
|
+
issue_factory = double("issue factory")
|
43
|
+
|
44
|
+
client.should_receive(:get)
|
45
|
+
.with('/jira/rest/api/2/search?jql=project%3D%22test%22')
|
46
|
+
.and_return(response)
|
47
|
+
client.should_receive(:Issue).and_return(issue_factory)
|
48
|
+
issue_factory.should_receive(:build)
|
49
|
+
.with(JSON.parse(response_body)["issues"][0])
|
50
|
+
subject.issues
|
51
|
+
end
|
52
|
+
|
53
|
+
context "with changelog" do
|
54
|
+
it "returns issues" do
|
55
|
+
response_body = '{"expand":"schema,names","startAt":0,"maxResults":1,"total":1,"issues":[{"expand":"editmeta,renderedFields,transitions,changelog,operations","id":"53062","self":"/rest/api/2/issue/53062","key":"test key","fields":{"summary":"test summary"},"changelog":{}}]}'
|
56
|
+
response = double("response",
|
57
|
+
:body => response_body)
|
58
|
+
issue_factory = double("issue factory")
|
59
|
+
|
60
|
+
client.should_receive(:get)
|
61
|
+
.with('/jira/rest/api/2/search?jql=project%3D%22test%22&expand=changelog&startAt=1&maxResults=100')
|
62
|
+
.and_return(response)
|
63
|
+
client.should_receive(:Issue).and_return(issue_factory)
|
64
|
+
issue_factory.should_receive(:build)
|
65
|
+
.with(JSON.parse(response_body)["issues"][0])
|
66
|
+
subject.issues({expand:'changelog', startAt:1, maxResults:100})
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::Worklog do
|
4
|
+
|
5
|
+
let(:client) { double() }
|
6
|
+
|
7
|
+
describe "relationships" do
|
8
|
+
subject {
|
9
|
+
JIRA::Resource::Worklog.new(client, :issue_id => '99999', :attrs => {
|
10
|
+
'author' => {'foo' => 'bar'},
|
11
|
+
'updateAuthor' => {'foo' => 'bar'}
|
12
|
+
})
|
13
|
+
}
|
14
|
+
|
15
|
+
it "has the correct relationships" do
|
16
|
+
subject.should have_one(:author, JIRA::Resource::User)
|
17
|
+
subject.author.foo.should == 'bar'
|
18
|
+
|
19
|
+
subject.should have_one(:update_author, JIRA::Resource::User)
|
20
|
+
subject.update_author.foo.should == 'bar'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/attachment/10000",
|
3
|
+
"filename": "ballmer.png",
|
4
|
+
"author": {
|
5
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
6
|
+
"name": "admin",
|
7
|
+
"avatarUrls": {
|
8
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
9
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
10
|
+
},
|
11
|
+
"displayName": "admin",
|
12
|
+
"active": true
|
13
|
+
},
|
14
|
+
"created": "2012-01-11T10:54:50.875+1300",
|
15
|
+
"size": 15360,
|
16
|
+
"mimeType": "image/png",
|
17
|
+
"properties": {},
|
18
|
+
"content": "http://localhost:2990/jira/secure/attachment/10000/ballmer.png",
|
19
|
+
"thumbnail": "http://localhost:2990/jira/secure/thumbnail/10000/_thumb_10000.png"
|
20
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/component/10000",
|
3
|
+
"id": "10000",
|
4
|
+
"name": "Cheesecake",
|
5
|
+
"description": "Description!",
|
6
|
+
"lead": {
|
7
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
8
|
+
"name": "admin",
|
9
|
+
"avatarUrls": {
|
10
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
11
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
12
|
+
},
|
13
|
+
"displayName": "admin",
|
14
|
+
"active": true
|
15
|
+
},
|
16
|
+
"assigneeType": "PROJECT_DEFAULT",
|
17
|
+
"assignee": {
|
18
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
19
|
+
"name": "admin",
|
20
|
+
"avatarUrls": {
|
21
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
22
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
23
|
+
},
|
24
|
+
"displayName": "admin",
|
25
|
+
"active": true
|
26
|
+
},
|
27
|
+
"realAssigneeType": "PROJECT_DEFAULT",
|
28
|
+
"realAssignee": {
|
29
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
30
|
+
"name": "admin",
|
31
|
+
"avatarUrls": {
|
32
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
33
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
34
|
+
},
|
35
|
+
"displayName": "admin",
|
36
|
+
"active": true
|
37
|
+
},
|
38
|
+
"isAssigneeTypeValid": true
|
39
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/component/10000",
|
3
|
+
"id": "10000",
|
4
|
+
"name": "Jammy",
|
5
|
+
"description": "Description!",
|
6
|
+
"lead": {
|
7
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
8
|
+
"name": "admin",
|
9
|
+
"avatarUrls": {
|
10
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
11
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
12
|
+
},
|
13
|
+
"displayName": "admin",
|
14
|
+
"active": true
|
15
|
+
},
|
16
|
+
"assigneeType": "PROJECT_DEFAULT",
|
17
|
+
"assignee": {
|
18
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
19
|
+
"name": "admin",
|
20
|
+
"avatarUrls": {
|
21
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
22
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
23
|
+
},
|
24
|
+
"displayName": "admin",
|
25
|
+
"active": true
|
26
|
+
},
|
27
|
+
"realAssigneeType": "PROJECT_DEFAULT",
|
28
|
+
"realAssignee": {
|
29
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
30
|
+
"name": "admin",
|
31
|
+
"avatarUrls": {
|
32
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
33
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
34
|
+
},
|
35
|
+
"displayName": "admin",
|
36
|
+
"active": true
|
37
|
+
},
|
38
|
+
"isAssigneeTypeValid": true
|
39
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/component/10001",
|
3
|
+
"id": "10001",
|
4
|
+
"name": "Test component",
|
5
|
+
"assigneeType": "PROJECT_DEFAULT",
|
6
|
+
"assignee": {
|
7
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
8
|
+
"name": "admin",
|
9
|
+
"avatarUrls": {
|
10
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
11
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
12
|
+
},
|
13
|
+
"displayName": "admin",
|
14
|
+
"active": true
|
15
|
+
},
|
16
|
+
"realAssigneeType": "PROJECT_DEFAULT",
|
17
|
+
"realAssignee": {
|
18
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
19
|
+
"name": "admin",
|
20
|
+
"avatarUrls": {
|
21
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
22
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
23
|
+
},
|
24
|
+
"displayName": "admin",
|
25
|
+
"active": true
|
26
|
+
},
|
27
|
+
"isAssigneeTypeValid": true
|
28
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"id": "1",
|
4
|
+
"name": "Description",
|
5
|
+
"custom": false,
|
6
|
+
"orderable": true,
|
7
|
+
"navigable": true,
|
8
|
+
"searchable": true,
|
9
|
+
"clauseNames": [
|
10
|
+
"description"
|
11
|
+
],
|
12
|
+
"schema": {
|
13
|
+
"type": "string",
|
14
|
+
"system": "description"
|
15
|
+
}
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"id": "2",
|
19
|
+
"name": "Summary",
|
20
|
+
"custom": false,
|
21
|
+
"orderable": true,
|
22
|
+
"navigable": true,
|
23
|
+
"searchable": true,
|
24
|
+
"clauseNames": [
|
25
|
+
"summary"
|
26
|
+
],
|
27
|
+
"schema": {
|
28
|
+
"type": "string",
|
29
|
+
"system": "summary"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
]
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/issue/10002/comment/10000",
|
3
|
+
"id": "10000",
|
4
|
+
"author": {
|
5
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
6
|
+
"name": "admin",
|
7
|
+
"emailAddress": "admin@example.com",
|
8
|
+
"avatarUrls": {
|
9
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
10
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
11
|
+
},
|
12
|
+
"displayName": "admin",
|
13
|
+
"active": true
|
14
|
+
},
|
15
|
+
"body": "This is a comment. Creative.",
|
16
|
+
"updateAuthor": {
|
17
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
18
|
+
"name": "admin",
|
19
|
+
"emailAddress": "admin@example.com",
|
20
|
+
"avatarUrls": {
|
21
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
22
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
23
|
+
},
|
24
|
+
"displayName": "admin",
|
25
|
+
"active": true
|
26
|
+
},
|
27
|
+
"created": "2012-01-11T10:02:14.430+1300",
|
28
|
+
"updated": "2012-01-11T10:02:14.430+1300"
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/issue/10002/comment/10000",
|
3
|
+
"id": "10000",
|
4
|
+
"author": {
|
5
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
6
|
+
"name": "admin",
|
7
|
+
"emailAddress": "admin@example.com",
|
8
|
+
"avatarUrls": {
|
9
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
10
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
11
|
+
},
|
12
|
+
"displayName": "admin",
|
13
|
+
"active": true
|
14
|
+
},
|
15
|
+
"body": "new body",
|
16
|
+
"updateAuthor": {
|
17
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
18
|
+
"name": "admin",
|
19
|
+
"emailAddress": "admin@example.com",
|
20
|
+
"avatarUrls": {
|
21
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
22
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
23
|
+
},
|
24
|
+
"displayName": "admin",
|
25
|
+
"active": true
|
26
|
+
},
|
27
|
+
"created": "2012-01-11T10:02:14.430+1300",
|
28
|
+
"updated": "2012-01-12T14:37:41.933+1300"
|
29
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"startAt": 0,
|
3
|
+
"maxResults": 2,
|
4
|
+
"total": 2,
|
5
|
+
"comments": [
|
6
|
+
{
|
7
|
+
"self": "http://localhost:2990/jira/rest/api/2/issue/10002/comment/10000",
|
8
|
+
"id": "10000",
|
9
|
+
"author": {
|
10
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
11
|
+
"name": "admin",
|
12
|
+
"emailAddress": "admin@example.com",
|
13
|
+
"avatarUrls": {
|
14
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
15
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
16
|
+
},
|
17
|
+
"displayName": "admin",
|
18
|
+
"active": true
|
19
|
+
},
|
20
|
+
"body": "This is a comment. Creative.",
|
21
|
+
"updateAuthor": {
|
22
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
23
|
+
"name": "admin",
|
24
|
+
"emailAddress": "admin@example.com",
|
25
|
+
"avatarUrls": {
|
26
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
27
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
28
|
+
},
|
29
|
+
"displayName": "admin",
|
30
|
+
"active": true
|
31
|
+
},
|
32
|
+
"created": "2012-01-11T10:02:14.430+1300",
|
33
|
+
"updated": "2012-01-12T15:15:13.074+1300"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"self": "http://localhost:2990/jira/rest/api/2/issue/10002/comment/10001",
|
37
|
+
"id": "10001",
|
38
|
+
"author": {
|
39
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
40
|
+
"name": "admin",
|
41
|
+
"emailAddress": "admin@example.com",
|
42
|
+
"avatarUrls": {
|
43
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
44
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
45
|
+
},
|
46
|
+
"displayName": "admin",
|
47
|
+
"active": true
|
48
|
+
},
|
49
|
+
"body": "new comment",
|
50
|
+
"updateAuthor": {
|
51
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
52
|
+
"name": "admin",
|
53
|
+
"emailAddress": "admin@example.com",
|
54
|
+
"avatarUrls": {
|
55
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
56
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
57
|
+
},
|
58
|
+
"displayName": "admin",
|
59
|
+
"active": true
|
60
|
+
},
|
61
|
+
"created": "2012-01-12T14:29:59.209+1300",
|
62
|
+
"updated": "2012-01-12T14:29:59.209+1300"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/issue/10002/comment/10001",
|
3
|
+
"id": "10001",
|
4
|
+
"author": {
|
5
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
6
|
+
"name": "admin",
|
7
|
+
"emailAddress": "admin@example.com",
|
8
|
+
"avatarUrls": {
|
9
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
10
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
11
|
+
},
|
12
|
+
"displayName": "admin",
|
13
|
+
"active": true
|
14
|
+
},
|
15
|
+
"body": "new comment",
|
16
|
+
"updateAuthor": {
|
17
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
18
|
+
"name": "admin",
|
19
|
+
"emailAddress": "admin@example.com",
|
20
|
+
"avatarUrls": {
|
21
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
22
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
23
|
+
},
|
24
|
+
"displayName": "admin",
|
25
|
+
"active": true
|
26
|
+
},
|
27
|
+
"created": "2012-01-12T14:29:59.209+1300",
|
28
|
+
"updated": "2012-01-12T14:29:59.209+1300"
|
29
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"expand": "transitions",
|
3
|
+
"transitions": [
|
4
|
+
{
|
5
|
+
"id": "41",
|
6
|
+
"name": "Review",
|
7
|
+
"to": {
|
8
|
+
"self": "http://localhost:2990/rest/api/2/status/10006",
|
9
|
+
"description": "",
|
10
|
+
"iconUrl": "http://localhost:2990/images/icons/statuses/generic.png",
|
11
|
+
"name": "Reviewable",
|
12
|
+
"id": "10006"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"id": "101",
|
17
|
+
"name": "Stop Progress",
|
18
|
+
"to": {
|
19
|
+
"self": "http://localhost:2990/rest/api/2/status/10017",
|
20
|
+
"description": "Mapping for Accepted in Pivotal Tracker",
|
21
|
+
"iconUrl": "http://localhost:2990/images/icons/statuses/closed.png",
|
22
|
+
"name": "Accepted",
|
23
|
+
"id": "10017"
|
24
|
+
}
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"id": "21",
|
28
|
+
"name": "Remove from Backlog",
|
29
|
+
"to": {
|
30
|
+
"self": "http://localhost:2990/rest/api/2/status/1",
|
31
|
+
"description": "The issue is open and ready for the assignee to start work on it.",
|
32
|
+
"iconUrl": "http://localhost:2990/images/icons/statuses/open.png",
|
33
|
+
"name": "Open",
|
34
|
+
"id": "1"
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"id": "71",
|
39
|
+
"name": "Resolve",
|
40
|
+
"to": {
|
41
|
+
"self": "http://localhost:2990/rest/api/2/status/5",
|
42
|
+
"description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.",
|
43
|
+
"iconUrl": "http://localhost:2990/images/icons/statuses/resolved.png",
|
44
|
+
"name": "Resolved",
|
45
|
+
"id": "5"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/issue/10002/worklog/10000",
|
3
|
+
"author": {
|
4
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
5
|
+
"name": "admin",
|
6
|
+
"emailAddress": "admin@example.com",
|
7
|
+
"avatarUrls": {
|
8
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
9
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
10
|
+
},
|
11
|
+
"displayName": "admin",
|
12
|
+
"active": true
|
13
|
+
},
|
14
|
+
"updateAuthor": {
|
15
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
16
|
+
"name": "admin",
|
17
|
+
"emailAddress": "admin@example.com",
|
18
|
+
"avatarUrls": {
|
19
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
20
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
21
|
+
},
|
22
|
+
"displayName": "admin",
|
23
|
+
"active": true
|
24
|
+
},
|
25
|
+
"comment": "Some epic work.",
|
26
|
+
"created": "2012-01-11T13:33:25.604+1300",
|
27
|
+
"updated": "2012-01-11T13:33:25.604+1300",
|
28
|
+
"started": "2012-01-11T13:33:00.000+1300",
|
29
|
+
"timeSpent": "18w 2d",
|
30
|
+
"id": "10000"
|
31
|
+
}
|