Request for Time parameter in Start Date & Due Date
Added by KUNTAL MONDAL about 2 months ago
Hello,
I am currently using Redmine 5.1.1 and we have the parameters Start Date and Due Date in the issue page. However, I would like to have the time component alongside these date fields as it would be beneficial for defining our SLAs.
We are aware of a plugin available in ticket #5458 but it seems to compatible only up to Redmine version 3.x
Could someone please let me know if there is a similar plugin or built in solution available for Redmine 5.1.1? Or any guidance on how to achieve this would also be greatly appreciated!
Sharing my environment info:
Redmine version 5.1.1.stable
Ruby version 3.0.6-p216 (2023-03-30) [x86_64-linux]
Rails version 6.1.7.6
Thanks in advance.
Replies (1)
RE: Request for Time parameter in Start Date & Due Date
-
Added by Tab Ar 7 days ago
Hello!
You're right, the plugin mentioned in ticket #5458 is likely outdated and incompatible with Redmine 5.1.1. Unfortunately, Redmine's core functionality doesn't natively support time components within the Start Date and Due Date fields.
Here's a breakdown of the situation and potential solutions:
1. No Built-in Solution:
Redmine's standard date fields (start_date, due_date) are designed to store only date information, not time.
There are no configuration options within Redmine's settings to add time components to these fields.
2. Plugin Options (Limited):
The primary challenge is finding a plugin compatible with Redmine 5.1.1, Ruby 3.0, and Rails 6.1.
Many older plugins might not have been updated to support these newer versions.
Finding a plugin that adds time components to the existing date fields can be difficult. Most plugins add new custom fields.
It would be wise to search the Redmine plugin directory, and also github. Search for plugins that add time to dates, and then verify the compatibility.
3. Custom Field Approach (Recommended):
Create Custom Date/Time Fields: The most reliable approach is to create custom date/time fields specifically for your SLA time tracking.
Go to "Administration" -> "Custom fields."
Click "New custom field."
Choose "Date and time" as the format.
Create two custom fields: "Start Date/Time" and "Due Date/Time."
Associate these custom fields with the relevant issue trackers.
Replace or Supplement: You can either:
Completely replace the default start_date and due_date fields with your new custom date/time fields.
Keep the default fields for general date tracking and use the custom fields for SLA-specific time tracking.
Workflow Adjustments: You might need to adjust your workflows to ensure users consistently populate the custom date/time fields.
Reporting and Queries: You can use these custom date/time fields in your Redmine reports and queries for SLA analysis.
Advantages:
This approach is compatible with Redmine 5.1.1.
It's relatively easy to implement.
It provides flexibility for reporting and analysis.
4. Code Modification (Advanced):
Modifying Redmine Core: Directly modifying Redmine's core code is strongly discouraged. It can lead to upgrade issues and instability.
Plugin Development: Creating a custom plugin that extends the existing date fields to include time components is possible but requires significant Ruby on Rails development expertise.
Considerations:
You would need to modify the Redmine views, models, and controllers.
This approach requires thorough testing.
It would be necessary to maintain the custom plugin with each Redmine update.
Example of Custom Field Creation:
Navigate to "Administration" -> "Custom fields."
Click "New custom field."
Fill in the following:
Name: "Start Date/Time"
Format: "Date and time"
Trackers: Select the issue trackers you want to use this field with.
Repeat steps 2 and 3 for "Due Date/Time."