lib/tracker_api/resources/story.rb in tracker_api-1.12.0 vs lib/tracker_api/resources/story.rb in tracker_api-1.13.0

- old
+ new

@@ -99,11 +99,11 @@ # Adds a new owner to the story. # # @param [Person|Fixnum] owner def add_owner(owner) - owner_id = if owner.kind_of?(Fixnum) + owner_id = if owner.kind_of?(Integer) owner_id = owner else raise ArgumentError, 'Valid Person expected.' unless owner.instance_of?(Resources::Person) owner_id = owner.id end @@ -130,11 +130,11 @@ # @return [Array[Comment]] def comments(reload: false) if !reload && @comments.present? @comments else - @comments = Endpoints::Comments.new(client).get(project_id, id) + @comments = Endpoints::Comments.new(client).get(project_id, story_id: id) end end # Provides a list of all the tasks on the story. # @@ -191,10 +191,10 @@ # @param [Hash] params attributes to create the comment with # @return [Comment] newly created Comment def create_comment(params) files = params.delete(:files) - comment = Endpoints::Comment.new(client).create(project_id, id, params) + comment = Endpoints::Comment.new(client).create(project_id, story_id: id, params: params) comment.create_attachments(files: files) if files.present? comment end # Save changes to an existing Story.