https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-11-07T14:35:43ZRedmineRedmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=222152010-11-07T14:35:43ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Category</strong> set to <i>REST API</i></li></ul> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=222572010-11-09T13:16:46ZVladimir Menshakov
<ul></ul><p>any chance to have it? :(</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=222622010-11-09T18:13:49ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I think it won't be part of 1.1 but this is a must have.</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=229692010-12-03T16:25:49ZYohann Monnier
<ul></ul><p>I think so !</p>
<p>I really need it, even if it just add a time entry and nothing more.</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=229812010-12-03T21:43:13ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Target version</strong> set to <i>1.1.0</i></li></ul> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=229862010-12-04T10:05:21ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Added in <a class="changeset" title="Adds REST API for TimeEntries (#6823)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4461">r4461</a>.</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=230512010-12-06T17:15:22ZYohann Monnier
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>I have a problem using it :</p>
<p>Class with activeresource<br /><pre>
# Timelog model rbot side
class ::TimeEntry < ::ActiveResource::Base
self.element_name = 'time_entry'
self.collection_name = 'time_entries'
self.proxy = ''
self.timeout = 5
end
</pre></p>
<p>Code calling it<br /><pre>
::TimeEntry.site ="http://myredmine"
::TimeEntry.user = "myuser"
::TimeEntry.password = "mypass"
newtimelog = TimeEntry.new(:issue_id => 7, :comments => "up", :activity_id =>9, :hours => "3h30")
if newtimelog.save
m.reply "it's ok"
else
m.reply "it failed"
end
</pre></p>
<p>I get an error on this line : "if newtimelog.save" <br /><pre>
undefined method `path' for nil:NilClass
["/usr/lib/ruby/1.8/active_resource/base.rb:410:in `prefix'", "/usr/lib/ruby/1.8/active_resource/base.rb:420:in `prefix_source'", "/usr/lib/ruby/1.8/active_resource/base.rb:684:in `prefix_parameters'", "/usr/lib/ruby/1.8/active_resource/base.rb:699:in `split_options'", "/usr/lib/ruby/1.8/active_resource/base.rb:697:in `each'", "/usr/lib/ruby/1.8/active_resource/base.rb:697:in `split_options'", "/usr/lib/ruby/1.8/active_resource/base.rb:1141:in
...
</pre></p>
<p>The new updated method for Issue use the same kind of routes and work very well.</p>
<p>I think i'm right on the way to use it, but i may be wrong and it could come from my code..</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=230652010-12-07T20:10:22ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>I can not reproduce this problem and it happens on the client side.<br />The following code works just fine:</p>
<pre>
class TimeEntry < ActiveResource::Base
self.site = 'http://localhost:3000'
self.user = 'xxx'
self.password = 'xxxxxx'
end
time = TimeEntry.new(:issue_id => 1, :hours => 2.3, :activity_id => 8, :spent_on => Date.today)
if time.save
puts time.id
else
pp time.errors
end
</pre>
<p>Please open another ticket if there is someting wrong with the API.</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=263502011-03-13T20:06:52ZAnonymous
<ul></ul><p>Can you with this api get time entries for specific day (today, yesterday, 2011-02-01), month (this, last) or between range of dates?</p> Redmine - Feature #6823: REST API for time tracker.https://www.redmine.org/issues/6823?journal_id=263512011-03-13T20:14:55ZAnonymous
<ul></ul><p>Never mind - you can, just use from and to parameters.</p>