lib/hcl/day_entry.rb in zenhob-hcl-0.2.2 vs lib/hcl/day_entry.rb in zenhob-hcl-0.2.3

- old
+ new

@@ -21,21 +21,20 @@ doc.root.elements.collect('//day_entry') do |day| new xml_to_hash(day) end end + def notes + super || @data[:notes] = '' + end + # Append a string to the notes for this task. def append_note new_notes # If I don't include hours it gets reset. # This doens't appear to be the case for task and project. - if notes.nil? - notes = new_notes - else - notes << " #{new_notes}" - end DayEntry.post("daily/update/#{id}", <<-EOD) <request> - <notes>#{notes}</notes> + <notes>#{notes << " #{new_notes}"}</notes> <hours>#{hours}</hours> </request> EOD end