We are running 7.8.7. When I create a new task, starting, letās say, at 9 a.m., ending 11 a.m. and save it, when I open the Calendar module, the task is graphically shown as starting at 11 a.m, ending at 1 p.m⦠It happens with calls as well. Nonetheless, when I create a meeting, it appears perfect!
Is it the expected behavior? I expect the task being shown as a rectangle starting at 9, ending at 11, not starting at 11, ending at 1 p.m.
I have discarded any time zone issue as long as meeting are working the expected way.
I have the same problem in all my installations.
I have a clean LTS 7.10.25 installation, a 7.11.10 with greek language and various others, but the problem seems to be everywhere.
I did it and everything is ok. My time-zone is set as it should (Europe/Athens) and the time is correct.
The problem is, as you can see in the screenshot above, that the bar has to begin at Tuesday 26 and END at Friday 29. Thatās how the task is registered - see the dates above the light-grey bar, under āTest Taskā.
But the task BEGINS after the ending timeā¦
Trying to find a solution, I checked the modules/Calendar/CalendarActivity.php. There I checked the values of CalendarActivityObject ($this) and found all information is correct.
So, the problem has to be in the script which makes the depiction of the bars.
I am going to find it, but any help will be appreciated. Do you know where is this located?
I donāt suppose we shouldnāt just be changing it back - maybe thereās a better way forward, solving both the current issue youāre getting and the Issue on Gituhb mentioned above.
I know that due_date vs start_date is a particularly tricky issue with SuiteCRM, because of the aggregating subpanel called āactivitiesā, which uses dates from several modules and tries to make sense of them. There have been several bugs and regressions with these fields in that subpanel.
But I am not sure what is supposed to be going on in the calendar.
This thread has some info about the fullCalendar options to make things draggable:
I checked the problem mentioned above, about the fatal error when thereās no due date in a task. Yes, its still happening.
It is easily fixed when you add an additional check in CalendarActivity.php
to update $this->sugar_bean->date_due with a time after $this->sugar_bean->date_start.
I will post the fix as soon as I find where the hell is the function that gets user time formatā¦
Thanks for the info! $timedate->get_date_time_format() is what I was searching for.
I took the liberty to set 1 day for the default duration of a Task which has only start date.
The patch which fixes the Calendar and allows Tasks to process normally even without due dates, is the following: File /modules/Calendar/CalendarActivity.php line 80:
//Add this to allow Task process normally if due date is not present
if(empty($this->sugar_bean->date_due) && !empty($this->sugar_bean->date_start)){
$timeObject = DateTime::createFromFormat($timedate->get_date_time_format(), $this->sugar_bean->date_start);
$timeObject->add(new DateInterval(āP1Dā));
$this->sugar_bean->date_due = $timeObject->format($timedate->get_date_time_format());
}
// End addition
And if that sounds very complicated, donāt be shy, just go ahead and start something, there is a generic good-will towards people who are newbies in git, github, etc, because weāve all been there, and these things have a learning curve.
And because itās more important to have good development and problem solving skills, the rest one learns later. Thanks for contributing!