Package com.atlassian.jira.issue.history
Interface DateTimeFieldChangeLogHelper
- All Known Implementing Classes:
DateTimeFieldChangeLogHelperImpl
public interface DateTimeFieldChangeLogHelper
A helper component which can be used by (custom)fields to store date/time information in the issue change history.
- Since:
- v4.4
-
Method Summary
Modifier and TypeMethodDescriptionConverts a Date into a string representation for the issue change history.Converts a Date into a string representation for the issue change history.renderChangeHistoryValueDate
(String dateValue, String dateStr) Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateField().renderChangeHistoryValueDateTime
(String dateTimeValue, String dateTimeString) Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateTimeField().
-
Method Details
-
createChangelogValueForDateTimeField
Converts a Date into a string representation for the issue change history. Call this method, if you want to store a change history value for a (custom)field which stores date AND time information.- Parameters:
date
- the value Date of the (custome)field- Returns:
- a string representation of the date, which contains date AND time.
-
createChangelogValueForDateField
Converts a Date into a string representation for the issue change history. Call this method, if you want to store a change history value for a (custom)field which stores ONLY calendar date (day, month, year) information.- Parameters:
date
- date the value Date of the (custome)field- Returns:
- a string representation of the date.
-
renderChangeHistoryValueDate
Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateField(). This value should contain only date information. Thecom.atlassian.jira.datetime.DateTimeStyle.DATE
formatter is used to render the change history value.- Parameters:
dateValue
- the value of theChangeHistoryItem
dateStr
- the string of theChangeHistoryItem
, if it can't convert the dateValue it will return the dateStr.- Returns:
- either a formatted date string, if it failed to convert the value it return the dateStr.
-
renderChangeHistoryValueDateTime
Use this method to render a value for the issue change history that has been stored using the method createChangelogValueForDateTimeField(). This value should contain time AND time information. Thecom.atlassian.jira.datetime.DateTimeStyle.DATE_TIME_PICKER
formatter is used to render the change history value.- Parameters:
dateTimeValue
- the value of theChangeHistoryItem
dateTimeString
- the string of theChangeHistoryItem
, if it can't convert the dateTimeValue it will return the dateStr.- Returns:
- either a formatted date string, if it failed to convert the value it return the dateTimeString.
-