Page MenuHomePhorge

kolab-freebusy future events
Open, NormalPublic

Description

Well, that might be 2 tickets in one:

  1. Kolab FreeBusy checks events for 16 weeks in the future. That needs to be configurable. There are business cases where customers needs to book resources for half a year in the future or even more.
  2. Roundcube should display FreeBusy information in the future. Maybe that is a problem of request / response.

Details

Ticket Type
Task

Event Timeline

adomaitis created this task.
adomaitis added projects: Roundcube Kolab Plugins , Restricted Project.

This is quite complicated and here's a couple of bugs in Roundcube and Free-Busy.

  1. In Roundcube, free-busy requests don't specify period dates, so until the free-busy cache expires it will always get response for a period that starts 8 weeks before now and ends 16 weeks after.

This can be fixed by following patch:

diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index 6762ad9..ae6986c 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -1792,7 +1792,16 @@ class kolab_driver extends calendar_driver
         'store_body'       => true,
         'follow_redirects' => true,
       );
-      $request  = libkolab::http_request(kolab_storage::get_freebusy_url($email), 'GET', $request_config);
+
+      if ($start) {
+        $start_dt = new DateTime('@' . $start);
+      }
+      if ($end) {
+        $end_dt = new DateTime('@' . $end);
+      }
+
+      $url      = kolab_storage::get_freebusy_url($email, $start_dt, $end_dt);
+      $request  = libkolab::http_request($url, 'GET', $request_config);
       $response = $request->send();
 
       // authentication required
  1. However, after that you'll find a series of issues, including fatal errors in freebusy code. Also, it looks that freebusy cache system is not able to handle that properly. I'll open a separate ticket for this.

@adomaitis,

  1. those business cases need to be articulated as problem spaces, rather then desired resolutions.
  1. I don't understand. Roundcube does display Free/Busy information from the future. What is it that it is not displaying where you expect it to display such-and-such? Again, revert to the problem space or problem statement, please.

Roundcube displays free-busy for max. 16 weeks into the future. So, you will not see free-busy information when you create an event more than 4 months from now. That's probably not a big issue, and maybe simple config option in Free-Busy would be enough for a solution.

@vanmeeuwen:

The business case, as stated in orginal description:
"There are business cases where customers needs to book resources for half a year in the future or even more."
If you book a resource more than 16 weeks from now - you can't see its freebusy information. Not sure what other information is needed here.

The free-busy max. 16 weeks in the Future are "hard-coded" in /usr/share/kolab-freebusy/lib/Kolab/Freebusy/Utils.php
in the static functions periodEnd and periodEndDT the amount of weeks is set to 16 weeks. You can easy set this value to any other like 53 weeks for a whole year.

vanmeeuwen lowered the priority of this task from 60 to Normal.Mar 28 2019, 8:12 AM