stable
Clone or download
When a tracker is configured to send calendar event config (reminder: only via DB for now), then when it is exported (tracker ยป admin ยป xml export), in the generated XML file there is an attribute to specify this config. When the XML file is imported back in trackers ยป create new tracker, then the new tracker is configured to send calendar event as well. (you can assert that by exporting the XML structure of the tracker, or by looking at the DB). If you update the XML file and replace the value attribute to 0 (`should_send_event_in_notification="0"`) and you import it to create a new tracker, then this new tracker is not configured to send calendar event. Implementation note: first try to implement this feature was to plug ourselves in `TrackerCreationSettings`, however this one is used in `\TrackerFactory::create()` which already handle the notification settings via `NotificationSettingsDuplicator`. By continuing this path, we would have end up updating twice the config: one via `NotificationSettingsDuplicator` and one via `TrackerCreationSettings`. Since it is the first time that we deal with notification settings in tracker XML import/export (except legacy ones) it seems natural to have a dedicated object/process `TrackerCreationNotificationSettings` to deal with those attributes during XML import. Part of story #35094: have "calendar" events attached to tracker email notification Change-Id: I3894decc97492cd4636e993b79dae7e783a108c8
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/tracker/include/Tracker/Creation/TrackerCreationNotificationsSettings.php | +30 | โ0 | Go to diff View file |
M | plugins/tracker/include/Tracker/Notifications/Settings/CalendarEventConfigDao.php | +24 | โ0 | Go to diff View file |
M | plugins/tracker/include/Tracker/Tracker.class.php | +16 | โ0 | Go to diff View file |
M | plugins/tracker/include/Tracker/TrackerFactory.class.php | +11 | โ3 | Go to diff View file |
M | plugins/tracker/include/TrackerXmlImport.class.php | +8 | โ1 | Go to diff View file |
M | plugins/tracker/resources/tracker-definition.rnc | +1 | โ0 | Go to diff View file |
M | plugins/tracker/resources/tracker-definition.rng | +5 | โ0 | Go to diff View file |
M | plugins/tracker/resources/tracker.rng | +5 | โ0 | Go to diff View file |
M | plugins/tracker/resources/trackers.rng | +5 | โ0 | Go to diff View file |
M | plugins/tracker/tests/integration/Tracker/Notifications/Settings/CalendarEventConfigDaoTest.php | +2 | โ10 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/XML/TrackerExportToXmlTest.php | +75 | โ0 | Go to diff View file |
M | src/common/xml/resources/project/project.rng | +5 | โ0 | Go to diff View file |
M | src/common/xml/resources/project/tracker-definition.rng | +5 | โ0 | Go to diff View file |