jiraSOAP 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/lib/jiraSOAP/JIRAservice.rb +9 -4
- data/lib/jiraSOAP/remoteAPI.rb +28 -32
- data/lib/jiraSOAP/remoteEntities.rb +237 -33
- data/lib/jiraSOAP/url.rb +1 -0
- data/lib/{jiraSOAP/macruby_stuff.rb → macruby_stuff.rb} +3 -1
- metadata +4 -4
data/README.markdown
CHANGED
@@ -23,7 +23,7 @@ Pick up where `jira4r` left off:
|
|
23
23
|
Getting Started
|
24
24
|
---------------
|
25
25
|
|
26
|
-
`jiraSOAP` should run on Ruby 1.9.2 and MacRuby 0.
|
26
|
+
`jiraSOAP` should run on Ruby 1.9.2 and MacRuby 0.8. You can install it using `gem`, or build from source:
|
27
27
|
|
28
28
|
git clone git://github.com/Marketcircle/jiraSOAP.git
|
29
29
|
rake build
|
data/lib/jiraSOAP/JIRAservice.rb
CHANGED
@@ -18,12 +18,16 @@ module JIRA
|
|
18
18
|
class JIRAService < Handsoap::Service
|
19
19
|
include RemoteAPI
|
20
20
|
|
21
|
-
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :auth_token
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :user
|
22
25
|
|
23
26
|
# Factory method to initialize and login.
|
24
27
|
# @param [String] url URL for the JIRA server
|
25
28
|
# @param [String] user JIRA user name to login with
|
26
29
|
# @param [String] password
|
30
|
+
# @return [JIRA::JIRAService]
|
27
31
|
def self.instance_with_endpoint(url, user, password)
|
28
32
|
jira = JIRAService.new url
|
29
33
|
jira.login user, password
|
@@ -44,10 +48,11 @@ class JIRAService < Handsoap::Service
|
|
44
48
|
end
|
45
49
|
|
46
50
|
# Something to help users out until the rest of the API is implemented.
|
51
|
+
# @return [nil]
|
47
52
|
def method_missing(method, *args)
|
48
|
-
message =
|
49
|
-
message << '
|
50
|
-
message << 'been stabilized yet.'
|
53
|
+
message = "#{method} is not a valid method. Check the documentation; the "
|
54
|
+
message << 'method may not be implemented or has changed in recent '
|
55
|
+
message << 'revisions. The client side API has not been stabilized yet.'
|
51
56
|
raise NoMethodError, message, caller
|
52
57
|
end
|
53
58
|
|
data/lib/jiraSOAP/remoteAPI.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Contains the API defined by Atlassian for the JIRA SOAP service. The JavaDoc
|
2
2
|
# for the SOAP API is located at http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html.
|
3
|
-
|
4
|
-
|
3
|
+
# @todo exception handling
|
4
|
+
# @todo code refactoring and de-duplication
|
5
5
|
module RemoteAPI
|
6
6
|
# XPath constant to get a node containing a response array.
|
7
7
|
# This could be used for all responses, but is only used in cases where we
|
@@ -168,6 +168,8 @@ module RemoteAPI
|
|
168
168
|
# During my own testing, I found that HTTP requests could timeout for really
|
169
169
|
# large requests (~2500 results). So I set a more reasonable upper limit;
|
170
170
|
# feel free to override it, but be aware of the potential issues.
|
171
|
+
#
|
172
|
+
# The JIRA::Issue structure does not include any comments or attachments.
|
171
173
|
# @param [String] jql_query JQL query as a string
|
172
174
|
# @param [Fixnum] max_results limit on number of returned results;
|
173
175
|
# the value may be overridden by the server if max_results is too large
|
@@ -328,20 +330,21 @@ module RemoteAPI
|
|
328
330
|
JIRA::Project.project_with_xml_fragment frag
|
329
331
|
end
|
330
332
|
|
331
|
-
#
|
333
|
+
# You can set the release state for a project with this method.
|
332
334
|
# @param [String] project_name
|
333
335
|
# @param [JIRA::Version] version
|
334
336
|
# @return [boolean] true, throws an exception otherwise
|
335
|
-
def
|
337
|
+
def release_state_for_version_for_project(project_name, version)
|
336
338
|
response = invoke('soap:releaseVersion') { |msg|
|
337
339
|
msg.add 'soap:in0', @auth_token
|
338
340
|
msg.add 'soap:in1', project_name
|
339
|
-
msg.add 'soap:in2'
|
341
|
+
msg.add 'soap:in2' do |submsg| version.soapify_for submsg end
|
340
342
|
}
|
341
343
|
true
|
342
344
|
end
|
343
345
|
|
344
|
-
#
|
346
|
+
# The id of the project is the only field that you cannot update. Or, at
|
347
|
+
# least the only field I know that you cannot update.
|
345
348
|
# @param [JIRA::Project] project
|
346
349
|
# @return [JIRA::Project]
|
347
350
|
def update_project_with_project(project)
|
@@ -353,12 +356,16 @@ module RemoteAPI
|
|
353
356
|
JIRA::Project.project_with_xml_fragment frag
|
354
357
|
end
|
355
358
|
|
356
|
-
#
|
359
|
+
# It seems that creating a user without any permission groups will trigger
|
360
|
+
# an exception on some versions of JIRA. The irony is that this method provides
|
361
|
+
# no way to add groups. The good news though, is that the creation will still
|
362
|
+
# happen; but the user will have no permissions.
|
357
363
|
# @param [String] username
|
358
364
|
# @param [String] password
|
359
365
|
# @param [String] full_name
|
360
366
|
# @param [String] email
|
361
|
-
# @return [JIRA::User]
|
367
|
+
# @return [JIRA::User,nil] depending on your JIRA version, this method may
|
368
|
+
# always raise an exception instead of actually returning anythin
|
362
369
|
def create_user(username, password, full_name, email)
|
363
370
|
response = invoke('soap:createUser') { |msg|
|
364
371
|
msg.add 'soap:in0', @auth_token
|
@@ -371,7 +378,6 @@ module RemoteAPI
|
|
371
378
|
JIRA::User.user_with_xml_fragment frag
|
372
379
|
end
|
373
380
|
|
374
|
-
# @todo test this method
|
375
381
|
# @param [String] username
|
376
382
|
# @return [boolean] true if successful, throws an exception otherwise
|
377
383
|
def delete_user_with_name(username)
|
@@ -382,7 +388,6 @@ module RemoteAPI
|
|
382
388
|
true
|
383
389
|
end
|
384
390
|
|
385
|
-
# @todo test this method
|
386
391
|
# @param [String] project_id
|
387
392
|
# @return [JIRA::Project]
|
388
393
|
def get_project_with_id(project_id)
|
@@ -394,10 +399,11 @@ module RemoteAPI
|
|
394
399
|
JIRA::Project.project_with_xml_fragment frag
|
395
400
|
end
|
396
401
|
|
397
|
-
# @todo
|
402
|
+
# @todo parse the permission scheme
|
403
|
+
# Note: this method does not yet include the permission scheme.
|
398
404
|
# @param [String] project_id
|
399
405
|
# @return [JIRA::Project]
|
400
|
-
def
|
406
|
+
def get_project_including_schemes_with_id(project_id)
|
401
407
|
response = invoke('soap:getProjectWithSchemesById') { |msg|
|
402
408
|
msg.add 'soap:in0', @auth_token
|
403
409
|
msg.add 'soap:in1', project_id
|
@@ -406,11 +412,10 @@ module RemoteAPI
|
|
406
412
|
JIRA::Project.project_with_xml_fragment frag
|
407
413
|
end
|
408
414
|
|
409
|
-
# @todo test this method
|
410
415
|
# @param [String] issue_key
|
411
416
|
# @param [JIRA::Comment] comment
|
412
417
|
# @return [boolean] true if successful, throws an exception otherwise
|
413
|
-
def
|
418
|
+
def add_comment_to_issue_with_key(issue_key, comment)
|
414
419
|
response = invoke('soap:addComment') { |msg|
|
415
420
|
msg.add 'soap:in0', @auth_token
|
416
421
|
msg.add 'soap:in1', issue_key
|
@@ -419,7 +424,6 @@ module RemoteAPI
|
|
419
424
|
true
|
420
425
|
end
|
421
426
|
|
422
|
-
# @todo test this method
|
423
427
|
# @param [String] id
|
424
428
|
# @return [JIRA::Comment]
|
425
429
|
def get_comment_with_id(id)
|
@@ -431,10 +435,9 @@ module RemoteAPI
|
|
431
435
|
JIRA::Comment.comment_with_xml_fragment frag
|
432
436
|
end
|
433
437
|
|
434
|
-
# @todo test this method
|
435
438
|
# @param [String] issue_key
|
436
439
|
# @return [[JIRA::Comment]]
|
437
|
-
def
|
440
|
+
def get_comments_for_issue_with_key(issue_key)
|
438
441
|
response = invoke('soap:getComments') { |msg|
|
439
442
|
msg.add 'soap:in0', @auth_token
|
440
443
|
msg.add 'soap:in1', issue_key
|
@@ -445,7 +448,6 @@ module RemoteAPI
|
|
445
448
|
}
|
446
449
|
end
|
447
450
|
|
448
|
-
# @todo test this method
|
449
451
|
# @param [String] project_name
|
450
452
|
# @return [[JIRA::IssueType]]
|
451
453
|
def get_issue_types_for_project_with_id(project_id)
|
@@ -459,7 +461,8 @@ module RemoteAPI
|
|
459
461
|
}
|
460
462
|
end
|
461
463
|
|
462
|
-
#
|
464
|
+
# This method does not work right now for reasons that I do not understand.
|
465
|
+
# @todo fix this method
|
463
466
|
# @param [String] query
|
464
467
|
# @param [Fixnum] max_results
|
465
468
|
# @param [Fixnum] offset
|
@@ -477,7 +480,6 @@ module RemoteAPI
|
|
477
480
|
}
|
478
481
|
end
|
479
482
|
|
480
|
-
# @todo test this method
|
481
483
|
# @param [JIRA::Comment] comment
|
482
484
|
# @return [JIRA::Comment]
|
483
485
|
def update_comment(comment)
|
@@ -489,19 +491,17 @@ module RemoteAPI
|
|
489
491
|
JIRA::Comment.comment_with_xml_fragment frag
|
490
492
|
end
|
491
493
|
|
492
|
-
# @todo test this method
|
493
494
|
# @return [[JIRA::IssueType]]
|
494
495
|
def get_subtask_issue_types
|
495
496
|
response = invoke('soap:getSubTaskIssueTypes') { |msg|
|
496
497
|
msg.add 'soap:in0', @auth_token
|
497
498
|
}
|
498
|
-
response.document.xpath("#{RESPONSE_XPATH}/
|
499
|
+
response.document.xpath("#{RESPONSE_XPATH}/getSubTaskIssueTypesReturn").map {
|
499
500
|
|frag|
|
500
501
|
JIRA::IssueType.issue_type_with_xml_fragment frag
|
501
502
|
}
|
502
503
|
end
|
503
504
|
|
504
|
-
# @todo test this method
|
505
505
|
# @param [String] project_id
|
506
506
|
# @return [[JIRA::IssueType]]
|
507
507
|
def get_subtask_issue_types_for_project_with_id(project_id)
|
@@ -515,7 +515,7 @@ module RemoteAPI
|
|
515
515
|
}
|
516
516
|
end
|
517
517
|
|
518
|
-
#
|
518
|
+
# I have no idea what this method does.
|
519
519
|
# @todo find out what this method does
|
520
520
|
# @return [boolean] true if successful, throws an exception otherwise
|
521
521
|
def refresh_custom_fields
|
@@ -525,9 +525,8 @@ module RemoteAPI
|
|
525
525
|
true
|
526
526
|
end
|
527
527
|
|
528
|
-
# @todo test this method
|
529
528
|
# Retrieves favourite filters for the currently logged in user.
|
530
|
-
# @return [JIRA::Filter]
|
529
|
+
# @return [[JIRA::Filter]]
|
531
530
|
def get_favourite_filters
|
532
531
|
response = invoke('soap:getFavouriteFilters') { |msg|
|
533
532
|
msg.add 'soap:in0', @auth_token
|
@@ -538,7 +537,6 @@ module RemoteAPI
|
|
538
537
|
}
|
539
538
|
end
|
540
539
|
|
541
|
-
# @todo test this method
|
542
540
|
# @param [String] id
|
543
541
|
# @param [Fixnum] max_results
|
544
542
|
# @param [Fixnum] offset
|
@@ -556,7 +554,6 @@ module RemoteAPI
|
|
556
554
|
}
|
557
555
|
end
|
558
556
|
|
559
|
-
# @todo test this method
|
560
557
|
# @param [String] id
|
561
558
|
# @return [Fixnum]
|
562
559
|
def get_issue_count_for_filter_with_id(id)
|
@@ -567,14 +564,13 @@ module RemoteAPI
|
|
567
564
|
response.document.xpath('//getIssueCountForFilterReturn').to_s.to_i
|
568
565
|
end
|
569
566
|
|
570
|
-
# @todo test this method
|
571
567
|
# @todo optimize building the message, try a single pass
|
572
568
|
# Expect this method to be slow.
|
573
569
|
# @param [String] issue_key
|
574
570
|
# @param [[String]] filenames names to put on the files
|
575
571
|
# @param [[String]] data base64 encoded data
|
576
572
|
# @return [boolean] true if successful, otherwise an exception is thrown
|
577
|
-
def
|
573
|
+
def add_base64_encoded_attachments_to_issue_with_key(issue_key, filenames, data)
|
578
574
|
response = invoke('soap:addBase64EncodedAttachmentsToIssue') { |msg|
|
579
575
|
msg.add 'soap:in0', @auth_token
|
580
576
|
msg.add 'soap:in1', issue_key
|
@@ -588,7 +584,7 @@ module RemoteAPI
|
|
588
584
|
true
|
589
585
|
end
|
590
586
|
|
591
|
-
# @
|
587
|
+
# The @build_date attribute is a Time value, but does not include a time.
|
592
588
|
# @return [JIRA::ServerInfo]
|
593
589
|
def get_server_info
|
594
590
|
response = invoke('soap:getServerInfo') { |msg|
|
@@ -599,7 +595,7 @@ module RemoteAPI
|
|
599
595
|
end
|
600
596
|
end
|
601
597
|
|
602
|
-
#TODO: v0.
|
598
|
+
#TODO: v0.5
|
603
599
|
# createProjectRole
|
604
600
|
# deleteProjectAvatar
|
605
601
|
# getAvailableActions
|
@@ -2,7 +2,16 @@ module JIRA
|
|
2
2
|
|
3
3
|
# Represents a priority level. Straightforward.
|
4
4
|
class Priority
|
5
|
-
|
5
|
+
# @return [String]
|
6
|
+
attr_accessor :id
|
7
|
+
# @return [String]
|
8
|
+
attr_accessor :name
|
9
|
+
# @return [String] is a hex value
|
10
|
+
attr_accessor :color
|
11
|
+
# @return [URL] A NSURL on MacRuby and a URI::HTTP object in CRuby
|
12
|
+
attr_accessor :icon
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :description
|
6
15
|
|
7
16
|
# Factory method that takes a fragment of a SOAP response.
|
8
17
|
# @todo change @color to be some kind of hex Fixnum object
|
@@ -23,7 +32,14 @@ end
|
|
23
32
|
|
24
33
|
# Represents a resolution. Straightforward.
|
25
34
|
class Resolution
|
26
|
-
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :id
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :name
|
39
|
+
# @return [URL] A NSURL on MacRuby and a URI::HTTP object in CRuby
|
40
|
+
attr_accessor :icon
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :description
|
27
43
|
|
28
44
|
# Factory method that takes a fragment of a SOAP response.
|
29
45
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -42,7 +58,10 @@ end
|
|
42
58
|
|
43
59
|
# Represents a field mapping.
|
44
60
|
class Field
|
45
|
-
|
61
|
+
# @return [String]
|
62
|
+
attr_accessor :id
|
63
|
+
# @return [String]
|
64
|
+
attr_accessor :name
|
46
65
|
|
47
66
|
# Factory method that takes a fragment of a SOAP response.
|
48
67
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -59,7 +78,12 @@ end
|
|
59
78
|
# Represents a custom field with values.
|
60
79
|
# @todo see if @key is always nil from the server
|
61
80
|
class CustomField
|
62
|
-
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :id
|
83
|
+
# @return [String]
|
84
|
+
attr_accessor :key
|
85
|
+
# @return [[String]]
|
86
|
+
attr_accessor :values
|
63
87
|
|
64
88
|
# Factory method that takes a fragment of a SOAP response.
|
65
89
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -88,8 +112,16 @@ end
|
|
88
112
|
|
89
113
|
# Represents and issue type. Straight forward.
|
90
114
|
class IssueType
|
91
|
-
|
92
|
-
|
115
|
+
# @return [String]
|
116
|
+
attr_accessor :id
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :name
|
119
|
+
# @return [URL]
|
120
|
+
attr_accessor :icon
|
121
|
+
# @return [String]
|
122
|
+
attr_accessor :description
|
123
|
+
# @return [boolean]
|
124
|
+
attr_accessor :subtask
|
93
125
|
|
94
126
|
# @return [boolean] true if the issue type is a subtask, otherwise false
|
95
127
|
def subtask?; @subtask; end
|
@@ -102,7 +134,7 @@ class IssueType
|
|
102
134
|
issue_type = IssueType.new
|
103
135
|
issue_type.id = frag.xpath('id').to_s
|
104
136
|
issue_type.name = frag.xpath('name').to_s
|
105
|
-
issue_type.subtask = frag.xpath('
|
137
|
+
issue_type.subtask = frag.xpath('subTask').to_s == 'true'
|
106
138
|
issue_type.description = frag.xpath('description').to_s
|
107
139
|
url = frag.xpath('icon').to_s
|
108
140
|
issue_type.icon = URL.new url unless url.nil?
|
@@ -112,8 +144,22 @@ end
|
|
112
144
|
|
113
145
|
# Represents a comment. Straight forward.
|
114
146
|
class Comment
|
115
|
-
|
116
|
-
attr_accessor :
|
147
|
+
# @return [String]
|
148
|
+
attr_accessor :id
|
149
|
+
# @return [String]
|
150
|
+
attr_accessor :original_author
|
151
|
+
# @return [String]
|
152
|
+
attr_accessor :role_level
|
153
|
+
# @return [String]
|
154
|
+
attr_accessor :group_level
|
155
|
+
# @return [String]
|
156
|
+
attr_accessor :body
|
157
|
+
# @return [Time]
|
158
|
+
attr_accessor :create_date
|
159
|
+
# @return [Time]
|
160
|
+
attr_accessor :last_updated
|
161
|
+
# @return [String]
|
162
|
+
attr_accessor :update_author
|
117
163
|
|
118
164
|
# Factory method that takes a fragment of a SOAP response.
|
119
165
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -140,17 +186,22 @@ class Comment
|
|
140
186
|
msg.add 'id', @id
|
141
187
|
msg.add 'author', @original_author
|
142
188
|
msg.add 'body', @body
|
143
|
-
msg.add 'created', @created
|
144
189
|
msg.add 'groupLevel', @group_level
|
145
190
|
msg.add 'roleLevel', @role_level
|
146
191
|
msg.add 'updateAuthor', @update_author
|
147
|
-
msg.add 'updated', @last_updated
|
148
192
|
end
|
149
193
|
end
|
150
194
|
|
151
195
|
# Represents a status. Straightforward.
|
152
196
|
class Status
|
153
|
-
|
197
|
+
# @return [String]
|
198
|
+
attr_accessor :id
|
199
|
+
# @return [String]
|
200
|
+
attr_accessor :name
|
201
|
+
# @return [URL]
|
202
|
+
attr_accessor :icon
|
203
|
+
# @return [String]
|
204
|
+
attr_accessor :description
|
154
205
|
|
155
206
|
# Factory method that takes a fragment of a SOAP response.
|
156
207
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -171,8 +222,18 @@ end
|
|
171
222
|
# included when you retrieve versions from the server.
|
172
223
|
# @todo find out why we don't get a description for this object
|
173
224
|
class Version
|
174
|
-
|
175
|
-
|
225
|
+
# @return [String]
|
226
|
+
attr_accessor :id
|
227
|
+
# @return [String]
|
228
|
+
attr_accessor :name
|
229
|
+
# @return [Fixnum]
|
230
|
+
attr_accessor :sequence
|
231
|
+
# @return [boolean]
|
232
|
+
attr_accessor :released
|
233
|
+
# @return [boolean]
|
234
|
+
attr_accessor :archived
|
235
|
+
# @return [Time]
|
236
|
+
attr_accessor :release_date
|
176
237
|
|
177
238
|
# @return [boolean] true if the version has been released, otherwise false
|
178
239
|
def released?; @released; end
|
@@ -202,6 +263,7 @@ class Version
|
|
202
263
|
msg.add 'name', @name
|
203
264
|
msg.add 'sequence', @sequence unless @sequence.nil?
|
204
265
|
msg.add 'releaseDate', @release_date.xmlschema unless @release_date.nil?
|
266
|
+
msg.add 'released', @released
|
205
267
|
end
|
206
268
|
end
|
207
269
|
|
@@ -209,7 +271,14 @@ end
|
|
209
271
|
# API; a more useful case might be if you wanted to emulate the server's
|
210
272
|
# behaviour.
|
211
273
|
class Scheme
|
212
|
-
|
274
|
+
# @return [String]
|
275
|
+
attr_accessor :id
|
276
|
+
# @return [String]
|
277
|
+
attr_accessor :name
|
278
|
+
# @return [String]
|
279
|
+
attr_accessor :type
|
280
|
+
# @return [String]
|
281
|
+
attr_accessor :description
|
213
282
|
|
214
283
|
# Factory method that takes a fragment of a SOAP response.
|
215
284
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -236,7 +305,10 @@ end
|
|
236
305
|
|
237
306
|
# Represents a component description for a project. Straightforward.
|
238
307
|
class Component
|
239
|
-
|
308
|
+
# @return [String]
|
309
|
+
attr_accessor :id
|
310
|
+
# @return [String]
|
311
|
+
attr_accessor :name
|
240
312
|
|
241
313
|
# Factory method that takes a fragment of a SOAP response.
|
242
314
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -251,10 +323,30 @@ class Component
|
|
251
323
|
end
|
252
324
|
|
253
325
|
# Represents a project configuration. NOT straightforward.
|
254
|
-
#
|
326
|
+
# You need to explicitly ask for schemes in order to get them. By
|
327
|
+
# default, most project fetching methods purposely leave out all
|
328
|
+
# the scheme information as permission schemes can be very large.
|
255
329
|
class Project
|
256
|
-
|
257
|
-
attr_accessor :
|
330
|
+
# @return [String]
|
331
|
+
attr_accessor :id
|
332
|
+
# @return [String]
|
333
|
+
attr_accessor :name
|
334
|
+
# @return [String]
|
335
|
+
attr_accessor :key
|
336
|
+
# @return [URL]
|
337
|
+
attr_accessor :url
|
338
|
+
# @return [URL]
|
339
|
+
attr_accessor :project_url
|
340
|
+
# @return [String]
|
341
|
+
attr_accessor :lead
|
342
|
+
# @return [String]
|
343
|
+
attr_accessor :description
|
344
|
+
# @return [JIRA::Scheme]
|
345
|
+
attr_accessor :issue_security_scheme
|
346
|
+
# @return [JIRA::Scheme]
|
347
|
+
attr_accessor :notification_scheme
|
348
|
+
# @return [JIRA::PermissionScheme]
|
349
|
+
attr_accessor :permission_scheme
|
258
350
|
|
259
351
|
# Factory method that takes a fragment of a SOAP response.
|
260
352
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -296,8 +388,18 @@ end
|
|
296
388
|
|
297
389
|
# Contains a base64 encoded avatar image and some metadata. Straightforward.
|
298
390
|
class Avatar
|
299
|
-
|
300
|
-
|
391
|
+
# @return [String]
|
392
|
+
attr_accessor :id
|
393
|
+
# @return [String]
|
394
|
+
attr_accessor :owner
|
395
|
+
# @return [String]
|
396
|
+
attr_accessor :type
|
397
|
+
# @return [String]
|
398
|
+
attr_accessor :content_type
|
399
|
+
# @return [String]
|
400
|
+
attr_accessor :base64_data
|
401
|
+
# @return [boolean] indicates if the image is the system default
|
402
|
+
attr_accessor :system
|
301
403
|
|
302
404
|
# @return [boolean] true if avatar is the default system avatar, else false
|
303
405
|
def system?; @system; end
|
@@ -327,11 +429,48 @@ end
|
|
327
429
|
#
|
328
430
|
# Issues with an UNRESOLVED status will have nil for the value of @resolution.
|
329
431
|
class Issue
|
330
|
-
|
331
|
-
attr_accessor :
|
332
|
-
|
333
|
-
attr_accessor :
|
334
|
-
|
432
|
+
# @return [String]
|
433
|
+
attr_accessor :id
|
434
|
+
# @return [String]
|
435
|
+
attr_accessor :key
|
436
|
+
# @return [String]
|
437
|
+
attr_accessor :summary
|
438
|
+
# @return [String]
|
439
|
+
attr_accessor :description
|
440
|
+
# @return [String]
|
441
|
+
attr_accessor :type_id
|
442
|
+
# @return [Time]
|
443
|
+
attr_accessor :last_updated
|
444
|
+
# @return [Fixnum]
|
445
|
+
attr_accessor :votes
|
446
|
+
# @return [String]
|
447
|
+
attr_accessor :status_id
|
448
|
+
# @return [String]
|
449
|
+
attr_accessor :assignee_name
|
450
|
+
# @return [String]
|
451
|
+
attr_accessor :reporter_name
|
452
|
+
# @return [String]
|
453
|
+
attr_accessor :priority_id
|
454
|
+
# @return [String]
|
455
|
+
attr_accessor :project_name
|
456
|
+
# @return [[JIRA::Version]]
|
457
|
+
attr_accessor :affects_versions
|
458
|
+
# @return [Time]
|
459
|
+
attr_accessor :create_date
|
460
|
+
# @return [Time]
|
461
|
+
attr_accessor :due_date
|
462
|
+
# @return [[JIRA::Version]]
|
463
|
+
attr_accessor :fix_versions
|
464
|
+
# @return [String]
|
465
|
+
attr_accessor :resolution_id
|
466
|
+
# @return [String]
|
467
|
+
attr_accessor :environment
|
468
|
+
# @return [[JIRA::Component]]
|
469
|
+
attr_accessor :components
|
470
|
+
# @return [[String]]
|
471
|
+
attr_accessor :attachment_names
|
472
|
+
# @return [[JIRA::CustomField]]
|
473
|
+
attr_accessor :custom_field_values
|
335
474
|
|
336
475
|
# Factory method that takes a fragment of a SOAP response.
|
337
476
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -439,7 +578,12 @@ end
|
|
439
578
|
|
440
579
|
# Contains the basic information about a user. Straightforward.
|
441
580
|
class User
|
442
|
-
|
581
|
+
# @return [String]
|
582
|
+
attr_accessor :name
|
583
|
+
# @return [String]
|
584
|
+
attr_accessor :full_name
|
585
|
+
# @return [String]
|
586
|
+
attr_accessor :email
|
443
587
|
|
444
588
|
# Factory method that takes a fragment of a SOAP response.
|
445
589
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -457,7 +601,10 @@ end
|
|
457
601
|
# A structure that is a bit of a hack. It is essentially just a key-value pair
|
458
602
|
# that is used mainly by {RemoteAPI#update_issue}.
|
459
603
|
class FieldValue
|
460
|
-
|
604
|
+
# @return [String]
|
605
|
+
attr_accessor :id
|
606
|
+
# @return [[String,Time,URL,JIRA::*,nil]] hard to say what the type should be
|
607
|
+
attr_accessor :values
|
461
608
|
|
462
609
|
# Factory method that gives you a nil value for the given id.
|
463
610
|
# @param [String] id name of the field for @values
|
@@ -485,7 +632,18 @@ end
|
|
485
632
|
# appears to be of the form
|
486
633
|
# $ENDPOINT_URL/secure/attachment/$ATTACHMENT_ID/$ATTACHMENT_FILENAME
|
487
634
|
class AttachmentMetadata
|
488
|
-
|
635
|
+
# @return [String]
|
636
|
+
attr_accessor :id
|
637
|
+
# @return [String]
|
638
|
+
attr_accessor :author
|
639
|
+
# @return [Time]
|
640
|
+
attr_accessor :create_date
|
641
|
+
# @return [String]
|
642
|
+
attr_accessor :filename
|
643
|
+
# @return [Fixnum] measured in @todo units
|
644
|
+
attr_accessor :file_size
|
645
|
+
# @return [String]
|
646
|
+
attr_accessor :mime_type
|
489
647
|
|
490
648
|
# Factory method that takes a fragment of a SOAP response.
|
491
649
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -505,9 +663,20 @@ class AttachmentMetadata
|
|
505
663
|
end
|
506
664
|
|
507
665
|
# Only contains basic information about the endpoint server.
|
666
|
+
# @todo turn attributes back to read-only by not using a factory for init
|
508
667
|
class ServerInfo
|
509
|
-
|
510
|
-
attr_accessor :
|
668
|
+
# @return [URL]
|
669
|
+
attr_accessor :base_url
|
670
|
+
# @return [Time]
|
671
|
+
attr_accessor :build_date
|
672
|
+
# @return [Fixnum]
|
673
|
+
attr_accessor :build_number
|
674
|
+
# @return [String]
|
675
|
+
attr_accessor :edition
|
676
|
+
# @return [JIRA::TimeInfo]
|
677
|
+
attr_accessor :server_time
|
678
|
+
# @return [String]
|
679
|
+
attr_accessor :version
|
511
680
|
|
512
681
|
# Factory method that takes a fragment of a SOAP response.
|
513
682
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -529,8 +698,13 @@ class ServerInfo
|
|
529
698
|
end
|
530
699
|
|
531
700
|
# Simple structure for a time and time zone; used oddly.
|
701
|
+
# The only place this structure is used is when #get_server_info is called.
|
702
|
+
# @todo turn attributes back to read-only by not using a factory for init
|
532
703
|
class TimeInfo
|
533
|
-
|
704
|
+
# @return [Time]
|
705
|
+
attr_accessor :server_time
|
706
|
+
# @return [String]
|
707
|
+
attr_accessor :timezone
|
534
708
|
|
535
709
|
# Factory method that takes a fragment of a SOAP response.
|
536
710
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -547,7 +721,18 @@ end
|
|
547
721
|
# Represents a filter
|
548
722
|
# @todo find out what @project is supposed to be for
|
549
723
|
class Filter
|
550
|
-
|
724
|
+
# @return [String]
|
725
|
+
attr_accessor :id
|
726
|
+
# @return [String]
|
727
|
+
attr_accessor :name
|
728
|
+
# @return [String]
|
729
|
+
attr_accessor :author
|
730
|
+
# @return [String]
|
731
|
+
attr_accessor :project
|
732
|
+
# @return [String]
|
733
|
+
attr_accessor :description
|
734
|
+
# @return [nil]
|
735
|
+
attr_accessor :xml
|
551
736
|
|
552
737
|
# Factory method that takes a fragment of a SOAP response.
|
553
738
|
# @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
|
@@ -565,4 +750,23 @@ class Filter
|
|
565
750
|
end
|
566
751
|
end
|
567
752
|
|
753
|
+
# @todo documentation for this class
|
754
|
+
# @todo write a boolean accessor macro
|
755
|
+
class ServerConfiguration
|
756
|
+
attr_reader :time_tracking_hours_per_day, :time_tracking_hours_per_week
|
757
|
+
|
758
|
+
def watching_allowed?; @watching_allowed; end
|
759
|
+
def voting_allowed?; @voting_allowed; end
|
760
|
+
def unassigned_issues_allowed?; @unassigned_issues_allowed; end
|
761
|
+
def time_tracking_allowed?; @time_tracking_allowed; end
|
762
|
+
def subtasks_allowed?; @subtasks_allowed; end
|
763
|
+
def issue_linking_allowed?; @issue_linking_allowed; end
|
764
|
+
def eternal_user_management_allowed?; @external_user_management; end
|
765
|
+
def attachments_allowed?; @attachments_allowed; end
|
766
|
+
|
767
|
+
def initialize(frag = nil)
|
768
|
+
return if frag.nil?
|
769
|
+
end
|
770
|
+
end
|
771
|
+
|
568
772
|
end
|
data/lib/jiraSOAP/url.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 4
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mark Rada
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10
|
17
|
+
date: 2010-11-10 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -83,10 +83,10 @@ files:
|
|
83
83
|
- lib/jiraSOAP.rb
|
84
84
|
- lib/jiraSOAP/JIRAservice.rb
|
85
85
|
- lib/jiraSOAP/handsoap_extensions.rb
|
86
|
-
- lib/jiraSOAP/macruby_stuff.rb
|
87
86
|
- lib/jiraSOAP/remoteAPI.rb
|
88
87
|
- lib/jiraSOAP/remoteEntities.rb
|
89
88
|
- lib/jiraSOAP/url.rb
|
89
|
+
- lib/macruby_stuff.rb
|
90
90
|
- LICENSE
|
91
91
|
- README.markdown
|
92
92
|
- test/jiraSOAP_test.rb
|