cherby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +18 -2
- data/cherby.gemspec +1 -1
- data/lib/cherby/business_object.rb +24 -20
- data/lib/cherby/cherwell.rb +16 -0
- data/lib/cherby/client.rb +6 -4
- data/lib/cherby/incident.rb +19 -15
- data/lib/cherby/journal_note.rb +0 -1
- data/lib/cherby/task.rb +1 -2
- data/spec/business_object_spec.rb +18 -24
- data/spec/cherwell_spec.rb +35 -9
- data/spec/incident_spec.rb +1 -1
- data/spec/task_spec.rb +2 -2
- metadata +2 -8
- data/lib/cherby/templates/incident.mustache +0 -226
- data/lib/cherby/templates/journal_note.mustache +0 -30
- data/lib/cherby/templates/journal_note_relationship.mustache +0 -3
- data/lib/cherby/templates/task.mustache +0 -67
- data/lib/cherby/templates/task_relationship.mustache +0 -3
- data/lib/cherby/templates/test/simple.mustache +0 -8
data/README.md
CHANGED
@@ -1,12 +1,28 @@
|
|
1
1
|
Cherby
|
2
2
|
======
|
3
|
+
[![Build Status](https://secure.travis-ci.org/a-e/cherby.png?branch=dev)](http://travis-ci.org/a-e/cherby)
|
3
4
|
|
4
5
|
Cherby is a Ruby wrapper for the
|
5
6
|
[Cherwell Web Service](http://cherwellsupport.com/webhelp/cherwell/index.htm#1971.htm).
|
6
7
|
|
7
|
-
[
|
8
|
+
- [Source](https://github.com/a-e/cherby)
|
9
|
+
- [Documentation](http://rubydoc.info/github/a-e/cherby/master/frames)
|
10
|
+
- [Gem](http://rubygems.org/gems/cherby)
|
11
|
+
- [Status](https://travis-ci.org/a-e/cherby)
|
8
12
|
|
9
|
-
|
13
|
+
|
14
|
+
Install
|
15
|
+
-------
|
16
|
+
|
17
|
+
Just do:
|
18
|
+
|
19
|
+
$ gem install cherby
|
20
|
+
|
21
|
+
Or add:
|
22
|
+
|
23
|
+
gem 'cherby'
|
24
|
+
|
25
|
+
to your project's Gemfile or gemspec.
|
10
26
|
|
11
27
|
|
12
28
|
Usage
|
data/cherby.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'mustache'
|
2
1
|
require 'nokogiri'
|
3
2
|
|
4
3
|
module Cherby
|
@@ -7,30 +6,28 @@ module Cherby
|
|
7
6
|
|
8
7
|
# Override this with the value of the BusinessObject's 'Name' attribute
|
9
8
|
@object_name = ''
|
10
|
-
# Override this with the name of the Mustache XML template used to render
|
11
|
-
# your BusinessObject
|
12
|
-
@template = ''
|
13
9
|
# Fill this with default values for new instances of your BusinessObject
|
14
10
|
@default_values = {}
|
15
11
|
|
16
12
|
class << self
|
17
|
-
attr_accessor :object_name, :
|
13
|
+
attr_accessor :object_name, :default_values
|
18
14
|
end
|
19
15
|
|
20
16
|
# Create a new BusinessObject subclass instance from the given hash of
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
17
|
+
# 'FieldName' => 'Field Value'.
|
18
|
+
def self.create(fields={})
|
19
|
+
type_name = self.object_name
|
20
|
+
builder = Nokogiri::XML::Builder.new {
|
21
|
+
BusinessObject_('Name' => type_name, 'RecID' => 'TODO') {
|
22
|
+
FieldList_ {
|
23
|
+
fields.each { |name, value|
|
24
|
+
Field_(value, 'Name' => name)
|
25
|
+
}
|
26
|
+
}
|
27
|
+
RelationshipList_ { }
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return self.new(builder.to_xml)
|
34
31
|
end
|
35
32
|
|
36
33
|
# Instance methods
|
@@ -50,7 +47,13 @@ module Cherby
|
|
50
47
|
# Return the node of the field with the given name.
|
51
48
|
def get_field_node(field_name)
|
52
49
|
selector = "BusinessObject > FieldList > Field[@Name=#{field_name}]"
|
53
|
-
|
50
|
+
element = @dom.css(selector).first
|
51
|
+
if element.nil?
|
52
|
+
element = Nokogiri::XML::Node.new('Field', @dom)
|
53
|
+
element['Name'] = field_name
|
54
|
+
@dom.at_css("BusinessObject > FieldList").add_child(element)
|
55
|
+
end
|
56
|
+
return element
|
54
57
|
end
|
55
58
|
|
56
59
|
# Return a hash of field names and values
|
@@ -101,7 +104,7 @@ module Cherby
|
|
101
104
|
# (LastModDateTime converted to DateTime)
|
102
105
|
def modified
|
103
106
|
last_mod = self['LastModDateTime']
|
104
|
-
if last_mod.nil?
|
107
|
+
if last_mod.nil? || last_mod.empty?
|
105
108
|
raise RuntimeError, "BusinessObject is missing LastModDateTime field."
|
106
109
|
end
|
107
110
|
begin
|
@@ -155,5 +158,6 @@ module Cherby
|
|
155
158
|
self[field] = other_object[field]
|
156
159
|
end
|
157
160
|
end
|
161
|
+
|
158
162
|
end
|
159
163
|
end
|
data/lib/cherby/cherwell.rb
CHANGED
@@ -225,6 +225,22 @@ module Cherby
|
|
225
225
|
return @client.get_last_error
|
226
226
|
end
|
227
227
|
|
228
|
+
# Get a business object definition as a hash
|
229
|
+
# ex.
|
230
|
+
# get_object_definition('Incident')
|
231
|
+
#
|
232
|
+
# TODO: Use this as the basis for building templates?
|
233
|
+
#
|
234
|
+
def get_object_definition(object_type)
|
235
|
+
result = {}
|
236
|
+
definition = @client.get_business_object_definition(object_type)
|
237
|
+
selector = 'BusinessObjectDef > FieldList > Field'
|
238
|
+
Nokogiri::XML(definition).css(selector).map do |field|
|
239
|
+
result[field['Name']] = field.css('Description').inner_html
|
240
|
+
end
|
241
|
+
return result
|
242
|
+
end
|
243
|
+
|
228
244
|
end # class Cherwell
|
229
245
|
end # module Cherby
|
230
246
|
|
data/lib/cherby/client.rb
CHANGED
@@ -11,7 +11,7 @@ module Cherby
|
|
11
11
|
# like "http://my.hostname.com/CherwellService/api.asmx?WSDL".
|
12
12
|
# The `http://` and `?WSDL` parts are automatically added if missing.
|
13
13
|
#
|
14
|
-
def initialize(base_url)
|
14
|
+
def initialize(base_url, verbose_logging=false)
|
15
15
|
if File.exist?(base_url)
|
16
16
|
wsdl_url = base_url
|
17
17
|
elsif base_url =~ /^http/
|
@@ -23,7 +23,7 @@ module Cherby
|
|
23
23
|
elsif base_url !~ /^http/
|
24
24
|
raise ArgumentError, "Client URL must be a local file, or begin with http"
|
25
25
|
end
|
26
|
-
super(:wsdl => wsdl_url)
|
26
|
+
super(:wsdl => wsdl_url, :log => verbose_logging)
|
27
27
|
end
|
28
28
|
|
29
29
|
# Call a given SOAP method with an optional body.
|
@@ -72,8 +72,10 @@ module Cherby
|
|
72
72
|
# # or a Hash of arguments:
|
73
73
|
# client.login(:userId => 'sisko', :password => 'baseball')
|
74
74
|
#
|
75
|
-
#
|
76
|
-
#
|
75
|
+
# # Get a BusinessObject definition with positional arguments:
|
76
|
+
# client.get_business_object_definition('JournalNote')
|
77
|
+
# # or a Hash of arguments:
|
78
|
+
# client.get_business_object_definition(:nameOrId => 'JournalNote')
|
77
79
|
#
|
78
80
|
def method_missing(method, *args, &block)
|
79
81
|
if known_methods.include?(method)
|
data/lib/cherby/incident.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'date'
|
2
|
-
require 'mustache'
|
3
2
|
require 'cherby/business_object'
|
4
3
|
require 'cherby/task'
|
5
4
|
require 'cherby/journal_note'
|
@@ -8,7 +7,6 @@ module Cherby
|
|
8
7
|
# Wrapper for Cherwell incident objects.
|
9
8
|
class Incident < BusinessObject
|
10
9
|
@object_name = 'Incident'
|
11
|
-
@template = 'incident'
|
12
10
|
@default_values = {
|
13
11
|
:service => "Auto Generated",
|
14
12
|
:service_group => "Auto Generated",
|
@@ -64,7 +62,7 @@ module Cherby
|
|
64
62
|
def journal_notes
|
65
63
|
css = "Relationship[@Name='Incident has Notes']" +
|
66
64
|
" BusinessObject[@Name=JournalNote]"
|
67
|
-
|
65
|
+
return @dom.css(css).map do |element|
|
68
66
|
JournalNote.new(element.to_xml)
|
69
67
|
end
|
70
68
|
end
|
@@ -74,16 +72,19 @@ module Cherby
|
|
74
72
|
# Bail out if this incident doesn't actually exist
|
75
73
|
return nil if !exists?
|
76
74
|
task = Task.create({
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
75
|
+
'ParentPublicID' => self['IncidentID'],
|
76
|
+
'ParentTypeName' => 'Incident',
|
77
|
+
'TaskType' => 'Action',
|
78
|
+
'TaskDescription' => task_description,
|
79
|
+
'Notes' => task_notes,
|
80
|
+
'OwnedBy' => owned_by,
|
83
81
|
})
|
84
|
-
|
85
|
-
|
86
|
-
|
82
|
+
rel_node = Nokogiri::XML::Node.new('Relationship', @dom)
|
83
|
+
rel_node['Name'] = 'Incident Has Tasks'
|
84
|
+
rel_node['TargetObjectName'] = 'Task'
|
85
|
+
rel_node['Type'] = 'Owns'
|
86
|
+
rel_node.inner_html = task.dom.css('BusinessObject').to_xml
|
87
|
+
@dom.at_css('RelationshipList').add_child(rel_node)
|
87
88
|
end
|
88
89
|
|
89
90
|
# Add a new JournalNote to this incident.
|
@@ -93,9 +94,12 @@ module Cherby
|
|
93
94
|
#
|
94
95
|
def add_journal_note(journal_note)
|
95
96
|
return nil if !exists?
|
96
|
-
|
97
|
-
|
98
|
-
|
97
|
+
rel_node = Nokogiri::XML::Node.new('Relationship', @dom)
|
98
|
+
rel_node['Name'] = 'Incident has Notes'
|
99
|
+
rel_node['TargetObjectName'] = 'JournalNote'
|
100
|
+
rel_node['Type'] = 'Owns'
|
101
|
+
rel_node.inner_html = journal_note.dom.css('BusinessObject').to_xml
|
102
|
+
@dom.at_css('RelationshipList').add_child(rel_node)
|
99
103
|
end
|
100
104
|
|
101
105
|
# Return True if this Incident has important fields differing from the
|
data/lib/cherby/journal_note.rb
CHANGED
data/lib/cherby/task.rb
CHANGED
@@ -4,7 +4,6 @@ require 'cherby/business_object'
|
|
4
4
|
module Cherby
|
5
5
|
class Task < BusinessObject
|
6
6
|
@object_name = 'Task'
|
7
|
-
@template = 'task'
|
8
7
|
@default_values = {
|
9
8
|
:status => "New",
|
10
9
|
}
|
@@ -29,7 +28,7 @@ module Cherby
|
|
29
28
|
def add_journal_note(journal_note)
|
30
29
|
message = "\n============================\n" + \
|
31
30
|
"Comment added #{journal_note.mod_s} by #{journal_note['CreatedBy']}: " + \
|
32
|
-
journal_note['Details'] + "\n\n"
|
31
|
+
journal_note['Details'].to_s + "\n\n"
|
33
32
|
self['CompletionDetails'] = self['CompletionDetails'] + message
|
34
33
|
end
|
35
34
|
end
|
@@ -4,19 +4,16 @@ require 'cherby/business_object'
|
|
4
4
|
# Some BusinessObject subclasses to test with
|
5
5
|
class MySubclass < Cherby::BusinessObject
|
6
6
|
@object_name = 'MySubclass'
|
7
|
-
@template = 'test/simple'
|
8
7
|
@default_values = {}
|
9
8
|
end
|
10
9
|
|
11
10
|
class MySubclassNoTemplate < Cherby::BusinessObject
|
12
11
|
@object_name = 'MySubclassNoTemplate'
|
13
|
-
@template = ''
|
14
12
|
@default_values = {}
|
15
13
|
end
|
16
14
|
|
17
15
|
class MySubclassNoTemplateFile < Cherby::BusinessObject
|
18
16
|
@object_name = 'MySubclassNoTemplateFile'
|
19
|
-
@template = 'no_such_file'
|
20
17
|
@default_values = {}
|
21
18
|
end
|
22
19
|
|
@@ -24,24 +21,12 @@ describe Cherby::BusinessObject do
|
|
24
21
|
context "Class methods" do
|
25
22
|
describe "#create" do
|
26
23
|
it "sets options in the DOM" do
|
27
|
-
obj = MySubclass.create({
|
24
|
+
obj = MySubclass.create({'First' => 'Eric', 'Last' => 'Idle'})
|
28
25
|
first_name = obj.dom.css("BusinessObject[@Name=MySubclass] Field[@Name=First]").first
|
29
26
|
last_name = obj.dom.css("BusinessObject[@Name=MySubclass] Field[@Name=Last]").first
|
30
27
|
first_name.content.should == "Eric"
|
31
28
|
last_name.content.should == "Idle"
|
32
29
|
end
|
33
|
-
|
34
|
-
it "raises an exception when no template is provided" do
|
35
|
-
lambda do
|
36
|
-
MySubclassNoTemplate.create
|
37
|
-
end.should raise_error(RuntimeError, /No template defined/)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "raises an exception if the template file is nonexistent" do
|
41
|
-
lambda do
|
42
|
-
MySubclassNoTemplateFile.create
|
43
|
-
end.should raise_error(Errno::ENOENT, /No such file/)
|
44
|
-
end
|
45
30
|
end #create
|
46
31
|
|
47
32
|
describe "#parse_datetime" do
|
@@ -94,7 +79,7 @@ describe Cherby::BusinessObject do
|
|
94
79
|
|
95
80
|
describe "#[]" do
|
96
81
|
it "returns the value in the named field" do
|
97
|
-
obj = MySubclass.create({
|
82
|
+
obj = MySubclass.create({'First' => 'Eric', 'Last' => 'Idle'})
|
98
83
|
obj['First'].should == 'Eric'
|
99
84
|
obj['Last'].should == 'Idle'
|
100
85
|
end
|
@@ -102,12 +87,18 @@ describe Cherby::BusinessObject do
|
|
102
87
|
|
103
88
|
describe "#[]=" do
|
104
89
|
it "puts a value in the named field" do
|
105
|
-
obj = MySubclass.create({
|
90
|
+
obj = MySubclass.create({'First' => 'Eric', 'Last' => 'Idle'})
|
106
91
|
obj['First'] = 'Terry'
|
107
92
|
obj['Last'] = 'Jones'
|
108
93
|
obj['First'].should == 'Terry'
|
109
94
|
obj['Last'].should == 'Jones'
|
110
95
|
end
|
96
|
+
|
97
|
+
it "creates a new field if it doesn't exist" do
|
98
|
+
obj = MySubclass.create({'First' => 'Eric', 'Last' => 'Idle'})
|
99
|
+
obj['Middle'] = 'Something'
|
100
|
+
obj['Middle'].should == 'Something'
|
101
|
+
end
|
111
102
|
end #[]=
|
112
103
|
|
113
104
|
describe "#modified" do
|
@@ -116,12 +107,12 @@ describe Cherby::BusinessObject do
|
|
116
107
|
# (otherwise the date won't compare equal later)
|
117
108
|
now = DateTime.parse(DateTime.now.to_s)
|
118
109
|
|
119
|
-
obj = MySubclass.create({
|
110
|
+
obj = MySubclass.create({'LastModDateTime' => now})
|
120
111
|
obj.modified.should == now
|
121
112
|
end
|
122
113
|
|
123
114
|
it "BusinessObject with an invalid LastModDateTime value" do
|
124
|
-
obj = MySubclass.create({
|
115
|
+
obj = MySubclass.create({'LastModDateTime' => 'bogus'})
|
125
116
|
lambda do
|
126
117
|
obj.modified
|
127
118
|
end.should raise_error(RuntimeError, /Cannot parse LastModDateTime: 'bogus'/)
|
@@ -148,8 +139,8 @@ describe Cherby::BusinessObject do
|
|
148
139
|
describe "#newer_than?" do
|
149
140
|
before(:each) do
|
150
141
|
@now = DateTime.now
|
151
|
-
@older = MySubclass.create({
|
152
|
-
@newer = MySubclass.create({
|
142
|
+
@older = MySubclass.create({'LastModDateTime' => (@now - 1)})
|
143
|
+
@newer = MySubclass.create({'LastModDateTime' => @now})
|
153
144
|
end
|
154
145
|
|
155
146
|
it "true when this one was modified more recently than another" do
|
@@ -185,8 +176,11 @@ describe Cherby::BusinessObject do
|
|
185
176
|
first_node.inner_html.should == 'Eric'
|
186
177
|
end
|
187
178
|
|
188
|
-
it "
|
189
|
-
@obj.get_field_node('
|
179
|
+
it "creates a new Field if it doesn't exist" do
|
180
|
+
middle_node = @obj.get_field_node('Middle')
|
181
|
+
middle_node.should be_a(Nokogiri::XML::Node)
|
182
|
+
middle_node.attr('Name').should == 'Middle'
|
183
|
+
middle_node.inner_html.should == ''
|
190
184
|
end
|
191
185
|
end #get_field_node
|
192
186
|
|
data/spec/cherwell_spec.rb
CHANGED
@@ -191,10 +191,10 @@ describe Cherby::Cherwell do
|
|
191
191
|
before(:each) do
|
192
192
|
@public_id = '62521'
|
193
193
|
@incident_data = {
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
194
|
+
'IncidentID' => @public_id,
|
195
|
+
'Service' => 'Consulting Services',
|
196
|
+
'SubCategory' => 'New/Modified Functionality',
|
197
|
+
'Priority' => '4',
|
198
198
|
}
|
199
199
|
@incident = Cherby::Incident.create(@incident_data)
|
200
200
|
@cherwell.stub(:last_error => nil)
|
@@ -218,8 +218,8 @@ describe Cherby::Cherwell do
|
|
218
218
|
before(:each) do
|
219
219
|
@public_id = '90210'
|
220
220
|
@task_data = {
|
221
|
-
|
222
|
-
|
221
|
+
'TaskID' => @public_id,
|
222
|
+
'ParentID' => '90000'
|
223
223
|
}
|
224
224
|
@task = Cherby::Task.create(@task_data)
|
225
225
|
@cherwell.stub(:last_error => nil)
|
@@ -242,9 +242,9 @@ describe Cherby::Cherwell do
|
|
242
242
|
describe "#create_incident" do
|
243
243
|
before(:each) do
|
244
244
|
@incident_data = {
|
245
|
-
|
246
|
-
|
247
|
-
|
245
|
+
'Service' => 'Consulting Services',
|
246
|
+
'SubCategory' => 'New/Modified Functionality',
|
247
|
+
'Priority' => '4',
|
248
248
|
}
|
249
249
|
@public_id = '54321'
|
250
250
|
end
|
@@ -296,5 +296,31 @@ describe Cherby::Cherwell do
|
|
296
296
|
end
|
297
297
|
end #last_error
|
298
298
|
|
299
|
+
describe "#get_object_definition" do
|
300
|
+
it "returns a hash of field names" do
|
301
|
+
@definition_xml = %Q{
|
302
|
+
<Trebuchet>
|
303
|
+
<BusinessObjectDef Name="Incident">
|
304
|
+
<Alias/>
|
305
|
+
<FieldList>
|
306
|
+
<Field Name="RecID"><Description>Unique identifier</Description></Field>
|
307
|
+
<Field Name="First"><Description>First Name</Description></Field>
|
308
|
+
<Field Name="Last"><Description>Last Name</Description></Field>
|
309
|
+
</FieldList>
|
310
|
+
</BusinessObjectDef>
|
311
|
+
</Trebuchet>
|
312
|
+
}
|
313
|
+
savon.expects(:get_business_object_definition).
|
314
|
+
with(:message => {:nameOrId => 'Incident'}).
|
315
|
+
returns(
|
316
|
+
savon_response('GetBusinessObjectDefinition', @definition_xml)
|
317
|
+
)
|
318
|
+
@cherwell.get_object_definition('Incident').should == {
|
319
|
+
'First' => 'First Name',
|
320
|
+
'Last' => 'Last Name',
|
321
|
+
'RecID' => 'Unique identifier'
|
322
|
+
}
|
323
|
+
end
|
324
|
+
end #get_object_definition
|
299
325
|
end # describe Cherby::Cherwell
|
300
326
|
|
data/spec/incident_spec.rb
CHANGED
@@ -80,7 +80,7 @@ module Cherby
|
|
80
80
|
describe "#add_journal_note" do
|
81
81
|
it "adds a JournalNote" do
|
82
82
|
journal_note = JournalNote.create({
|
83
|
-
|
83
|
+
'Details' => 'New note on incident',
|
84
84
|
})
|
85
85
|
@incident.add_journal_note(journal_note)
|
86
86
|
last_journal_note = @incident.journal_notes.last
|
data/spec/task_spec.rb
CHANGED
@@ -63,8 +63,8 @@ module Cherby
|
|
63
63
|
it "adds a note to the Task" do
|
64
64
|
task = Task.new(@task_xml)
|
65
65
|
journal_note = JournalNote.create({
|
66
|
-
|
67
|
-
|
66
|
+
'Details' => 'New note on task',
|
67
|
+
'LastModDateTime' => DateTime.now,
|
68
68
|
})
|
69
69
|
task.add_journal_note(journal_note)
|
70
70
|
task['CompletionDetails'].should =~ /New note on task/
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cherby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|
@@ -211,12 +211,6 @@ files:
|
|
211
211
|
- lib/cherby/incident.rb
|
212
212
|
- lib/cherby/journal_note.rb
|
213
213
|
- lib/cherby/task.rb
|
214
|
-
- lib/cherby/templates/incident.mustache
|
215
|
-
- lib/cherby/templates/journal_note.mustache
|
216
|
-
- lib/cherby/templates/journal_note_relationship.mustache
|
217
|
-
- lib/cherby/templates/task.mustache
|
218
|
-
- lib/cherby/templates/task_relationship.mustache
|
219
|
-
- lib/cherby/templates/test/simple.mustache
|
220
214
|
- spec/business_object_spec.rb
|
221
215
|
- spec/cherwell_spec.rb
|
222
216
|
- spec/client_spec.rb
|
@@ -1,226 +0,0 @@
|
|
1
|
-
<?xml version="1.0"?>
|
2
|
-
<BusinessObject Name="Incident" RecID="{{incident_id}}">
|
3
|
-
<FieldList>
|
4
|
-
<!-- Fields common to all BusinessObjects -->
|
5
|
-
<Field Name="RecID">{{rec_id}}</Field>
|
6
|
-
<Field Name="CreatedDateTime">{{created_date_time}}</Field>
|
7
|
-
<Field Name="CreatedBy">{{created_by}}</Field>
|
8
|
-
<Field Name="CreatedByID"></Field>
|
9
|
-
<Field Name="LastModDateTime">{{last_mod_date_time}}</Field>
|
10
|
-
<Field Name="LastModBy">{{last_mod_by}}</Field>
|
11
|
-
<Field Name="LastModByID"></Field>
|
12
|
-
<Field Name="OwnedBy">{{owned_by}}</Field>
|
13
|
-
<Field Name="OwnedByTeam">{{owned_by_team}}</Field>
|
14
|
-
<Field Name="OwnerID"></Field>
|
15
|
-
<Field Name="OwnerTeamID"></Field>
|
16
|
-
|
17
|
-
<!-- Unused fields? -->
|
18
|
-
<Field Name="LastModTimeStamp"/>
|
19
|
-
|
20
|
-
<Field Name="IncidentID">{{incident_id}}</Field>
|
21
|
-
<Field Name="Status">{{status}}</Field>
|
22
|
-
<Field Name="StatusDesc"/>
|
23
|
-
<Field Name="Service">{{service}}</Field>
|
24
|
-
<Field Name="Category">{{category}}</Field>
|
25
|
-
<Field Name="SubCategory">{{sub_category}}</Field>
|
26
|
-
<Field Name="SpecificsTypeId"/>
|
27
|
-
<Field Name="Description">{{description}}</Field>
|
28
|
-
<Field Name="Impact">{{impact}}</Field>
|
29
|
-
<Field Name="Urgency">{{urgency}}</Field>
|
30
|
-
<Field Name="Priority">{{priority}}</Field>
|
31
|
-
<Field Name="ClosedDateTime"/>
|
32
|
-
<Field Name="ClosedBy"/>
|
33
|
-
<Field Name="ClosedByID"/>
|
34
|
-
<Field Name="CauseCode"/>
|
35
|
-
<Field Name="IsPrivate">FALSE</Field>
|
36
|
-
<Field Name="Cost">0</Field>
|
37
|
-
<Field Name="CustomerTypeID">{{customer_type_id}}</Field>
|
38
|
-
<Field Name="CustomerRecID">{{customer_rec_id}}</Field>
|
39
|
-
<Field Name="CloseDescription"/>
|
40
|
-
<Field Name="LinkedProblem"/>
|
41
|
-
<Field Name="ConfigItemTypeID"/>
|
42
|
-
<Field Name="ConfigItemRecID"/>
|
43
|
-
<Field Name="IncidentDurationInDays">0.00</Field>
|
44
|
-
<Field Name="IncidentType">Service Request</Field>
|
45
|
-
<Field Name="RespondBy"/>
|
46
|
-
<Field Name="SLAID">93aec497070aea63541fae4004988811547a5a70b9</Field>
|
47
|
-
<Field Name="SLAName">Technology Services</Field>
|
48
|
-
<Field Name="ResolveBy"/>
|
49
|
-
<Field Name="ClosedOn1stCall">FALSE</Field>
|
50
|
-
<Field Name="CallSource">e-mail</Field>
|
51
|
-
<Field Name="Detail"/>
|
52
|
-
<Field Name="ChangeID"/>
|
53
|
-
<Field Name="MultipleConfig">FALSE</Field>
|
54
|
-
<Field Name="OwnedByEmail"/>
|
55
|
-
<Field Name="IncidentDurationInHours">0</Field>
|
56
|
-
<Field Name="CustomerDisplayName">{{created_by}}</Field>
|
57
|
-
<Field Name="EMailTemplate"/>
|
58
|
-
<Field Name="OwnedByManager"/>
|
59
|
-
<Field Name="OwnedByManagerEmail"/>
|
60
|
-
<Field Name="CreatedByEmail">{{created_by_email}}</Field>
|
61
|
-
<Field Name="InitialITContact">{{created_by}}</Field>
|
62
|
-
<Field Name="InitialITContactEmail">{{created_by_email}}</Field>
|
63
|
-
<Field Name="PendingReason"/>
|
64
|
-
<Field Name="ReviewByDate"/>
|
65
|
-
<Field Name="ProjectCode"/>
|
66
|
-
<Field Name="Task"/>
|
67
|
-
<Field Name="PhaseRecordStatus">Complete</Field>
|
68
|
-
<Field Name="PhaseClassifyStatus">Complete</Field>
|
69
|
-
<Field Name="PhaseInvestigateStatus">In Progress</Field>
|
70
|
-
<Field Name="PhaseRFWStatus">Not Required</Field>
|
71
|
-
<Field Name="PhaseResolveStatus">Required</Field>
|
72
|
-
<Field Name="PhaseCloseStatus">Required</Field>
|
73
|
-
<Field Name="PhaseApprovalsStatus">Not Required</Field>
|
74
|
-
<Field Name="WrkflwCurrentPhase"/>
|
75
|
-
<Field Name="OutsourcedService">FALSE</Field>
|
76
|
-
<Field Name="OutsourcedVendorID"/>
|
77
|
-
<Field Name="OutsourcedVendorName"/>
|
78
|
-
<Field Name="Stat_NumberOfTouches">2</Field>
|
79
|
-
<Field Name="Stat_FirstCallResolution">TRUE</Field>
|
80
|
-
<Field Name="Stat_IncidentEscalated">FALSE</Field>
|
81
|
-
<Field Name="Stat_NumberOfEscalations">0</Field>
|
82
|
-
<Field Name="Stat_24x7ElapsedTime">0</Field>
|
83
|
-
<Field Name="Stat_IncidentReopened">FALSE</Field>
|
84
|
-
<Field Name="Stat_DateTimeResponded">0001-01-01T00:00:00</Field>
|
85
|
-
<Field Name="Stat_ResponseTime">0</Field>
|
86
|
-
<Field Name="Stat_SLAResponseBreached">FALSE</Field>
|
87
|
-
<Field Name="Stat_SLAResolutionBreached">FALSE</Field>
|
88
|
-
<Field Name="Stat_TotalDLHOfIncident">0</Field>
|
89
|
-
<Field Name="Test_embeddedFormPicker"/>
|
90
|
-
<Field Name="LastModByEmail">{{last_mod_by_email}}</Field>
|
91
|
-
<Field Name="Temp_reopen">FALSE</Field>
|
92
|
-
<Field Name="Temp_pending">FALSE</Field>
|
93
|
-
<Field Name="Temp_open">FALSE</Field>
|
94
|
-
<Field Name="Temp_status_set">FALSE</Field>
|
95
|
-
<Field Name="Temp_Active">FALSE</Field>
|
96
|
-
<Field Name="Temp_Accepted">FALSE</Field>
|
97
|
-
<Field Name="Temp_Resolved">FALSE</Field>
|
98
|
-
<Field Name="Temp_Assigned">FALSE</Field>
|
99
|
-
<Field Name="ServiceID">8D71BF81-EBA3-4152-BF34-DDF4931D0A0D</Field>
|
100
|
-
<Field Name="PendingPreviousStatus"/>
|
101
|
-
<Field Name="SelfServiceUrgent"/>
|
102
|
-
<Field Name="SelfServiceMultipleUsers"/>
|
103
|
-
<Field Name="SelfServiceAltContactInfo"/>
|
104
|
-
<Field Name="SelfServiceContactInfoCorrect">FALSE</Field>
|
105
|
-
<Field Name="MatchingText">SHRM Store Conference Setup</Field>
|
106
|
-
<Field Name="Notes"/>
|
107
|
-
<Field Name="NoteEntry"/>
|
108
|
-
<Field Name="AutomateAvailable">FALSE</Field>
|
109
|
-
<Field Name="SLAIDForCustomer"/>
|
110
|
-
<Field Name="SLAIDForService">93aec497070aea63541fae4004988811547a5a70b9</Field>
|
111
|
-
<Field Name="SLAIDForCI"/>
|
112
|
-
<Field Name="LinkedSLAs"> , 93aec497070aea63541fae4004988811547a5a70b9 , </Field>
|
113
|
-
<Field Name="SLANameForCI"/>
|
114
|
-
<Field Name="SLANameForCustomer"/>
|
115
|
-
<Field Name="SLANameForService">Technology Services</Field>
|
116
|
-
<Field Name="TEMP_showSLAStuff">FALSE</Field>
|
117
|
-
<Field Name="VendorName"/>
|
118
|
-
<Field Name="VendorID"/>
|
119
|
-
<Field Name="ReasonForResolveByBreach"/>
|
120
|
-
<Field Name="ConfigItemDisplayName"/>
|
121
|
-
<Field Name="CICritical">FALSE</Field>
|
122
|
-
<Field Name="ResolveByBreachNotes"/>
|
123
|
-
<Field Name="OneStepPicker"/>
|
124
|
-
<Field Name="ShowAllServices">FALSE</Field>
|
125
|
-
<Field Name="ShowContactInformation">FALSE</Field>
|
126
|
-
<Field Name="ServiceEntitlements"/>
|
127
|
-
<Field Name="ServiceCustomerIsEntitled">FALSE</Field>
|
128
|
-
<Field Name="ServiceGroup">{{service_group}}</Field>
|
129
|
-
<Field Name="Environment">PRD</Field>
|
130
|
-
<Field Name="Temp_EscalationTeam">Network and Systems Operations</Field>
|
131
|
-
<Field Name="PriorityGroup">Less Critical</Field>
|
132
|
-
<Field Name="BlockID"/>
|
133
|
-
<Field Name="ApprovalRequired">No</Field>
|
134
|
-
<Field Name="Approved">FALSE</Field>
|
135
|
-
<Field Name="OwnedByNonCherwellUser">FALSE</Field>
|
136
|
-
<Field Name="Temp_SurveyCreated">FALSE</Field>
|
137
|
-
<Field Name="RespondByWarning">2011-10-24T08:12:00</Field>
|
138
|
-
<Field Name="ResolveByWarning">2011-10-27T13:11:52</Field>
|
139
|
-
<Field Name="Stat_SLAResolutionBreachedWarning">FALSE</Field>
|
140
|
-
<Field Name="Stat_SLAResponseBreachedWarning">FALSE</Field>
|
141
|
-
<Field Name="ReasonForRespondByBreach"/>
|
142
|
-
<Field Name="RespondByBreachNotes"/>
|
143
|
-
<Field Name="HRAuthorized">FALSE</Field>
|
144
|
-
<Field Name="CMDBUpdate"/>
|
145
|
-
<Field Name="ServiceOutageStart">0001-01-01T00:00:00</Field>
|
146
|
-
<Field Name="ServiceOutageEnd">0001-01-01T00:00:00</Field>
|
147
|
-
<Field Name="Temp_ServiceGroup">{{service_group}}</Field>
|
148
|
-
<Field Name="ClosureCode"/>
|
149
|
-
<Field Name="Temp_responded"/>
|
150
|
-
<Field Name="TasksExist">FALSE</Field>
|
151
|
-
<Field Name="ResolvedDate">0001-01-01T00:00:00</Field>
|
152
|
-
<Field Name="CustomerDept">Strategy and Architecture</Field>
|
153
|
-
<Field Name="Temp_DefaultTeam">Service Desk</Field>
|
154
|
-
<Field Name="SubcategoryNonHR">{{sub_category_non_hr}}</Field>
|
155
|
-
<Field Name="ParatureTicketID"/>
|
156
|
-
<Field Name="CustomerEmail">{{customer_email}}</Field>
|
157
|
-
<Field Name="JIRAID">{{jira_id}}</Field>
|
158
|
-
</FieldList>
|
159
|
-
<RelationshipList>
|
160
|
-
<!--
|
161
|
-
<Relationship Name="IncidentLinkedToCustomer" TargetObjectName="Customer" Type="Linked">
|
162
|
-
<BusinessObject Name="ADCustomers">Yudkovsky, Sergey</BusinessObject>
|
163
|
-
</Relationship>
|
164
|
-
|
165
|
-
<Relationship Name="IncidentLinkedToCustomer" TargetObjectID="9337c2311b8e8044aa3e2a48c4a95a9f5555815126" TargetObjectName="Customer" Type="Linked">
|
166
|
-
<BusinessObject Name="ADCustomers" RecID="93bddda849f81c4ad9ed8d4e158523372c31f24072">Moelk, Brian</BusinessObject>
|
167
|
-
</Relationship>
|
168
|
-
|
169
|
-
<Relationship Name="Incident Links SLA" TargetObjectID="933c73c2163058a1ca063b4a879ae21e1e5133f57c" TargetObjectName="SLA" Type="Linked">
|
170
|
-
<BusinessObject Name="SLA" RecID="93aec497070aea63541fae4004988811547a5a70b9">Technology Services</BusinessObject>
|
171
|
-
</Relationship>
|
172
|
-
|
173
|
-
<Relationship Name="Incident Has Tasks" TargetObjectID="9355d5ed41e384ff345b014b6cb1c6e748594aea5b" TargetObjectName="Task" Type="Owns">
|
174
|
-
<BusinessObject Name="Task" RecID="93be05329e0fcf411b5e574030a626b90bd297469f"></BusinessObject>
|
175
|
-
</Relationship>
|
176
|
-
|
177
|
-
<Relationship Name="Incident has Service" TargetObjectID="9366b3bb9e94d86b5d5f434ff3b657c4ec5bfa3bb3" TargetObjectName="Service" Type="Linked">
|
178
|
-
<BusinessObject Name="Service" RecID="8D71BF81-EBA3-4152-BF34-DDF4931D0A0D">SHRM Store</BusinessObject>
|
179
|
-
</Relationship>
|
180
|
-
|
181
|
-
<Relationship Name="Incident has Service SLA" TargetObjectID="933c73c2163058a1ca063b4a879ae21e1e5133f57c" TargetObjectName="SLA" Type="Linked">
|
182
|
-
<BusinessObject Name="SLA" RecID="93aec497070aea63541fae4004988811547a5a70b9">Technology Services</BusinessObject>
|
183
|
-
</Relationship>
|
184
|
-
|
185
|
-
<Relationship Name="Incident Links Service Group" TargetObjectID="93ae4fd3af6355802e542349ebafd6deab1dca3cfb" TargetObjectName="ServiceGroup" Type="Linked">
|
186
|
-
<BusinessObject Name="ServiceGroup" RecID="93ae5021c82196035ca3374845956ce9a66eeb08cc">Technology Services</BusinessObject>
|
187
|
-
</Relationship>
|
188
|
-
-->
|
189
|
-
|
190
|
-
<!-- Include this only if there's a related object to link to
|
191
|
-
<Relationship Name="Incident related to other similar incidents" TargetObjectID="6dd53665c0c24cab86870a21cf6434ae" TargetObjectName="Incident" Type="Linked">
|
192
|
-
<BusinessObject Name="Incident" RecID="{{parent_id}}">{{parent_id}}</BusinessObject>
|
193
|
-
</Relationship>
|
194
|
-
-->
|
195
|
-
|
196
|
-
<!-- This chunk including WebsiteForm is required when using Service = "Websites (SHRM)".
|
197
|
-
Unfortunately, it seems to require that the WebsiteForm object be created first.
|
198
|
-
-->
|
199
|
-
<!--
|
200
|
-
<Relationship Name="IncidentHasSpecifics" TargetObjectID="" TargetObjectName="Specifics" Type="Owns">
|
201
|
-
<BusinessObject Name="WebsiteForm" RecID="">
|
202
|
-
<FieldList>
|
203
|
-
<Field Name="RecID"></Field>
|
204
|
-
<Field Name="CreatedDateTime">{{now}}</Field>
|
205
|
-
<Field Name="CreatedBy">Yudkovsky, Sergey</Field>
|
206
|
-
<Field Name="CreatedByID">93b10b33b94d800e69d2294942a6fc764cbfa82940</Field>
|
207
|
-
<Field Name="SpecificTypeID"></Field>
|
208
|
-
<Field Name="SpecificTypeName">Website Form</Field>
|
209
|
-
<Field Name="ParentId">{{parent_id}}</Field>
|
210
|
-
<Field Name="LastModDateTime">{{now}}</Field>
|
211
|
-
<Field Name="LastModBy">Yudkovsky, Sergey</Field>
|
212
|
-
<Field Name="LastModByID">93b10b33b94d800e69d2294942a6fc764cbfa82940</Field>
|
213
|
-
<Field Name="ADCustomersID"/>
|
214
|
-
<Field Name="NeedByDate">0001-01-01T00:00:00</Field>
|
215
|
-
<Field Name="URLInfo">jira.shrm.org</Field>
|
216
|
-
<Field Name="EstimatedTime"/>
|
217
|
-
<Field Name="SprintTime"/>
|
218
|
-
</FieldList>
|
219
|
-
</BusinessObject>
|
220
|
-
</Relationship>
|
221
|
-
-->
|
222
|
-
|
223
|
-
</RelationshipList>
|
224
|
-
</BusinessObject>
|
225
|
-
|
226
|
-
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<BusinessObject Name="JournalNote" RecID="{{rec_id}}">
|
3
|
-
<FieldList>
|
4
|
-
<!-- Fields common to all BusinessObjects -->
|
5
|
-
<Field Name="RecID">{{rec_id}}</Field>
|
6
|
-
<Field Name="CreatedDateTime">{{created_date_time}}</Field>
|
7
|
-
<Field Name="CreatedBy">{{created_by}}</Field>
|
8
|
-
<Field Name="CreatedByID"></Field>
|
9
|
-
<Field Name="LastModDateTime">{{last_mod_date_time}}</Field>
|
10
|
-
<Field Name="LastModBy">{{last_mod_by}}</Field>
|
11
|
-
<Field Name="LastModByID"></Field>
|
12
|
-
<Field Name="OwnedBy">{{owned_by}}</Field>
|
13
|
-
<Field Name="OwnedByTeam">{{owned_by_team}}</Field>
|
14
|
-
<Field Name="OwnerID"></Field>
|
15
|
-
<Field Name="OwnerTeamID"></Field>
|
16
|
-
<!-- Unused fields? -->
|
17
|
-
<Field Name="LastModTimeStamp"/>
|
18
|
-
|
19
|
-
<Field Name="JournalTypeID">{{journal_type_id}}</Field>
|
20
|
-
<Field Name="JournalTypeName">Note</Field>
|
21
|
-
<Field Name="ParentTypeID">{{parent_type_id}}</Field>
|
22
|
-
<Field Name="ParentRecordID">{{parent_record_id}}</Field>
|
23
|
-
<Field Name="Details">{{details}}</Field>
|
24
|
-
<Field Name="Priority">Normal</Field>
|
25
|
-
<Field Name="ShowInSelfService">TRUE</Field>
|
26
|
-
<Field Name="QuickJournal"/>
|
27
|
-
<Field Name="IncomingEmail">FALSE</Field>
|
28
|
-
</FieldList>
|
29
|
-
</BusinessObject>
|
30
|
-
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<BusinessObject Name="Task" RecID="{{rec_id}}">
|
3
|
-
<FieldList>
|
4
|
-
<!-- Fields common to all BusinessObjects -->
|
5
|
-
<Field Name="RecID">{{rec_id}}</Field>
|
6
|
-
<Field Name="CreatedDateTime">{{created_date_time}}</Field>
|
7
|
-
<Field Name="CreatedBy">{{created_by}}</Field>
|
8
|
-
<Field Name="CreatedByID"></Field>
|
9
|
-
<Field Name="LastModDateTime">{{last_mod_date_time}}</Field>
|
10
|
-
<Field Name="LastModBy">{{last_mod_by}}</Field>
|
11
|
-
<Field Name="LastModByID"></Field>
|
12
|
-
<Field Name="OwnedBy">{{owned_by}}</Field>
|
13
|
-
<Field Name="OwnedByTeam">{{owned_by_team}}</Field>
|
14
|
-
<Field Name="OwnerID"></Field>
|
15
|
-
<Field Name="OwnerTeamID"></Field>
|
16
|
-
<!-- Unused fields? -->
|
17
|
-
<Field Name="LastModTimeStamp"/>
|
18
|
-
|
19
|
-
<Field Name="TaskType">Action</Field>
|
20
|
-
<Field Name="TaskDescription">{{task_description}}</Field>
|
21
|
-
<Field Name="StartDateTime">{{start_date_time}}</Field>
|
22
|
-
<Field Name="ParentID">{{parent_id}}</Field>
|
23
|
-
<Field Name="ParentTypeID">{{parent_type_id}}</Field>
|
24
|
-
<Field Name="AssignedToID"></Field>
|
25
|
-
<Field Name="AssignedTo"></Field>
|
26
|
-
<Field Name="AssignedToTeamID"></Field>
|
27
|
-
<Field Name="AssignedToTeam"></Field>
|
28
|
-
<Field Name="Notes">{{notes}}</Field>
|
29
|
-
<Field Name="AcknowledgedByID"></Field>
|
30
|
-
<Field Name="AcknowledgedBy"></Field>
|
31
|
-
<Field Name="AcknowledgedDateTime">0001-01-01T00:00:00</Field>
|
32
|
-
<Field Name="AcknowledgedComment"></Field>
|
33
|
-
<Field Name="ResolvedByID"></Field>
|
34
|
-
<Field Name="ResolvedBy"></Field>
|
35
|
-
<Field Name="ResolvedDateTime">0001-01-01T00:00:00</Field>
|
36
|
-
<Field Name="ResolutionCode">{{resolution_code}}</Field>
|
37
|
-
<Field Name="CompletionDetails">{{completion_details}}</Field>
|
38
|
-
<Field Name="TaskDurationInHours">0.00</Field>
|
39
|
-
<Field Name="Status">{{status}}</Field>
|
40
|
-
<Field Name="Availabiltiy"></Field>
|
41
|
-
<Field Name="Email"></Field>
|
42
|
-
<Field Name="Phone"></Field>
|
43
|
-
<Field Name="CellPhone"></Field>
|
44
|
-
<Field Name="LimitAssigneeByTeam"></Field>
|
45
|
-
<Field Name="ParentTypeName">Incident</Field>
|
46
|
-
<Field Name="ParentPublicID">{{parent_public_id}}</Field>
|
47
|
-
<Field Name="TaskOrder">0.00</Field>
|
48
|
-
<Field Name="ParentActivity"></Field>
|
49
|
-
<Field Name="ActivityOrder">0</Field>
|
50
|
-
<Field Name="ParentActivityOrder">0</Field>
|
51
|
-
<Field Name="DependsOnName"></Field>
|
52
|
-
<Field Name="DependsOnID"></Field>
|
53
|
-
<Field Name="TaskActive">TRUE</Field>
|
54
|
-
<Field Name="DependsOnStatus"></Field>
|
55
|
-
<Field Name="Name"></Field>
|
56
|
-
<Field Name="EndDateTime">{{end_date_time}}</Field>
|
57
|
-
<Field Name="Location"></Field>
|
58
|
-
<Field Name="OwnedByNonCherwellUser">FALSE</Field>
|
59
|
-
<Field Name="TaskID">{{task_id}}</Field>
|
60
|
-
<Field Name="OwnedByEmail">{{owned_by_email}}</Field>
|
61
|
-
<Field Name="TeamNotified">FALSE</Field>
|
62
|
-
<Field Name="ActiveBy"></Field>
|
63
|
-
<Field Name="ActiveByID"></Field>
|
64
|
-
<Field Name="ActiveDateTime">0001-01-01T00:00:00</Field>
|
65
|
-
<Field Name="CreatedByCustomer">FALSE</Field>
|
66
|
-
</FieldList>
|
67
|
-
</BusinessObject>
|