/
[REST 1.1] Configuration

[REST 1.1] Configuration

Methods:

POST

Triggers recalculation of recurring vacations.

Permissions: ADMIN USER SUPERVISOR HR

POST {jira_baseurl}/rest/vacation-manager/1.0/configuration/refresh-recurring-vacation-definitions

PUT

Update general config

Updates and returns general configuration.

Permissions: ADMIN USER SUPERVISOR HR

PUT {jira_baseurl}/rest/vacation-manager/1.0/configuration/general

Responses: 200 400 500

JSON body fields

Name

Type

Description

Name

Type

Description

automaticSummary

Boolean

true - summary for new vacation documents will be filled automatically

false - users will have to provide summary for vacation documents

automaticSummaryTexts

Map<PeriodType, String>

Automatic summary texts that will be used to fill summary for new vacation documents. Each request period type has to have corresponding summary text

jobTime

Integer

Number representing full hour to run job recalculating recurring vacation (job is run everyday)

showUserPickerWarning

Boolean

true - show warning near user picker fields when user is currently out on vacation or will be in near future

false - hide warning

userPickerTexts

Map<UserPickerLeaveMessageType, String>

User picker warning texts that show up when user is on vacation or when user vacation is near.

daysBeforeLeaveWarning

Integer

Number of days before user leave that user picker warning about upcoming absence will be visible

allowUsersToViewStatistics

Boolean

true - users will be able to view their teammates vacations

false - users will be able to view only their vacations

worklogHoursPerDayType

WorklogHoursPerDayType

JIRA_TIMETRACKING - hours per day for worklog will be fetched from default Jira worklog timetracking configuration

VACMAN_WORKWEEK_SCHEME - hours per day will be fetched from Vacation Manager workweek scheme for given user

PeriodType

Name

Type

Description

Name

Type

Description

DAILY

Enum

Daily period type

HALF_DAILY

Enum

Half daily period type

HOURLY

Enum

Hourly period type

WorklogHoursPerDayType

Name

Type

Description

Name

Type

Description

JIRA_TIMETRACKING

Enum

Hours per day for worklog will be fetched from default Jira worklog timetracking configuration

VACMAN_WORKWEEK_SCHEME

Enum

Hours per day will be fetched from Vacation Manager workweek scheme for given user

UserPickerLeaveMessageType

Name

Type

Description

Name

Type

Description

VACATION_ON_LEAVE

Enum

Message type when user is currently on vacations

VACATION_UPCOMING_LEAVE

Enum

Message type when user vacation are near

HOLIDAY_ON_LEAVE

Enum

Message type when currently is holiday

HOLIDAY_UPCOMING_LEAVE

Enum

Message type when holiday is near

