Skip to content

Offer the datetime format for customized types beyond issues #15

Description

@dkastl

Follow-up to #14, which deliberately scoped the new "Date and time" custom field format to issue custom fields.

Redmine supports date custom fields on several customized types, and each is a separate CustomField subclass with its own admin tab:

  • ProjectCustomField
  • VersionCustomField
  • UserCustomField / GroupCustomField
  • TimeEntryCustomField
  • IssueCategoryCustomField, DocumentCategoryCustomField, and the enumeration ones

What needs checking

The format itself is type-agnostic, so most of the work is verification rather than new code:

  • Which subclasses actually offer date today, since the format list per type is filtered by CustomField#format_supported?-style logic and each subclass declares what it allows.
  • Whether anything in the format assumes an issue. cast_single_value and formatted_value take customized, and the current implementation ignores it, which is a good sign.
  • Time entries are the interesting case: they already carry a spent_on date, so a datetime custom field there may overlap with what the core model means. Worth deciding rather than enabling by default.
  • Filtering and grouping should be re-checked per type, since each type's query class differs.

Why it was left out

Scoping the first change to issues kept it verifiable end to end in one pass, and issues are where the demand came from. Widening is cheap to do and cheap to test once the format itself is settled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions