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
 String createChangelogValueForDateField(Date date)
          Converts a Date into a string representation for the issue change history.
 String createChangelogValueForDateTimeField(Date date)
          Converts a Date into a string representation for the issue change history.
 String 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().
 String 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 Detail

createChangelogValueForDateTimeField

String createChangelogValueForDateTimeField(Date date)
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

String createChangelogValueForDateField(Date date)
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

String 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(). This value should contain only date information. The com.atlassian.jira.datetime.DateTimeStyle.DATE formatter is used to render the change history value.

Parameters:
dateValue - the value of the ChangeHistoryItem
dateStr - the string of the ChangeHistoryItem, 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

String 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(). This value should contain time AND time information. The com.atlassian.jira.datetime.DateTimeStyle.DATE_TIME_PICKER formatter is used to render the change history value.

Parameters:
dateTimeValue - the value of the ChangeHistoryItem
dateTimeString - the string of the ChangeHistoryItem, 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.


Copyright © 2002-2012 Atlassian. All Rights Reserved.