Path
PUT {jira_baseurl}/rest/vacation-manager/1.0/configuration/general
Body
{ "automaticSummary": true, "automaticSummaryTexts": { "DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, ${vacationDays} days", "HALF_DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, half of the day (${vacationHalfOfDay})", "HOURLY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, from ${vacationStartTime} to ${vacationEndTime} (${vacationHours}h ${vacationMinutes}m)" }, "jobTime": 0, "showUserPickerWarning": true, "userPickerTexts":{ "VACATION_ON_LEAVE": "On leave until ${endDate}", "VACATION_UPCOMING_LEAVE": "Upcoming leave ${timeToStartOfLeaveLabel} (${startDate} - ${endDate})", "HOLIDAY_ON_LEAVE": "On holiday leave ${description}:${date}", "HOLIDAY_UPCOMING_LEAVE": "Upcoming holiday leave ${description}:${date}" }, "jobLastFireTime": 1613084400000, "daysBeforeLeaveWarning": 7, "allowUsersToViewStatistics": false, "worklogHoursPerDayType": "JIRA_TIMETRACKING", "hideUnusedVacationTypes": false, "defaultValuesJobTime": 0, "defaultValuesJobLastRunDate": 1613084400000, "intervalInMinutesPicker": 30, "showUserPickerWarningHoliday": false, "showUserPickerWarningMultipleAbsences": false, "ongoingAbsenceWarningColor": "#FF0000", "upcomingAbsenceWarningColor": "#FFA500", "automaticSummaryTimeZone": "JIRA_TIME_ZONE", "userPickerTimeZone": "JIRA_TIME_ZONE", "allowHrChangeStatisticsVisible": false, "showInactiveUsers": true, "showUserPickerWarningForAnonymous": false }
Response
{ "id": 1, "done": true, "project": { "id": 10100, "key": "VM", "name": "Vacation Manage" }, "jobTime": 0, "jobLastFireTime": "2021-02-12", "showUserPickerWarning": true, "showUserPickerWarningHoliday": false, "ongoingAbsenceWarningColor": "#FF0000", "upcomingAbsenceWarningColor": "#FFA500", "showUserPickerWarningMultipleAbsences": false, "daysBeforeLeaveWarning": 7, "automaticSummary": true, "automaticSummaryTexts": { "DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, ${vacationDays} days", "HALF_DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, half of the day (${vacationHalfOfDay})", "HOURLY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, from ${vacationStartTime} to ${vacationEndTime} (${vacationHours}h ${vacationMinutes}m)" }, "allowHrChangeStatisticsVisible": false, "allowUsersToViewStatistics": false, "userPickerTexts": { "VACATION_ON_LEAVE": "On leave until ${endDate}", "VACATION_UPCOMING_LEAVE": "Upcoming leave ${timeToStartOfLeaveLabel} (${startDate} - ${endDate})", "HOLIDAY_ON_LEAVE": "On holiday leave ${description}:${date}", "HOLIDAY_UPCOMING_LEAVE": "Upcoming holiday leave ${description}:${date}" }, "worklogHoursPerDayType": "JIRA_TIMETRACKING", "defaultValuesJobTime": 0, "intervalInMinutesPicker": 30, "automaticSummaryTimeZone": "JIRA_TIME_ZONE", "userPickerTimeZone": "JIRA_TIME_ZONE", "showInactiveUsers": true, "showUserPickerWarningForAnonymous": false, "hideUnusedVacationTypes": false, "defaultValuesJobLastRunDate": "2021-02-12" }

Update groups configuration

Permissions: ADMIN USER SUPERVISOR 

PUT {jira_baseurl}/rest/vacation-manager/1.0/configuration/groups

Responses: 204 400 500

JSON body fields

Name

Type

Description

Name

Type

Description

hrGroupName

String

Name of Jira group that will be used as HR in VacMan

createSchemes

Boolean

true - creates and assigns new Security and Permission Schemes for Vacation Manager project. Old schemes will be left intact

false - no new schemes are created

Path
PUT {jira_baseurl}/rest/vacation-manager/1.0/configuration/groups
Body
{ "hrGroupName": "hr-users", "createSchemes": true }

Update fields configuration.

Permissions: ADMIN USER SUPERVISOR HR

PUT {jira_baseurl}/rest/vacation-manager/1.0/configuration/fields

Responses: 204 400 500

JSON body fields

Name

Type

Description

Name

Type

Description

chartCustomFieldId

Long

Id of custom field to set as chart

periodTypeCustomFieldId

Long

Id of custom field to set as period type

startDateCustomFieldId

Long

Id of custom field to set as start date

startDateTimeCustomFieldId

Long

Id of custom field to set as start date time

endDateCustomFieldId

Long

Id of custom field to set as end date

endTimeMinutesCustomFieldId

Long

Id of custom field to set as time period picker

halfDayCustomFieldId

Long

Id of custom field to set as half of day

supervisorCustomFieldId

Long

Id of custom field to set as supervisor

substituteCustomFieldId

Long

Id of custom field to set as substitute person

usedVacationDaysCustomFieldId

Long

Id of custom field to set as used vacation days

usedVacationMinutesCustomFieldId

Long

Id of custom field to set as used vacation minutes

migrateData

Boolean

true - copies data from old to new fields in all vacation documents

false - no data is copied

Path
PUT {jira_baseurl}/rest/vacation-manager/1.0/configuration/fields
Body
{ "chartCustomFieldId": 10000, "periodTypeCustomFieldId": 10001, "startDateCustomFieldId": 10002, "startDateTimeCustomFieldId": 10003, "endDateCustomFieldId": 10004, "endTimeMinutesCustomFieldId": 10005, "halfDayCustomFieldId": 10006, "supervisorCustomFieldId": 10007, "substituteCustomFieldId": 10008, "usedVacationDaysCustomFieldId": 10009, "usedVacationMinutesCustomFieldId": 10010, "migrateData": true }

