Synchronizing Jira Work Logs to PSA Task Time Records

Jira work logs are also automatically synced with PSA task time records if you enabled the Sync Work Logs from Jira to Timecards in PSA workflow via the Integration Hub Connector: Jira - PSA feature, along with one of the following:

  • The Sync Issues from Jira to Project Tasks in PSA workflow.
  • The Sync Project Tasks from PSA to Issues in Jira workflow.

For a work log to be synced to a task time record, all of the following must be true:

  • The Jira user logging time must have a linked resource in PSA.
  • The Jira issue must be of a predefined type.
  • The Jira issue that the time is logged against must be linked to a PSA project task or must be a child of an issue that is linked to a PSA project task.
  • The project task linked to the Jira issue that time is logged against cannot have child project tasks in PSA. This is because PSA doesn't allow logging time against summary or parent tasks. Time logged against child project tasks automatically rolls up from the lowest-level task to the higher-level tasks.
  • The Jira issue that the time is logged against must belong to a project that has a linked project in PSA. If you are syncing projects to issues, the issue that the time is logged against must be a child issue of the issue linked to the PSA project.
  • The resource and project in PSA must be linked via only one assignment with the Use for Syncing Time from Jira field selected for the given time frame, or the project must have the Allow Timecards Without Assignment field selected.

When a user logs time against a Jira issue, a new timecard is created in PSA for the week of the Date Started value in Jira. The timecard's start date is calculated from the Week Start Day field of the work calendar linked to the resource. Similarly, the end date is set to the last day of the week. For example, if a user logs work on Monday, January 2, and their work calendar's week start day is Sunday, the timecard created in PSA has January 1 set as the start date and January 7 as the end date. If a timecard already exists for the week, it is updated accordingly.

Note: A user can log time against a Jira issue and have multiple timecards created in PSA each day until the last day of that week. For example, a user logs work on Monday, May 31, which is the last day of the month, and their timecard is approved. If they enter a new work log for Tuesday a new timecard is created.
Note:

If a work calendar isn't specified for the resource linked to the user who logs time, the connector uses the value defined in the Week Start Day field in the Timecard Entry UI Global custom setting to calculate the task time record's start date.

Time is logged for the day specified in the Date Started field on the work log, up to the maximum hours for that day as defined in the resource's work calendar. If a user logs excessive hours for a single day, the work log is not synced. In that case, the user must change the work log in Jira.

The connector only allows logging hours for working days, as defined in the resource's work calendar. Days that have zero hours defined in the work calendar are considered non-working. If a user logs time for a non-working day, the work log is not synced. In that case, the user must change the work log in Jira.

Notes:
  • If a work calendar isn't specified for the resource linked to the user who logs time, the connector uses the value of the Max Resource Hours Per Day field to log hours for each day. Similarly, the value of the Max Resource Days Per Week field is used to determine which days are considered as non-working and are ignored. Both fields are defined on the Integration Hub Connector: Jira - PSA custom setting.
  • A user might log time against multiple issues that are linked to different PSA project tasks for the same week. If this results in exceeding the maximum hours for the week overall, the related timecard cannot be updated. Therefore, the task time record is also not created or updated.
  • Only the date of the Jira work log Date Started value is used for syncing. The time from the Date Started value is ignored.

The Work Description from Jira is added as a note for each day the time is logged for, along with the key of the Jira issue that the work was logged against and the ID of the work log.

Notes:
  • The daily note fields, for example Monday Notes, have a limit of 255 characters. If a work log description results in a daily note being longer than the limit, time is not logged in PSA. To prevent this, you can map the description to custom long text fields for each day. For more information, see Example 2 - Map Work Log Description to Custom Notes.
  • If the work log description in Jira contains formatted text, it is stored in Markdown format in Jira. When this is synced with PSA, the Markdown syntax is retained. As a result, you might see plain text with Markdown syntax characters in PSA.

If a work log that is already synced to a task time record is updated or deleted in Jira, the changes are automatically propagated to PSA. This only applies if all of the following are true:

  • The related timecard is editable, for example, its related project or milestone is not closed for time entry.
  • The related timecard is in one of the statuses defined in the Timecard Edit Status Values field in the Timecard Entry UI Global custom setting.

When a work log is updated, time is distributed in the task time record in the same way as described above. Changes to the description of the work log are also reflected in PSA.

If a work log's Date Started is changed in Jira to another week, the relevant time and note are removed from the original task time record in PSA and moved to a new one. After a work log is updated or deleted, if a task time record no longer contains any logged hours, it is automatically deleted from PSA.

Note:

To keep task time records up to date, the connector creates and maintains a copy of each synced Jira work log in PSA as a record of the Jira Work Log object in your org. You must not manually create, edit, or delete these records.

If an error occurs when syncing work logs to timecards, an email notification is sent to the PSA resource linked to the Jira user who logged the time. If the Email field for the resource is blank in PSA, the notification is sent to the user specified in the Integration Hub Connector: Jira - PSA custom setting. Email notifications are also sent if a work log exceeds the daily or weekly time limit.

When an error occurs, a Foundations message is also created with the publisher name PSA/IHCIntegration.Jira. For more information, see Viewing Integration Hub Connector: Jira - PSA Error Messages.

Examples for the Sync Project Tasks from PSA to Issues in Jira Workflow

Depending on the issue type work is logged against, time might be added to different project task records, if any. Several examples are illustrated below.

In the examples, we assume that you have the standard issue types in your Jira application (Epic, Story, Task, Bug, Sub-task) and a custom Development sub-task issue type. We also assume that you have chosen to create task time records for tasks, development sub-tasks, and sub-tasks.

In PSA, you might have the following structure that is reflected in Jira like so:

PSA

Jira

Level 1 

Level 2

Level 3

Issue

Child Issue

Sub-tasks

Project Task 1     Epic 1    
Project Task 1.1   Story 1  
Project Task 1.1.1 Development Sub-task 1
Project Task 1.1.2 Sub-task 1
Project Task 1.2   Task 1  
Project Task 1.3   Task 2  
Project Task 1.3.1 Sub-task 2
Here is how the work logged in Jira is synced to PSA task time records:

Work Logged in Jira on

Task Time Created or Updated in PSA

Epic 1 No task time record - time is reflected only on the timecard
Story 1 No task time record - time is reflected only on the timecard
Development Sub-task 1 For Project Task 1.1.1
Sub-task 1 For Project Task 1.1.2
Task 1 For Project Task 1.2
Task 2 Time is not synced to PSA. An error email is sent because time cannot be logged against a summary task.
Sub-task 2 For Project Task 1.3.1
Note:

In all of the examples above, time is also added to the appropriate timecard. The only exception is Task 2 where time cannot be synced.

Examples for the Sync Issues from Jira to Project Tasks in PSA Workflow

Depending on the issue type work is logged against, time might be added to different project task records, if any. Several examples are illustrated below.

In the examples, we assume that you have the standard issue types in your Jira application (Epic, Story, Task, Bug, Sub-task) and a custom Development sub-task issue type. We also assume that you have chosen to sync epics, stories, and development sub-tasks to PSA project tasks.

In Jira, you might have the following issue structure:

Issue

Sub-tasks

Child Issue

Child Issue Sub-tasks

Epic 1

Sub-task 1

 

 
Development Sub-task 1    
  Story 1

Sub-task 2

Development Sub-task 2
Task 1 Sub-task 3
Bug 1

Sub-task 4

   
Development Sub-task 3    
Development Sub-task 4    

Based on the assumed configuration, the following Jira issues are synced with PSA project tasks:

  • Epic 1
  • Story 1
  • Development Sub-task 1
  • Development Sub-task 2
  • Development Sub-task 3
  • Development Sub-task 4
Here is how the work logged in Jira is synced to PSA task time records:

Work Logged in Jira on

Task Time Created or Updated in PSA

Epic 1 For project task linked to Epic 1
Sub-task 1 For project task linked to Epic 1
Development Sub-task 1 For project task linked to Development Sub-task 1
Story 1 For project task linked to Story 1
Sub-task 2 For project task linked to Story 1
Development Sub-task 2 For project task linked to Development Sub-task 2
Task 1 For project task linked to Epic 1
Sub-task 3 For project task linked to Epic 1
Bug 1 No task time record - time is reflected only on the timecard
Sub-task 4 No task time record - time is reflected only on the timecard
Development Sub-task 3 For project task linked to Development Sub-task 3
Development Sub-task 4 For project task linked to Development Sub-task 4
Note:

In all of the examples above, time is also added to the appropriate timecard.