View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|18381||Feature requests||Plugins||public||2022-09-28 11:55||2022-11-23 14:41|
|Summary||18381: PluginSetting type date must be saved as a common datetime string|
my personal dateformat is
|Steps To Reproduce|
Steps to reproduce
(Replace this text with detailed step-by-step instructions on how to reproduce the issue)
(Write here what you expected to happen)
(Write here what happened instead)
|Tags||No tags attached.|
Can you fix this without breaking old plugins?
I don't think this is a bug, but a feature.
To keep backward_compatibilty I would just introduce a new field type and name it 'datetime' instead of 'date'. Mark 'date' as obsolete for future major versions.
The fix for https://bugs.limesurvey.org/view.php?id=18330 leads to a far better usage of date type fields at plugin settings. But it can also cause serious issues. A user with date format setting yyyy-mm-dd may be entering a plugin setting like 2022-12-31. The date may be used for certain calculations or triggering email sending.
So whatever solution we aim for, we should make sure that we always have a valid date format stored for this field type, similar to how we deal with a token's expiry date for example.
We have same issue with password : how to fix it …
We don' have different way to save settings according to type currently … we can fix it for surveySetting before send it to the event. But for global one : there are only one function maybe extended by plugin.
Survey : https://github.com/LimeSurvey/LimeSurvey/blob/32aa344f92cee033805f3f788aac2f48a8cfded0/application/controllers/admin/Database.php#L661 We can update some before send it to plugin
Maybe best solution is to force datetime to be in ISO/SQL format here ?
Forcing ISO/SQL format is fine with me. We just need to make sure that users are not able to enter something invalid.
@c_schmitz, can we assign this to a developer so it gets included at the next sprint? We need it in 2-4 weeks for a new project.
I am sorry but it is not a priority for us and it is more like a new feature. Maybe you can hire Denis directly, if this can be implemented in a backward-comptible manner?
@bismark have competency to do it i think :)
Else : the way i do it for password ? https://github.com/LimeSurvey/LimeSurvey/pull/2651
Adding a option :
My preference is adding a new setting type "isodate" which has a date picker but always stores details as YYYY-MM-DD format.
We just need the time for implementing this. @gabrieljenik, would you be able to provide a helping hand (paid support)?
isodate is better than saveasiso :+1:
Currently not a lot of time :)
I think the term "attribute on the setting type" and "setting type" are begin used inter-changabely.
With an attribute on the setting type, the impact is minor I think, right?
From what I spoken with Marcel, you will take this, right?
I don't remind , but OK :)
|2022-09-28 11:55||bismark||New Issue|
|2022-09-28 13:19||ollehar||Note Added: 71995|
|2022-09-28 13:19||ollehar||Bug heat||0 => 2|
|2022-09-28 15:28||gabrieljenik||Status||new => acknowledged|
|2022-09-28 15:35||c_schmitz||Note Added: 72005|
|2022-09-28 15:35||c_schmitz||Bug heat||2 => 4|
|2022-09-28 15:39||c_schmitz||Note Added: 72006|
|2022-09-30 10:07||Mazi||Note Added: 72025|
|2022-09-30 10:07||Mazi||Bug heat||4 => 6|
|2022-09-30 10:07||Mazi||Relationship added||child of 18330|
|2022-09-30 12:24||DenisChenu||Note Added: 72028|
|2022-09-30 12:24||DenisChenu||Bug heat||6 => 8|
|2022-10-04 12:10||Mazi||Note Added: 72068|
|2022-10-28 14:25||Mazi||Note Added: 72463|
|2022-10-28 15:07||c_schmitz||Note Added: 72464|
|2022-10-28 15:23||DenisChenu||Note Added: 72465|
|2022-10-28 15:40||Mazi||Note Added: 72466|
|2022-10-28 15:41||DenisChenu||Note Added: 72467|
|2022-10-31 13:50||gabrieljenik||Project||Bug reports => Feature requests|
|2022-10-31 14:35||gabrieljenik||Note Added: 72486|
|2022-10-31 14:35||gabrieljenik||Bug heat||8 => 10|
|2022-10-31 14:36||gabrieljenik||Assigned To||=> gabrieljenik|
|2022-10-31 14:36||gabrieljenik||Status||acknowledged => assigned|
|2022-10-31 15:31||DenisChenu||Note Added: 72490|
|2022-11-01 18:34||guest||Bug heat||10 => 16|
|2022-11-23 14:28||gabrieljenik||Assigned To||gabrieljenik => DenisChenu|
|2022-11-23 14:29||gabrieljenik||Note Added: 72860|
|2022-11-23 14:41||DenisChenu||Note Added: 72861|
|2022-11-23 14:41||DenisChenu||Priority||none => normal|
|2022-11-23 14:41||DenisChenu||Severity||@50@ => feature|