DELETE

Deletes configuration.

Permissions: ADMIN USER SUPERVISOR HR

DELETE {jira_baseurl}/rest/vacation-manager/1.0/configuration

Responses 204  500


GET

Returns whole configuration.

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/configuration

Responses: 200 500

{ "id": 1, "done": true, "projectId": 10100, "groups": { "HR": "vacman-hr" }, "fields": { "CHART": 10000, "START_DATE": 10002, "PERIOD_TYPE": 10001, "START_DATE_TIME": 10004, "USED_VACATION_DAYS": 10009, "END_DATE": 10003, "END_TIME_MINUTES": 10005, "HALF_DAY": 10006, "USED_VACATION_MINUTES": 10010, "COMMENT": null, "SUPERVISOR": 10007, "SUBSTITUTE": 10008 }, "schemes": { "ISSUE_TYPE_SCREEN_SCHEME": 10100, "FIELD_LAYOUT_SCHEME": 10000, "FIELD_SCREEN_SCHEME": 10100, "FIELD_LAYOUT": 10100, "FIELD_CONFIG_SCHEME": 10200 }, "options": { "PERIOD_TYPE_DAILY": 10000, "HALF_DAY_AM": 10003, "PERIOD_TYPE_HALF_DAILY": 10001, "PERIOD_TYPE_HOURLY": 10002, "HALF_DAY_PM": 10004 }, "automaticSummary": true, "automaticSummaryTexts": { "DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, ${vacationDays} days", "HALF_DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, half of the day (${vacationHalfOfDay})", "HOURLY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, from ${vacationStartTime} to ${vacationEndTime} (${vacationHours}h ${vacationMinutes}m)" }, "documentStatusesApprovedIds": [ "10102" ], "documentStatusesClosedIds": [ "10103", "10105", "10106" ], "jobTime": 0, "jobLastFireTime": 1539208800000, "showUserPickerWarning": true, "daysBeforeLeaveWarning": 7, "defaultHolidaySchemeId": 1, "defaultWorkweekSchemeId": 1, "allowUsersToViewStatistics": false, "worklogHoursPerDayType": "JIRA_TIMETRACKING" }

Returns general configuration.

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/configuration/general

Responses: 200 500

{ "id": 1, "done": true, "project": { "id": 10100, "key": "VACMAN", "name": "Vacation Manager" }, "automaticSummary": true, "automaticSummaryTexts": { "DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, ${vacationDays} days", "HALF_DAILY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, half of the day (${vacationHalfOfDay})", "HOURLY": "${reporter} Vacation Document (${vacationType}): on ${startDate}, from ${vacationStartTime} to ${vacationEndTime} (${vacationHours}h ${vacationMinutes}m)" }, "jobTime": 0, "jobLastFireTime": 1539208800000, "showUserPickerWarning": true, "daysBeforeLeaveWarning": 7, "worklogHoursPerDayType": "JIRA_TIMETRACKING", "allowUsersToViewStatistics": false }

Returns groups configuration.

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/configuration/groups

Responses: 200 500

{ "groups": { "HR": { "name": "vacman-hr", "type": "HR" } } }

Returns fields configuration.

Permissions: ADMIN USER SUPERVISOR HR

GET {jira_baseurl}/rest/vacation-manager/1.0/configuration/fields

Responses: 200 500

{ "fields": { "CHART": { "id": 10000, "name": "Statistics", "nameKey": "Statistics", "fieldName": "Statistics", "type": "CHART" }, "USED_VACATION_DAYS": { "id": 10009, "name": "Used vacation days", "nameKey": "Used vacation days", "fieldName": "Used vacation days", "type": "USED_VACATION_DAYS" }, "END_DATE": { "id": 10003, "name": "End Date", "nameKey": "End Date", "fieldName": "End Date", "type": "END_DATE" } }

Related content

Feel free to tell us what topic should be covered: vacationmanager@psc-software.atlassian.net