This resource represents time tracking and time tracking providers. Use it to get and set the time tracking provider, get and set the time tracking options, and disable time tracking.
Returns the time tracking provider that is currently selected. Note that if time tracking is disabled, then a successful but empty response is returned.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:issue.time-tracking:jira
Connect app scope required: READ
This request has no parameters.
Returned if the request is successful and time tracking is enabled.
Details about the time tracking provider.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/configuration/timetracking`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
{
"key": "Jira",
"name": "JIRA provided time tracking",
"url": "/example/config/url"
}
Selects a time tracking provider.
Permissions required: Administer Jira global permission.
manage:jira-configuration
write:issue.time-tracking:jira
Connect app scope required: ADMIN
string
Requiredstring
Returned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"key": "Jira"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/configuration/timetracking`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returns all time tracking providers. By default, Jira only has one time tracking provider: JIRA provided time tracking. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the Time Tracking Provider module.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:issue.time-tracking:jira
Connect app scope required: READ
This request has no parameters.
Returned if the request is successful.
array<TimeTrackingProvider>
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/configuration/timetracking/list`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
[
{
"key": "Jira",
"name": "JIRA provided time tracking",
"url": "/example/config/url"
}
]
Returns the time tracking settings. This includes settings such as the time format, default time unit, and others. For more information, see Configuring time tracking.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:issue.time-tracking:jira
Connect app scope required: READ
This request has no parameters.
Returned if the request is successful.
Details of the time tracking configuration.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/configuration/timetracking/options`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
{
"defaultUnit": "hour",
"timeFormat": "pretty",
"workingDaysPerWeek": 5.5,
"workingHoursPerDay": 7.6
}
Sets the time tracking settings.
Permissions required: Administer Jira global permission.
manage:jira-configuration
write:issue.time-tracking:jira
, read:issue.time-tracking:jira
Connect app scope required: ADMIN
string
Requiredstring
Requirednumber
Requirednumber
RequiredReturned if the request is successful.
Details of the time tracking configuration.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"defaultUnit": "hour",
"timeFormat": "pretty",
"workingDaysPerWeek": 5.5,
"workingHoursPerDay": 7.6
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/configuration/timetracking/options`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
{
"defaultUnit": "hour",
"timeFormat": "pretty",
"workingDaysPerWeek": 5.5,
"workingHoursPerDay": 7.6
}
Rate this page: