diff --git a/inc/caldav-REPORT-calquery.php b/inc/caldav-REPORT-calquery.php
index 297e1239..18177aae 100644
--- a/inc/caldav-REPORT-calquery.php
+++ b/inc/caldav-REPORT-calquery.php
@@ -98,25 +98,67 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter =
return false; // Not handled in SQL
}
if ( isset( $property ) ) {
- switch( $property ) {
+ # $property may include the table name, remove that for the switch.
+ if (strpos($property, '.')) {
+ $base_property = explode('.', $property)[1];
+ } else {
+ $base_property = $property;
+ }
+
+ switch( $base_property ) {
case 'created':
case 'completed': /** @todo when it can be handled in the SQL - see around line 200 below */
case 'dtend':
case 'dtstamp':
case 'dtstart':
+ case 'due':
if ( ! $target_collection->IsSchedulingCollection() ) {
- $property_defined_match = "IS NOT NULL";
+ if ($not_defined == "not ") {
+ // "not IS NOT NULL" is a syntax error in SQL.
+ $property_defined_match = "IS NULL";
+ $not_defined = '';
+ } else {
+ $property_defined_match = "IS NOT NULL";
+ }
}
break;
case 'priority':
- $property_defined_match = "IS NOT NULL";
+ case 'status':
+ if ($not_defined == "not ") {
+ // "not IS NOT NULL" is a syntax error in SQL.
+ $property_defined_match = "IS NULL";
+ $not_defined = '';
+ } else {
+ $property_defined_match = "IS NOT NULL";
+ }
+ break;
+
+ // These may be null or have the empty string, so we need a more complicated query.
+ case 'location':
+ case 'summary':
+ case 'url':
+ if ($not_defined == "not ") {
+ // "not IS NOT NULL" is a syntax error in SQL.
+ $property_defined_match = "IS NULL";
+ $condition = 'OR';
+ } else {
+ $property_defined_match = "IS NOT NULL";
+ $condition = 'AND';
+ }
+
+
+ $sql .= sprintf(" AND (%s %s %s %s %sLIKE '_%%') ", $property, $property_defined_match, $condition, $property, $not_defined);
+ $property_defined_match = null;
break;
default:
$property_defined_match = "LIKE '_%'"; // i.e. contains a single character or more
}
- $sql .= sprintf( "AND %s %s%s ", $property, $not_defined, $property_defined_match );
+
+ if (isset($property_defined_match)) {
+ $sql .= sprintf( "AND %s %s%s ", $property, $not_defined, $property_defined_match );
+ }
}
break;
diff --git a/testing/tests/regression-suite/0966-REPORT-not-defined.result b/testing/tests/regression-suite/0966-REPORT-not-defined.result
deleted file mode 100644
index a9bee7e1..00000000
--- a/testing/tests/regression-suite/0966-REPORT-not-defined.result
+++ /dev/null
@@ -1,10 +0,0 @@
-HTTP/1.1 207 Multi-Status
-Date: Dow, 01 Jan 2000 00:00:00 GMT
-DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
-DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
-ETag: "07474790757c5e1b526ce4901889d6d3"
-Content-Length: 68
-Content-Type: text/xml; charset="utf-8"
-
-
-
diff --git a/testing/tests/regression-suite/2500-is-defined-Setup-MKCALENDAR.result b/testing/tests/regression-suite/2500-is-defined-Setup-MKCALENDAR.result
new file mode 100644
index 00000000..2624c1ea
--- /dev/null
+++ b/testing/tests/regression-suite/2500-is-defined-Setup-MKCALENDAR.result
@@ -0,0 +1,9 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Cache-Control: no-cache
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
diff --git a/testing/tests/regression-suite/2500-is-defined-Setup-MKCALENDAR.test b/testing/tests/regression-suite/2500-is-defined-Setup-MKCALENDAR.test
new file mode 100644
index 00000000..d3396a4f
--- /dev/null
+++ b/testing/tests/regression-suite/2500-is-defined-Setup-MKCALENDAR.test
@@ -0,0 +1,33 @@
+#
+# Make a new collect for events
+#
+TYPE=MKCALENDAR
+URL=http://regression.host/caldav.php/user1/
+
+HEADER=User-Agent: DAViCal test/1.12.0
+HEADER=Content-Type: text/xml; charset=utf-8
+HEADER=Accept: */*
+HEADER=Content-Type: application/xml; charset="utf-8"
+
+HEAD
+
+BEGINDATA
+
+
+
+
+ Events_tests
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+QUERY
+SELECT * FROM collection WHERE dav_name = '/user1/Events tests';
+ENDQUERY
diff --git a/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.data b/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.data
new file mode 100644
index 00000000..ea8129f0
--- /dev/null
+++ b/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.data
@@ -0,0 +1,40 @@
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+X-WR-CALNAME:mir-test
+BEGIN:VTODO
+UID:19970901T130000Z-123405@host.com
+DTSTAMP:19970901T130000Z
+DTSTART:19970415T133000Z
+DUE:19970516T045959Z
+SUMMARY:Status is not set
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+BEGIN:VTODO
+UID:19920901T130000Z-123407@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+DUE:19920516T045959Z
+SUMMARY:Status is set to COMPLETED, empty URL
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+STATUS:COMPLETED
+URL:
+COMPLETED:19940101T000000Z
+PRIORITY:1
+END:VTODO
+BEGIN:VTODO
+UID:19920901T130000Z-123408@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+SUMMARY:Status is IN-PROCESS, URL is set
+STATUS:IN-PROCESS
+URL:https://www.davical.org
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.result b/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.result
new file mode 100644
index 00000000..57f457d2
--- /dev/null
+++ b/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.result
@@ -0,0 +1,7 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
diff --git a/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.test b/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.test
new file mode 100644
index 00000000..b75da56f
--- /dev/null
+++ b/testing/tests/regression-suite/2500-is-defined-Setup-PUT-collection.test
@@ -0,0 +1,14 @@
+#
+# PUT a calendar collection to user1 so we have relevant events
+#
+# There is no CalDAV defined behaviour for this.
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/events/
+HEADER=User-Agent: DAViCal Testing/1.12.x
+HEADER=Content-Type: text/calendar; charset=utf-8
+AUTH=user1:user1
+
+HEAD
+
+DATA=2500-is-defined-Setup-PUT-collection
diff --git a/testing/tests/regression-suite/2501-is-defined-REPORT-is-not-defined.result b/testing/tests/regression-suite/2501-is-defined-REPORT-is-not-defined.result
new file mode 100644
index 00000000..fade010d
--- /dev/null
+++ b/testing/tests/regression-suite/2501-is-defined-REPORT-is-not-defined.result
@@ -0,0 +1,35 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "59f93496e3ef79135478f26203487b2c"
+Content-Length: 683
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/events/19970901T130000Z-123405host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19970901T130000Z-123405@host.com
+DTSTAMP:19970901T130000Z
+DTSTART:19970415T133000Z
+DUE:19970516T045959Z
+SUMMARY:Status is not set
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/0966-REPORT-not-defined.test b/testing/tests/regression-suite/2501-is-defined-REPORT-is-not-defined.test
similarity index 79%
rename from testing/tests/regression-suite/0966-REPORT-not-defined.test
rename to testing/tests/regression-suite/2501-is-defined-REPORT-is-not-defined.test
index 679f9202..58131392 100644
--- a/testing/tests/regression-suite/0966-REPORT-not-defined.test
+++ b/testing/tests/regression-suite/2501-is-defined-REPORT-is-not-defined.test
@@ -1,13 +1,12 @@
#
-# not-defined REPORT
+# is-not-defined REPORT
#
# Regression test for https://gitlab.com/davical-project/davical/-/issues/279
#
-# Returns nothing, but at least we don't get a fatal error now.
-# XXX: Changed to be a test that returns records
+# Neither COMPLETED or STATUS is set
#
TYPE=REPORT
-URL=http://regression.host/caldav.php/user1/home/
+URL=http://regression.host/caldav.php/user1/events/
HEADER=Content-Type: text/xml; charset="UTF-8"
HEADER=Depth: 0
HEAD
diff --git a/testing/tests/regression-suite/2502-is-defined-REPORT-is-defined-STATUS.result b/testing/tests/regression-suite/2502-is-defined-REPORT-is-defined-STATUS.result
new file mode 100644
index 00000000..185db2ca
--- /dev/null
+++ b/testing/tests/regression-suite/2502-is-defined-REPORT-is-defined-STATUS.result
@@ -0,0 +1,63 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "28313224701803b7f45afe7d04f4c08d"
+Content-Length: 1357
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/events/19920901T130000Z-123407host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19920901T130000Z-123407@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+DUE:19920516T045959Z
+SUMMARY:Status is set to COMPLETED, empty URL
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+STATUS:COMPLETED
+URL:
+COMPLETED:19940101T000000Z
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/events/19920901T130000Z-123408host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19920901T130000Z-123408@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+SUMMARY:Status is IN-PROCESS, URL is set
+STATUS:IN-PROCESS
+URL:https://www.davical.org
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2502-is-defined-REPORT-is-defined-STATUS.test b/testing/tests/regression-suite/2502-is-defined-REPORT-is-defined-STATUS.test
new file mode 100644
index 00000000..0d34c3ac
--- /dev/null
+++ b/testing/tests/regression-suite/2502-is-defined-REPORT-is-defined-STATUS.test
@@ -0,0 +1,33 @@
+#
+# is-defined REPORT
+#
+# Regression test for https://gitlab.com/davical-project/davical/-/issues/279
+#
+# Check that STATUS is defined.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/events/
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+
diff --git a/testing/tests/regression-suite/2503-is-defined-REPORT-is-defined-URL.result b/testing/tests/regression-suite/2503-is-defined-REPORT-is-defined-URL.result
new file mode 100644
index 00000000..ea50b1d9
--- /dev/null
+++ b/testing/tests/regression-suite/2503-is-defined-REPORT-is-defined-URL.result
@@ -0,0 +1,36 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "f6abdaed27780f116d7fc410df5fac23"
+Content-Length: 724
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/events/19920901T130000Z-123408host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19920901T130000Z-123408@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+SUMMARY:Status is IN-PROCESS, URL is set
+STATUS:IN-PROCESS
+URL:https://www.davical.org
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2503-is-defined-REPORT-is-defined-URL.test b/testing/tests/regression-suite/2503-is-defined-REPORT-is-defined-URL.test
new file mode 100644
index 00000000..d29f0fc2
--- /dev/null
+++ b/testing/tests/regression-suite/2503-is-defined-REPORT-is-defined-URL.test
@@ -0,0 +1,33 @@
+#
+# is-defined REPORT
+#
+# Regression test for https://gitlab.com/davical-project/davical/-/issues/279
+#
+# Check that URL is defined.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/events/
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+
diff --git a/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result b/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result
new file mode 100644
index 00000000..0f8780e7
--- /dev/null
+++ b/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.result
@@ -0,0 +1,62 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "cc87613d28223c8c0a0aa0a10b79d521"
+Content-Length: 1316
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/events/19970901T130000Z-123405host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19970901T130000Z-123405@host.com
+DTSTAMP:19970901T130000Z
+DTSTART:19970415T133000Z
+DUE:19970516T045959Z
+SUMMARY:Status is not set
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/events/19920901T130000Z-123407host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19920901T130000Z-123407@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+DUE:19920516T045959Z
+SUMMARY:Status is set to COMPLETED, empty URL
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+STATUS:COMPLETED
+URL:
+COMPLETED:19940101T000000Z
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.test b/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.test
new file mode 100644
index 00000000..dab38c04
--- /dev/null
+++ b/testing/tests/regression-suite/2504-is-defined-REPORT-is-not-defined-URL.test
@@ -0,0 +1,33 @@
+#
+# is-not-defined REPORT
+#
+# Regression test for https://gitlab.com/davical-project/davical/-/issues/279
+#
+# Check that URL is not defined.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/events/
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+
diff --git a/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result b/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result
new file mode 100644
index 00000000..0f8780e7
--- /dev/null
+++ b/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.result
@@ -0,0 +1,62 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "cc87613d28223c8c0a0aa0a10b79d521"
+Content-Length: 1316
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/events/19970901T130000Z-123405host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19970901T130000Z-123405@host.com
+DTSTAMP:19970901T130000Z
+DTSTART:19970415T133000Z
+DUE:19970516T045959Z
+SUMMARY:Status is not set
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/events/19920901T130000Z-123407host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19920901T130000Z-123407@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+DUE:19920516T045959Z
+SUMMARY:Status is set to COMPLETED, empty URL
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+STATUS:COMPLETED
+URL:
+COMPLETED:19940101T000000Z
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.test b/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.test
new file mode 100644
index 00000000..88cc00b5
--- /dev/null
+++ b/testing/tests/regression-suite/2505-is-defined-REPORT-is-defined-DUE.test
@@ -0,0 +1,33 @@
+#
+# is-defined REPORT
+#
+# Regression test for https://gitlab.com/davical-project/davical/-/issues/279
+#
+# Check that DUE is defined.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/events/
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+
diff --git a/testing/tests/regression-suite/2506-is-defined-REPORT-is-not-defined-DUE.result b/testing/tests/regression-suite/2506-is-defined-REPORT-is-not-defined-DUE.result
new file mode 100644
index 00000000..ea50b1d9
--- /dev/null
+++ b/testing/tests/regression-suite/2506-is-defined-REPORT-is-not-defined-DUE.result
@@ -0,0 +1,36 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "f6abdaed27780f116d7fc410df5fac23"
+Content-Length: 724
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/events/19920901T130000Z-123408host.com.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VTODO
+UID:19920901T130000Z-123408@host.com
+DTSTAMP:19920901T130000Z
+DTSTART:19920415T133000Z
+SUMMARY:Status is IN-PROCESS, URL is set
+STATUS:IN-PROCESS
+URL:https://www.davical.org
+CLASS:CONFIDENTIAL
+CATEGORIES:FAMILY,FINANCE
+PRIORITY:1
+END:VTODO
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2506-is-defined-REPORT-is-not-defined-DUE.test b/testing/tests/regression-suite/2506-is-defined-REPORT-is-not-defined-DUE.test
new file mode 100644
index 00000000..071ba05e
--- /dev/null
+++ b/testing/tests/regression-suite/2506-is-defined-REPORT-is-not-defined-DUE.test
@@ -0,0 +1,33 @@
+#
+# is-not-defined REPORT
+#
+# Regression test for https://gitlab.com/davical-project/davical/-/issues/279
+#
+# Check that DUE is not defined.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/events/
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+