diff --git a/docs/resources/time_entry.rst b/docs/resources/time_entry.rst index 971e4db..5a51179 100644 --- a/docs/resources/time_entry.rst +++ b/docs/resources/time_entry.rst @@ -23,8 +23,9 @@ create Creates new time entry resource with given fields and saves it to the Redmine. :param integer issue_id or project_id: (required). The issue id or project id to log time on. - :param integer hours: (required). The number of spent hours. + :param hours: (required). The number of spent hours. :param spent_on: (optional). The date the time was spent (current date if not set). + :type hours: int or float :type spent_on: string or date object :param integer activity_id: (optional). The id of the time activity. This parameter is required unless a default activity is defined in Redmine. @@ -33,7 +34,7 @@ create .. code-block:: python - >>> time_entry = redmine.time_entry.create(issue_id=123, spent_on='2014-01-14', hours=3, activity_id=10, comments='hello') + >>> time_entry = redmine.time_entry.create(issue_id=123, spent_on='2014-01-14', hours=3.5, activity_id=10, comments='hello') >>> time_entry @@ -55,7 +56,7 @@ new >>> time_entry = redmine.time_entry.new() >>> time_entry.issue_id = 123 >>> time_entry.spent_on = date(2014, 1, 14) - >>> time_entry.hours = 3 + >>> time_entry.hours = 3.5 >>> time_entry.activity_id = 10 >>> time_entry.comments = 'hello' >>> time_entry.save() @@ -157,8 +158,9 @@ update :param integer resource_id: (required). Time entry id. :param integer issue_id or project_id: (optional). The issue id or project id to log time on. - :param integer hours: (optional). The number of spent hours. + :param hours: (optional). The number of spent hours. :param spent_on: (optional). The date the time was spent. + :type hours: int or float :type spent_on: string or date object :param integer activity_id: (optional). The id of the time activity. :param string comments: (optional). Short description for the entry (255 characters max). @@ -166,7 +168,7 @@ update .. code-block:: python - >>> redmine.time_entry.update(1, issue_id=123, spent_on='2014-01-14', hours=3, activity_id=10, comments='hello') + >>> redmine.time_entry.update(1, issue_id=123, spent_on='2014-01-14', hours=3.5, activity_id=10, comments='hello') True save @@ -186,7 +188,7 @@ save >>> time_entry = redmine.time_entry.get(1) >>> time_entry.issue_id = 123 >>> time_entry.spent_on = date(2014, 1, 14) - >>> time_entry.hours = 3 + >>> time_entry.hours = 3.5 >>> time_entry.activity_id = 10 >>> time_entry.comments = 'hello' >>> time_entry.save()