'Add a new worklog entry on an issue and return a Resource for it.
:param issue: the issue to add the worklog to
:param timeSpent: a worklog entry with this amount of time spent, e.g. "2d"
:param adjustEstimate: (optional) allows the user to provide specific instructions to update the remaining
time estimate of the issue. The value can either be ``new``, ``leave``, ``manual`` or ``auto`` (default).
:param newEstimate: the new value for the remaining estimate field. e.g. "2d"
:param reduceBy: the amount to reduce the remaining estimate by e.g. "2d"
:param started: Moment when the work is logged, if not specified will default to now
:param comment: optional worklog comment'

@translate_resource_args
def add_worklog(self, issue, timeSpent=None, timeSpentSeconds=None, adjustEstimate=None, newEstimate=None, reduceBy=None, comment=None, started=None, user=None):

    params = {}
    if (adjustEstimate is not None):
        params[u'adjustEstimate'] = adjustEstimate
    if (newEstimate is not None):
        params[u'newEstimate'] = newEstimate
    if (reduceBy is not None):
        params[u'reduceBy'] = reduceBy
    data = {}
    if (timeSpent is not None):
        data[u'timeSpent'] = timeSpent
    if (timeSpentSeconds is not None):
        data[u'timeSpentSeconds'] = timeSpentSeconds
    if (comment is not None):
        data[u'comment'] = comment
    elif user:
        data[u'comment'] = user
    if (started is not None):
        data[u'started'] = started.strftime(u'%Y-%m-%dT%H:%M:%S.000%z')
    if (user is not None):
        data[u'author'] = {u'name': user, u'self': ((self.JIRA_BASE_URL + u'/rest/api/latest/user?username=') + user), u'displayName': user, u'active': False}
        data[u'updateAuthor'] = data[u'author']
    url = self._get_url(u'issue/{0}/worklog'.format(issue))
    r = self._session.post(url, params=params, data=json.dumps(data))
    return Worklog(self._options, self._session, json_loads(r))
