Log Work for another Jira User Documentation


Introduction


Keep you company time tracking up to date with Log Work for Another User Jira Addon

Log Work #back to top

  • Step 1 - Open existing or create new Jira issue.
  • Step 2 - Click "More" button.











  • Step 3 - Click "Log Work as User" button.















  • Step 4 - Fill required fields
    • User - Select a user for whom you want to log work
  • Step 5 - Fill all standard fields.
  • Step 6 - Click Submit.

Configure Permissions#back to top

  • Step 1 - Go to the "Settings" -> "Manage Apps".
  • Step 2 - Click "Configuration" tab on the left panel in the "Log Work As User" section













  • Step 3 - Configure Permission
    • Enable for all users - Check if you want to enable the possibility to log work as another user for all Jira Users
    • Users - specify Jira users that should have possibility to log work as another user
    • Groups - specify Groups users from which should have possibility to log work as another user
    • Roles - users that have specified roles should have possibility to log work as another user

REST API#back to top

POST to http://localhost:2990/jira/rest/log-as-user/1.0/logwork
  • {
    • "user": string,
    • "timeSpent": string,
    • "date": string,
    • "adjustEstimate": string,
    • "adjustEstimateValue": string,
    • "comment": string,
    • "commentRoleVisibilityLevel": string,
    • "issueKey": string
  • }
  • user (Required): Username of user to log work (eg. adminUser).
  • timeSpent (Required): The amount of time logged working on the issue so far or while performing this JIRA operation (eg. 3w 4d 12h 30m).
  • date (Optional): Worklog date (eg. 2020-10-10'T'12:00:00+02:00 or 2020-10-10'T'12:00:00'Z').
  • adjustEstimate (Optional): allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values:
    • new - Sets the estimate to a specific value
    • leave - Leaves the estimate as is
    • manual - Cpecify a specific amount to increase remaining estimate by
    • auto - Default option. Will automatically adjust the value based on the new timeSpent specified on the worklog
  • adjustEstimateValue (Required if adjustEstimate is setto/reduceby): The amount of time to adjust or to subtract (eg. 3w 4d 12h 30m)..
  • comment (Optional): Work Description.
  • commentRoleVisibilityLevel (Optional): This option is used to restrict the visibility of comments to a project role (eg. developers)
  • issueKey (Required): Issue key NP-100.

Script Runner Integration#back to top

  • Example of usage

  • @PluginModule
  • ReinwokWorklogForUserService reinwokWorklogForUserService;
  • /**
  • *
  • * @param currentUser (com.atlassian.jira.user.ApplicationUser - currently logged in user)
  • * @param logForUserName (java.lang.String - username)
  • * @param timeSpent (java.lang.String - (eg. 3w 4d 12h 30m))
  • * @param date (java.lang.String - Worklog date string will be parse based on the selected dateTimeStyle.)
  • * @param adjustEstimate (java.lang.String - (new/leave/manual/auto) allows you to provide specific instructions to update the remaining time estimate of the issue.)
  • * @param adjustEstimateValue (java.lang.String - the amount of time to adjust or to subtract (eg. 3w 4d 12h 30m)..)
  • * @param comment (java.lang.String - work description)
  • * @param roleLevelId (java.lang.Long - id of selected comment role visibility level)
  • * @param issueKey (java.lang.String - TST-10)
  • * @param dateTimeStyle (com.atlassian.jira.datetime.DateTimeStyle - style of date attribute)
  • *
  • * logWork(final ApplicationUser currentUser, String logForUserName, String timeSpent, String date, String adjustEstimate, String adjustEstimateValue, final String comment, final Long roleLevelId, final String issueKey, final DateTimeStyle dateTimeStyle);
  • *
  • */

  • //Example:
  • reinwokWorklogForUserService.logWork(currentUser, logForUserName, timeSpent, date, adjustEstimate, adjustEstimateValue, comment, roleLevelId, issueKey, dateTimeStyle)