Commit 8aecc60f authored by Walmyr Lima's avatar Walmyr Lima

Update project milestone resource

Update project milestone resource with new attributes and the
ability to fabricate a milestone with or without start and due
date.
parent 63f8406b
...@@ -4,7 +4,10 @@ module QA ...@@ -4,7 +4,10 @@ module QA
module EE module EE
module Resource module Resource
class ProjectMilestone < QA::Resource::Base class ProjectMilestone < QA::Resource::Base
attr_writer :start_date, :due_date
attribute :id attribute :id
attribute :iid
attribute :title attribute :title
attribute :project do attribute :project do
...@@ -30,7 +33,10 @@ module QA ...@@ -30,7 +33,10 @@ module QA
def api_post_body def api_post_body
{ {
title: title title: title
} }.tap do |hash|
hash[:start_date] = @start_date if @start_date
hash[:due_date] = @due_date if @due_date
end
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment