lib/pivotal-tracker/story.rb in pivotal-tracker-0.3.0 vs lib/pivotal-tracker/story.rb in pivotal-tracker-0.3.1
- old
+ new
@@ -39,10 +39,11 @@
element :labels, String
element :jira_id, Integer
element :jira_url, String
element :other_id, Integer
element :integration_id, Integer
+ element :deadline, DateTime # Only available for Release stories
has_many :attachments, Attachment, :tag => 'attachments'
def initialize(attributes={})
if attributes[:owner]
@@ -126,17 +127,22 @@
# xml.jira_url "#{jira_url}"
xml.other_id "#{other_id}"
xml.integration_id "#{integration_id}"
xml.created_at DateTime.parse(created_at.to_s).to_s if created_at
xml.accepted_at DateTime.parse(accepted_at.to_s).to_s if accepted_at
+ xml.deadline DateTime.parse(deadline.to_s).to_s if deadline
}
end
return builder.to_xml
end
def update_attributes(attrs)
attrs.each do |key, value|
self.send("#{key}=", value.is_a?(Array) ? value.join(',') : value )
end
end
+ end
+
+ class Story
+ include Validation
end
end