Project

General

Profile

Actions

Feature #44129

closed

Allow relative default values for date format custom fields

Added by Go MAEDA 21 days ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Custom fields
Target version:
Resolution:
Fixed

Description

Currently, date format custom fields can only use a fixed date as their default value.

This patch adds support for relative default values. In addition to specifying a fixed date, administrators can configure a date offset that is evaluated relative to the current user's date when a new object is created.

This makes date custom fields more useful for common workflows such as:

  • Today
  • One week from today
  • Three days before today

For example, an issue custom field named "Response deadline" can be configured with a default offset of 7. When a user creates a new issue on May 1, the field is pre-filled with May 8.

An offset of 0 represents today, while negative values can be used for dates before today.

Absolute mode
The custom field is initialized with the configured fixed date. This is the same behavior as the current default value setting.

Relative mode
The custom field is initialized with a date calculated from the configured offset relative to the current user's date.


Files


Related issues

Related to Redmine - Feature #20382: Date Custom Field Defaut ValueNewActions
Actions #1

Updated by Go MAEDA 21 days ago

  • Category set to Custom fields
Actions #3

Updated by Go MAEDA 19 days ago

  • Target version set to Candidate for next major release
Actions #4

Updated by Go MAEDA 17 days ago

  • Target version changed from Candidate for next major release to 7.0.0

Setting the target version to 7.0.0.

Actions #5

Updated by Go MAEDA 12 days ago

Actions #6

Updated by Go MAEDA 11 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r24720.

Actions #7

Updated by Takashi Kato 11 days ago

In r24720, /app/javascript/controllers/custom_field_default_controller.js has not been committed.

Actions #8

Updated by Go MAEDA 11 days ago

Takashi Kato wrote in #note-7:

In r24720, /app/javascript/controllers/custom_field_default_controller.js has not been committed.

Added in r24722. Thank you for pointing it out.

Actions

Also available in: Atom PDF