Retrieving Worklog Data
Jira Connector retrieves the worklogs from Jira via the Jira REST API using a chain of queueable Apex jobs. The software retrieves new and updated worklogs first. After that, it retrieves the deleted worklogs and deletes the corresponding records in Salesforce as well.
You can control the worklog retrieval manually or using a scheduled job.
Upon execution, you can monitor the status of the queueable jobs via the Apex job queue. To do so, look for the Apex classes UpsertWorklogManager and DeleteWorklogManager.
The user who has triggered the refresh receives an email upon completion. The email includes statistics about the refreshed worklogs and periods, and, if applicable, also error messages.
Manually Retrieving Worklogs
You can manually retrieve or refresh worklog from the Worklogs list view.
-
Open the Worklogs tab, and select the list view
All
.The list view
Recently Viewed
does not display the Refresh button. -
Click Refresh.
- Select the intended Jira connection.
-
Specify a start date.
- Leaving the start date empty retrieves all worklogs.
- Setting a start date in the past retrieves the worklogs starting from this date.
-
Click Start.
This starts the worklog retrieval.
Scheduling Worklog Retrieval
You can set up a job in order to have worklogs automatically retrieved on a regular basis.
To schedule the worklog retrieval, you can use either Salesforce's Schedule Apex functionality or the Salesforce Developer Console. For details, see Scheduling a Job.
Via Salesforce's Schedule Apex functionality:
-
Click to enter Setup, then open Apex Classes.
In Salesforce Lightning, navigate to Custom Code > Apex Classes.
In Salesforce Classic, navigate to Develop > Apex Classes.
-
Click Schedule Apex on top of the list.
-
Specify the details as required.
- Job Name: The name of the Jira connection setting (see Defining Jira Connection Setting)
- Apex Class:
ScheduledRefreshWorklogs
- Frequency:
Weekly
orMonthly
(with an according weekday or day of month setting) - Start
- End
- Preferred Start Time
-
Click Save.
This sets up the worklog retrieval to be executed at the specified time.
Via the Salesforce Developer Console:
-
Open the Developer Console.
For details, see Open the Developer Console in the Salesforce Help.
-
Execute the following code
JOJC1__ScheduledRefreshWorklogs.setupSchedule(name, schedule);
where
name
is the name of the Jira connection setting (see Defining Jira Connection Setting) andschedule
is a cron expression.This sets up the worklog retrieval to be executed at the specified time.
For more details about job scheduling, see Scheduling a Job in the JustOn documentation and Schedule Apex in the Salesforce Help.