salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

Fix #10364 - Adding now option and minute sensibility in Datetime fields #10368

Open SinergiaCRM opened 4 months ago

SinergiaCRM commented 4 months ago

In this PR, the option "now" is added to the default value list in the datetime field editing in the Studio module. Additionally, the internal value of the "today" item has been modified, as it was already using the value "now".

Furthermore, the variable datetime_combo_minute_interval is created to indicate the interval of minutes that will be displayed in datetime fields, in case the default value of every 15 minutes is not desired.

Additionally, the sensitivity of the minute hand of datetime fields whose default value is "now" is modified. The sensitivity is set to 1 so that the minutes are always displayed correctly.

Motivation and Context

This change is required to enhance the functionality of the datetime fields in the Studio module. It adds flexibility by allowing the option "now" and enables customization of the minute interval displayed in datetime fields.

How To Test This

  1. Open the Studio module.
  2. Navigate to the editing section of a datetime field.
  3. Verify that "now" is included in the default value list.
  4. Select "now" option and allow MassUpdate.
  5. Go to the edit view and make sure that the minute field is now set to 1 by 1.

Types of changes

Final checklist

serhiisamko091184 commented 4 months ago

Hi @SinergiaCRM,

Thanks for your PR!

Regards, Serhii