...
Both can be done with the Calculate Days Elapsed for Traffic Light Post Function which initialises the information required for tracking the day elapsed.
Prerequisite
Besides a Traffic Light custom field, there should also be a configuration to define the traffic light mappings.
Refer to steps here to create a Traffic light custom field, and/or configure the Days Mapping.
Adding the Post Function
For the basics on setting up a workflow, please refer to JIRAJira's documentation on configuring workflows
...
Select the workflow transition to perform the calculate days elapsed post function
Tip |
---|
It is possible to start tracking from the issue creation by adding the post function to the Create transition |
- Click on Add post function and add a Calculate Days Elapsed for Traffic Light post function.
Note |
---|
title | Types of Start/End Date Fields options (for Set and Accumulate Mode) |
---|
|
- Current Date - to continue counting the Traffic Light SLA until the next post function is executed
- Today - The date and time the post function was triggered
- System Date Fields - Issue's Created Date, Due Date, Resolution Date, Updated Date
- Custom Fields - Date Picker or Date Timer Picker custom fields added by administrators
Fill in the settings for the post function
|
Image RemovedImage Removed
Traffic Light Custom Field | The target Traffic Light custom field to update. |
---|
Traffic Light Mode | 7 modes: |
---|
|
this will Start the target Traffic Light custom field value (include 1st day).this will Stop the target Traffic Light custom field value (- Stops the timer (It will be ignored if existing
|
|
Traffic Light SLA - timer is already stopped).
- Clear:
|
|
this will clear and reset the target Traffic Light custom field value.this will Resume SLA calculation for the target Traffic Light custom field value ONLY IF there are existing Traffic Light SLA value (ignored if existing Traffic Light SLA - Resumes a stopped timer (It will be ignored if the timer is already running)
|
|
.this will Resume SLA calculation for the target Traffic Light custom field value if there are existing Traffic Light SLA value (ignored if existing Traffic Light SLA is already running) OR Start the target Traffic Light custom field value.Set: this will set the days elapsed from the Start till End date specified below - Resumes the stopped timer. If there is no timer, it will start a new timer
- Set: Sets the days elapsed from a specified Start Date till the specified End date (existing values will be replaced)
|
|
. this will retain any existing days elapsed value and add it to the days elapsed from the Start till End date specified below- Add the number of days elapsed from the Start Date till End date to the current days elapsed. This is used when certain periods are to be excluded from the counting.
|
|
4 days to resolve - day to respond to the client and the Traffic Light is stopped at
|
|
4 days issue has been closed for - client responded after 2 days, it is reopened with Traffic Light set to Accumulate mode → after issue is reopened, the number of working days will start counting from
|
|
4 | Start Date | The start date to calculate the days elapsed. If the date custom field value is null, the Traffic Light value will be cleared. |
---|
End Date | The end date to calculate the days elapsed to. If the date custom field value is null, the Traffic Light value will be cleared.- If it is Current Date, then the Traffic Light days elapsed will continue to update everyday.
- If it
|
---|
|
is - is Today, it will use the date and time when the post function was executed.
- For other date/datepicker custom fields, it will use the value provided at the point in time that the post function is triggered.
| Exclude First Day | Whether to exclude the 1st day in the calculation. When ticked, it means to exclude the 1st day from the Start Date from counting as a working day. The default setting is to include the 1st day. |
---|
Accumulate only if there is existing Days | Whether to accumulate the days if there is no existing Traffic Light value. The default is set to accumulate regardless if there is existing SLA value. |
---|
|
note
|
Image Added
title | Types of Start/End Date Fields options (for Set and Accumulate Mode) |
---|
|
- Current Date - to continue counting the Traffic Light SLA until the next post function is executed
- Today - The date and time the post function was triggered
- System Date Fields - Issue's Created Date, Due Date, Resolution Date, Updated Date
Custom Fields - Date Picker or Date Timer Picker custom fields added by administratorsImage Added
Image Added
Image Added
Publish the workflow
Warning |
---|
icon | false |
---|
title | Some Technical Details to Note |
---|
|
- When the post function is added in the Create transition, the Traffic Light post function needs to be placed before the "Creates the issue originally." post function for it to work.
- In Set/Accumulate mode, if either the Start or End Date custom field(s) is updated by the post function, please ensure that the Calculate Days Elapsed for Traffic Light post function is placed after the update of the date field post function.
- Please ensure the workflow is designed such that the End Date should not be earlier than the Start Date. Otherwise it will be considered as 0 day elapsed.
- Special Case: if the End Date = Current Date and it is earlier than the Start Date, it will show as 0 day until the day the issue elapses the Start Date and the Traffic Light SLA will start incrementing
- If a Traffic Light has Stopped (i.e. the Start and End Date time are known or Stop mode), the Traffic Light will no longer update until another Post Function triggers any change to it.
- If a Traffic Light is still Running (i.e. End Date = Current Date or Start or Resume mode) and the issue's edited fields are used in the Traffic Light's JQL condition mapping, then the traffic light color might change if it matches another JQL condition.
- If an issue cannot match any mapping conditions due to an edit, the Traffic Light becomes White color since the color cannot be determined. The color can be corrected if the JQL mapping condition changes or the issue is corrected.
|
...