sharing/bday/template: change trigger separator
This commit is contained in:
@@ -2346,7 +2346,7 @@ Global template for alarm trigger of conversion "bday"
|
||||
|
||||
Default: ``
|
||||
|
||||
Supported format: `TIMEDELTA;DESCRIPTION` (separated by `|` if more alarms should be generated)
|
||||
Supported format: `TIMEDELTA;DESCRIPTION` (separated by `$` if more alarms should be generated)
|
||||
|
||||
Supported format for `TIMEDELTA`: `[+-]?[0-9]+[WDHM]`
|
||||
|
||||
|
||||
2
config
2
config
@@ -363,7 +363,7 @@
|
||||
#conversion_bday_description_template = BDAY={year}-{month}-{day}
|
||||
|
||||
# Global template of alarm trigger of conversion "bday"
|
||||
# Example: "-15H;BDAY tomorrow|9H;BDAY today"
|
||||
# Example: "-15H;BDAY tomorrow$9H;BDAY today"
|
||||
#conversion_bday_alarm_trigger_template = ""
|
||||
|
||||
# Global categories of conversion "bday"
|
||||
|
||||
@@ -163,7 +163,7 @@ def check_template_not_empty(data: Any) -> str:
|
||||
|
||||
def check_template_alarm_trigger(data: Any) -> str:
|
||||
if data is not None and data != '':
|
||||
for entry in data.split('|'):
|
||||
for entry in data.split('$'):
|
||||
try:
|
||||
(trigger, alarm_description) = entry.split(';')
|
||||
except ValueError:
|
||||
|
||||
@@ -5020,7 +5020,7 @@ permissions: RrWw""")
|
||||
self.configure({"sharing": {
|
||||
"conversion_bday_summary_template": "[{fn}|{n:f} {n:g} {n:a}|{nickname}] (BDAY)",
|
||||
"conversion_bday_description_template": "BDAY={year}-{month}-{day}",
|
||||
"conversion_bday_alarm_trigger_template": "-15H;BDAY tomorrow|9H;BDAY today",
|
||||
"conversion_bday_alarm_trigger_template": "-15H;BDAY tomorrow$9H;BDAY today",
|
||||
}})
|
||||
|
||||
# verify content as user
|
||||
@@ -5083,7 +5083,7 @@ permissions: RrWw""")
|
||||
assert "TRIGGER:-PT15H" in answer
|
||||
assert "TRIGGER:PT9H" in answer
|
||||
|
||||
self.configure({"sharing": {"conversion_bday_alarm_trigger_template": "-12H;Birthday tomorrow of {fn}|12H;Birthday today of {n:g} {n:f}"}})
|
||||
self.configure({"sharing": {"conversion_bday_alarm_trigger_template": "-12H;Birthday tomorrow of {fn}$12H;Birthday today of {n:g} {n:f}"}})
|
||||
logging.info("\n*** GET collection user format: description -> ok")
|
||||
_, headers, answer = self.request("GET", path_shared_3, login="user:userpw")
|
||||
assert "DESCRIPTION:Birthday tomorrow of Test-FN-C3" in answer
|
||||
|
||||
Reference in New Issue
Block a user