[evolution] I#1853 - Tasks: Cannot remove recurrence and Start date at the same time
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#1853 - Tasks: Cannot remove recurrence and Start date at the same time
- Date: Fri, 1 Apr 2022 10:30:38 +0000 (UTC)
commit 6268ff9717b907b86ac3cb74618ab2e1495c17cf
Author: Milan Crha <mcrha redhat com>
Date: Fri Apr 1 12:28:17 2022 +0200
I#1853 - Tasks: Cannot remove recurrence and Start date at the same time
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1853
src/calendar/gui/e-comp-editor-task.c | 37 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 19 deletions(-)
---
diff --git a/src/calendar/gui/e-comp-editor-task.c b/src/calendar/gui/e-comp-editor-task.c
index 3fde93a7ac..26ac39e9fa 100644
--- a/src/calendar/gui/e-comp-editor-task.c
+++ b/src/calendar/gui/e-comp-editor-task.c
@@ -621,25 +621,6 @@ ece_task_fill_component (ECompEditor *comp_editor,
return FALSE;
}
- if (e_cal_util_component_has_recurrences (component)) {
- ICalTime *dtstart;
-
- dtstart = e_comp_editor_property_part_datetime_get_value
(E_COMP_EDITOR_PROPERTY_PART_DATETIME (task_editor->priv->dtstart));
-
- if (!dtstart || i_cal_time_is_null_time (dtstart) || !i_cal_time_is_valid_time (dtstart)) {
- e_comp_editor_set_validation_error (comp_editor,
- task_editor->priv->page_general,
- e_comp_editor_property_part_get_edit_widget (task_editor->priv->dtstart),
- _("Start date is required for recurring tasks"));
-
- g_clear_object (&dtstart);
-
- return FALSE;
- }
-
- g_clear_object (&dtstart);
- }
-
if (!e_comp_editor_property_part_datetime_check_validity (
E_COMP_EDITOR_PROPERTY_PART_DATETIME (task_editor->priv->due_date), NULL, NULL)) {
@@ -715,6 +696,24 @@ ece_task_fill_component (ECompEditor *comp_editor,
if (e_cal_util_component_has_recurrences (component)) {
ECalClient *cal_client;
+ ICalTime *dtstart;
+
+ /* Check this only after the recurrence page updates the component,
+ like when the component is not recurring anymore. */
+ dtstart = e_comp_editor_property_part_datetime_get_value
(E_COMP_EDITOR_PROPERTY_PART_DATETIME (task_editor->priv->dtstart));
+
+ if (!dtstart || i_cal_time_is_null_time (dtstart) || !i_cal_time_is_valid_time (dtstart)) {
+ e_comp_editor_set_validation_error (comp_editor,
+ task_editor->priv->page_general,
+ e_comp_editor_property_part_get_edit_widget (task_editor->priv->dtstart),
+ _("Start date is required for recurring tasks"));
+
+ g_clear_object (&dtstart);
+
+ return FALSE;
+ }
+
+ g_clear_object (&dtstart);
cal_client = e_comp_editor_get_source_client (comp_editor);
if (!cal_client)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]