zk-jira-ruby 2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.travis.yml +9 -0
- data/Gemfile +14 -0
- data/Guardfile +14 -0
- data/LICENSE +19 -0
- data/README.md +427 -0
- data/Rakefile +31 -0
- data/example.rb +232 -0
- data/http-basic-example.rb +113 -0
- data/jira-ruby.gemspec +35 -0
- data/lib/jira/base.rb +525 -0
- data/lib/jira/base_factory.rb +46 -0
- data/lib/jira/client.rb +315 -0
- data/lib/jira/has_many_proxy.rb +42 -0
- data/lib/jira/http_client.rb +112 -0
- data/lib/jira/http_error.rb +14 -0
- data/lib/jira/jwt_client.rb +67 -0
- data/lib/jira/oauth_client.rb +114 -0
- data/lib/jira/railtie.rb +10 -0
- data/lib/jira/request_client.rb +31 -0
- data/lib/jira/resource/agile.rb +79 -0
- data/lib/jira/resource/applinks.rb +39 -0
- data/lib/jira/resource/attachment.rb +50 -0
- data/lib/jira/resource/board.rb +91 -0
- data/lib/jira/resource/board_configuration.rb +9 -0
- data/lib/jira/resource/comment.rb +12 -0
- data/lib/jira/resource/component.rb +8 -0
- data/lib/jira/resource/createmeta.rb +44 -0
- data/lib/jira/resource/field.rb +83 -0
- data/lib/jira/resource/filter.rb +15 -0
- data/lib/jira/resource/issue.rb +141 -0
- data/lib/jira/resource/issuelink.rb +20 -0
- data/lib/jira/resource/issuelinktype.rb +14 -0
- data/lib/jira/resource/issuetype.rb +8 -0
- data/lib/jira/resource/priority.rb +8 -0
- data/lib/jira/resource/project.rb +41 -0
- data/lib/jira/resource/rapidview.rb +67 -0
- data/lib/jira/resource/remotelink.rb +26 -0
- data/lib/jira/resource/resolution.rb +8 -0
- data/lib/jira/resource/serverinfo.rb +18 -0
- data/lib/jira/resource/sprint.rb +105 -0
- data/lib/jira/resource/sprint_report.rb +8 -0
- data/lib/jira/resource/status.rb +8 -0
- data/lib/jira/resource/transition.rb +29 -0
- data/lib/jira/resource/user.rb +30 -0
- data/lib/jira/resource/version.rb +66 -0
- data/lib/jira/resource/watcher.rb +35 -0
- data/lib/jira/resource/webhook.rb +37 -0
- data/lib/jira/resource/worklog.rb +14 -0
- data/lib/jira/tasks.rb +0 -0
- data/lib/jira/version.rb +3 -0
- data/lib/jira-ruby.rb +49 -0
- data/lib/tasks/generate.rake +18 -0
- data/spec/integration/attachment_spec.rb +32 -0
- data/spec/integration/comment_spec.rb +52 -0
- data/spec/integration/component_spec.rb +39 -0
- data/spec/integration/field_spec.rb +32 -0
- data/spec/integration/issue_spec.rb +93 -0
- data/spec/integration/issuelinktype_spec.rb +26 -0
- data/spec/integration/issuetype_spec.rb +24 -0
- data/spec/integration/priority_spec.rb +24 -0
- data/spec/integration/project_spec.rb +49 -0
- data/spec/integration/rapidview_spec.rb +74 -0
- data/spec/integration/resolution_spec.rb +26 -0
- data/spec/integration/status_spec.rb +24 -0
- data/spec/integration/transition_spec.rb +49 -0
- data/spec/integration/user_spec.rb +41 -0
- data/spec/integration/version_spec.rb +39 -0
- data/spec/integration/watcher_spec.rb +62 -0
- data/spec/integration/webhook.rb +25 -0
- data/spec/integration/worklog_spec.rb +51 -0
- data/spec/jira/base_factory_spec.rb +45 -0
- data/spec/jira/base_spec.rb +598 -0
- data/spec/jira/client_spec.rb +291 -0
- data/spec/jira/has_many_proxy_spec.rb +46 -0
- data/spec/jira/http_client_spec.rb +328 -0
- data/spec/jira/http_error_spec.rb +24 -0
- data/spec/jira/jwt_uri_builder_spec.rb +59 -0
- data/spec/jira/oauth_client_spec.rb +162 -0
- data/spec/jira/request_client_spec.rb +41 -0
- data/spec/jira/resource/agile_spec.rb +135 -0
- data/spec/jira/resource/attachment_spec.rb +138 -0
- data/spec/jira/resource/board_spec.rb +224 -0
- data/spec/jira/resource/createmeta_spec.rb +258 -0
- data/spec/jira/resource/field_spec.rb +85 -0
- data/spec/jira/resource/filter_spec.rb +97 -0
- data/spec/jira/resource/issue_spec.rb +227 -0
- data/spec/jira/resource/issuelink_spec.rb +14 -0
- data/spec/jira/resource/project_factory_spec.rb +11 -0
- data/spec/jira/resource/project_spec.rb +123 -0
- data/spec/jira/resource/sprint_spec.rb +90 -0
- data/spec/jira/resource/user_factory_spec.rb +31 -0
- data/spec/jira/resource/worklog_spec.rb +22 -0
- data/spec/mock_responses/board/1.json +33 -0
- data/spec/mock_responses/board/1_issues.json +62 -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/empty_issues.json +8 -0
- data/spec/mock_responses/field/1.json +15 -0
- data/spec/mock_responses/field.json +32 -0
- data/spec/mock_responses/issue/10002/attachments/10000.json +20 -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/watchers.json +13 -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/issueLinkType/10000.json +7 -0
- data/spec/mock_responses/issueLinkType.json +25 -0
- data/spec/mock_responses/issuetype/5.json +8 -0
- data/spec/mock_responses/issuetype.json +42 -0
- data/spec/mock_responses/jira/rest/webhooks/1.0/webhook/2.json +11 -0
- data/spec/mock_responses/jira/rest/webhooks/1.0/webhook.json +11 -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/rapidview/SAMPLEPROJECT.issues.full.json +276 -0
- data/spec/mock_responses/rapidview/SAMPLEPROJECT.issues.json +111 -0
- data/spec/mock_responses/rapidview/SAMPLEPROJECT.json +6 -0
- data/spec/mock_responses/rapidview.json +10 -0
- data/spec/mock_responses/resolution/1.json +7 -0
- data/spec/mock_responses/resolution.json +15 -0
- data/spec/mock_responses/sprint/1_issues.json +125 -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/mock_responses/webhook/webhook.json +11 -0
- data/spec/mock_responses/webhook.json +11 -0
- data/spec/spec_helper.rb +21 -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 +177 -0
- metadata +491 -0
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::Sprint do
|
4
|
+
let(:client) do
|
5
|
+
client = double(options: { site: 'https://foo.bar.com', context_path: '/jira' })
|
6
|
+
allow(client).to receive(:Sprint).and_return(JIRA::Resource::SprintFactory.new(client))
|
7
|
+
client
|
8
|
+
end
|
9
|
+
let(:sprint) { described_class.new(client) }
|
10
|
+
let(:agile_sprint_path) { "#{sprint.client.options[:context_path]}/rest/agile/1.0/sprint/#{sprint.id}" }
|
11
|
+
|
12
|
+
describe '::find' do
|
13
|
+
let(:response) { double('Response', body: '{"some_detail":"some detail"}') }
|
14
|
+
|
15
|
+
it 'fetches the sprint from JIRA' do
|
16
|
+
expect(client).to receive(:get).with('/jira/rest/agile/1.0/sprint/111').and_return(response)
|
17
|
+
expect(JIRA::Resource::Sprint.find(client, '111')).to be_a(JIRA::Resource::Sprint)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'peristence' do
|
22
|
+
describe '#save' do
|
23
|
+
let(:instance_attrs) { { start_date: '2016-06-01' } }
|
24
|
+
|
25
|
+
before do
|
26
|
+
sprint.attrs = instance_attrs
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'when attributes are specified' do
|
30
|
+
let(:given_attrs) { { start_date: '2016-06-10' } }
|
31
|
+
|
32
|
+
it 'calls save on the super class with the given attributes & agile url' do
|
33
|
+
expect_any_instance_of(JIRA::Base).to receive(:save).with(given_attrs, agile_sprint_path)
|
34
|
+
|
35
|
+
sprint.save(given_attrs)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when attributes are not specified' do
|
40
|
+
it 'calls save on the super class with the instance attributes & agile url' do
|
41
|
+
expect_any_instance_of(JIRA::Base).to receive(:save).with(instance_attrs, agile_sprint_path)
|
42
|
+
|
43
|
+
sprint.save
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'when providing the path argument' do
|
48
|
+
it 'ignores it' do
|
49
|
+
expect_any_instance_of(JIRA::Base).to receive(:save).with(instance_attrs, agile_sprint_path)
|
50
|
+
|
51
|
+
sprint.save({}, 'mavenlink.com')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe '#save!' do
|
57
|
+
let(:instance_attrs) { { start_date: '2016-06-01' } }
|
58
|
+
|
59
|
+
before do
|
60
|
+
sprint.attrs = instance_attrs
|
61
|
+
end
|
62
|
+
|
63
|
+
context 'when attributes are specified' do
|
64
|
+
let(:given_attrs) { { start_date: '2016-06-10' } }
|
65
|
+
|
66
|
+
it 'calls save! on the super class with the given attributes & agile url' do
|
67
|
+
expect_any_instance_of(JIRA::Base).to receive(:save!).with(given_attrs, agile_sprint_path)
|
68
|
+
|
69
|
+
sprint.save!(given_attrs)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'when attributes are not specified' do
|
74
|
+
it 'calls save! on the super class with the instance attributes & agile url' do
|
75
|
+
expect_any_instance_of(JIRA::Base).to receive(:save!).with(instance_attrs, agile_sprint_path)
|
76
|
+
|
77
|
+
sprint.save!
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context 'when providing the path argument' do
|
82
|
+
it 'ignores it' do
|
83
|
+
expect_any_instance_of(JIRA::Base).to receive(:save!).with(instance_attrs, agile_sprint_path)
|
84
|
+
|
85
|
+
sprint.save!({}, 'mavenlink.com')
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::UserFactory do
|
4
|
+
let(:client) do
|
5
|
+
instance_double('Client', options: { rest_base_path: '/jira/rest/api/2' })
|
6
|
+
end
|
7
|
+
|
8
|
+
subject { JIRA::Resource::UserFactory.new(client) }
|
9
|
+
|
10
|
+
describe '#myself' do
|
11
|
+
let(:response) do
|
12
|
+
instance_double(
|
13
|
+
'Response', body: get_mock_response('user_username=admin.json')
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
let(:user) { subject.myself }
|
18
|
+
|
19
|
+
before(:each) do
|
20
|
+
allow(client).to receive(:get).with(
|
21
|
+
'/jira/rest/api/2/myself'
|
22
|
+
).and_return(response)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'returns a JIRA::Resource::User with correct attrs' do
|
26
|
+
expect(user).to be_a(JIRA::Resource::User)
|
27
|
+
expect(user.name).to eq('admin')
|
28
|
+
expect(user.emailAddress).to eq('admin@example.com')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe JIRA::Resource::Worklog do
|
4
|
+
let(:client) { double }
|
5
|
+
|
6
|
+
describe 'relationships' do
|
7
|
+
subject do
|
8
|
+
JIRA::Resource::Worklog.new(client, issue_id: '99999', attrs: {
|
9
|
+
'author' => { 'foo' => 'bar' },
|
10
|
+
'updateAuthor' => { 'foo' => 'bar' }
|
11
|
+
})
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'has the correct relationships' do
|
15
|
+
expect(subject).to have_one(:author, JIRA::Resource::User)
|
16
|
+
expect(subject.author.foo).to eq('bar')
|
17
|
+
|
18
|
+
expect(subject).to have_one(:update_author, JIRA::Resource::User)
|
19
|
+
expect(subject.update_author.foo).to eq('bar')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
2
|
+
"maxResults": 50,
|
3
|
+
"startAt": 0,
|
4
|
+
"isLast": true,
|
5
|
+
"values": [
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"self": "https://test.com/jira/rest/agile/1.0/sprint/1",
|
9
|
+
"state": "closed",
|
10
|
+
"name": "Test Sprint 1",
|
11
|
+
"startDate": "2016-05-03T01:45:17.624-04:00",
|
12
|
+
"endDate": "2016-05-06T13:30:00.000-04:00",
|
13
|
+
"completeDate": "2016-05-08T04:05:31.959-04:00",
|
14
|
+
"originBoardId": 1
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"id": 2,
|
18
|
+
"self": "https://test.com/jira/rest/agile/1.0/sprint/2",
|
19
|
+
"state": "active",
|
20
|
+
"name": "Test Sprint 2",
|
21
|
+
"startDate": "2016-12-12T04:42:46.184-05:00",
|
22
|
+
"endDate": "2017-01-02T13:56:00.000-05:00",
|
23
|
+
"originBoardId": 1
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"id": 3,
|
27
|
+
"self": "https://test.com/jira/rest/agile/1.0/sprint/2",
|
28
|
+
"state": "future",
|
29
|
+
"name": "Test Sprint 2",
|
30
|
+
"originBoardId": 1
|
31
|
+
}
|
32
|
+
]
|
33
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
{
|
2
|
+
"expand": "schema,names",
|
3
|
+
"startAt": 0,
|
4
|
+
"maxResults": 1000,
|
5
|
+
"total": 9,
|
6
|
+
"issues": [
|
7
|
+
{
|
8
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
9
|
+
"id": "10546",
|
10
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10546",
|
11
|
+
"key": "SBT-1"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
15
|
+
"id": "10547",
|
16
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10547",
|
17
|
+
"key": "SBT-2"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
21
|
+
"id": "10556",
|
22
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10556",
|
23
|
+
"key": "SBT-11"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
27
|
+
"id": "10557",
|
28
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10557",
|
29
|
+
"key": "SBT-12"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
33
|
+
"id": "10558",
|
34
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10558",
|
35
|
+
"key": "SBT-13"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
39
|
+
"id": "10559",
|
40
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10559",
|
41
|
+
"key": "SBT-14"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
45
|
+
"id": "10600",
|
46
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10600",
|
47
|
+
"key": "SBT-16"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
51
|
+
"id": "10601",
|
52
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10601",
|
53
|
+
"key": "SBT-17"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
|
57
|
+
"id": "10604",
|
58
|
+
"self": "https://jira.example.com/rest/agile/1.0/issue/10604",
|
59
|
+
"key": "SBT-19"
|
60
|
+
}
|
61
|
+
]
|
62
|
+
}
|
@@ -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,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
|
+
}
|