Author Topic: Error when changing the due date  (Read 5698 times)

blatour

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Error when changing the due date
« on: January 11, 2013, 06:21:09 am »
Hello all,

We have installed version 2.2.1 of Fengoffice community and we get an error when we want to change the due date of an existing task.

Here is the error message: Query failed with message 'Column 'date' cannot be null'

Anyone have a solution to this problem?

Thank you in advance.

B. Latour

blatour

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Error when changing the due date
« Reply #1 on: January 15, 2013, 12:28:32 pm »
Hello,

Nobody to help me to solve this problem?

Regards

asdfghj

  • Freshman
  • *
  • Posts: 16
    • View Profile
Re: Error when changing the due date
« Reply #2 on: January 22, 2013, 01:46:37 am »
i saw this issue as well..  i did skip all the v2 updates until 2.2.2 as i was migrating from 1.7.5 and had some issues with previous versions...

did you upgrade or are you on a fresh install?  have you tried to go to version 2.2.2 and has this resolved the issue?

when i had this problem, i believe it was a permissions issue with the way the task/milestone was setup..  i would change the date and i would then not have the correct perms to view that task anymore, giving me a similar error.

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Error when changing the due date
« Reply #3 on: January 29, 2013, 10:14:33 am »
Chances are the installation/upgrade was corrupt or not completely finished.

By following this guide, you should have no problem when upgrading - we do not have them at least -:
http://www.fengoffice.com/web/wiki/doku.php/installation:migration#upgrading_from_1x_to_2x

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

caillech

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error when changing the due date
« Reply #4 on: March 06, 2013, 10:19:53 am »
I have the same problem as blatour. But I upgraded from 1.7.5 to 2.2.3.1. I followed the update script to the letter.

Also log.php gets filled up with this error because of it:

ERROR: Error: Undefined index: multi_assignment in 'C:\Apache\htdocs\fengoffice\application\models\project_tasks\ProjectTasks.class.php' on line 430 (error code: 8)

caillech

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error when changing the due date
« Reply #5 on: April 04, 2013, 10:50:38 am »
I solved my problem with the due date by adding the column "is_required" to the table "fo_dimensions". Apparantly it wasn't created when upgrading from 1.7.5 to 2.2.3.1.

TommyC81

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Error when changing the due date
« Reply #6 on: May 18, 2013, 08:24:06 am »
This is still a problem on a fresh install of either 2.2.4.1 or 2.3RC2. I'm unable to set a due date unless I do it when creating the task, I can't edit a task to add it...

Why is this? Have you tested fresh installs properly?

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Error when changing the due date
« Reply #7 on: May 20, 2013, 10:55:47 am »
This is still a problem on a fresh install of either 2.2.4.1 or 2.3RC2. I'm unable to set a due date unless I do it when creating the task, I can't edit a task to add it...

Why is this? Have you tested fresh installs properly?
Do you mean in Chrome but not when using other browsers?
If so that is because of an upgrade in Chrome, but that has already been fixed long ago for the Professional Edition, as well as within later versions (2.3beta onwards).

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

jgulledge19

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error when changing the due date
« Reply #8 on: July 01, 2013, 12:13:43 pm »
There is a bad hard coded query that needs to be updated:

FENG\application\models\project_tasks\ProjectTask.class.php around line 1219:
It looks something like this:

Code: [Select]
if ($due_date_changed) {
$id = $this->getId();
$sql = "UPDATE `".TABLE_PREFIX."object_reminders` SET
`date` = date_sub((SELECT `due_date` FROM `".TABLE_PREFIX."project_tasks` WHERE `id` = $id),
interval `minutes_before` minute) WHERE `object_id` = $id;";
DB::execute($sql);
}
And it needs to be this:
Code: [Select]
if ($due_date_changed) {
$id = $this->getId();
$sql = "UPDATE `".TABLE_PREFIX."object_reminders` SET
`date` = date_sub((SELECT `due_date` FROM `".TABLE_PREFIX."project_tasks` WHERE `object_id` = $id),
interval `minutes_before` minute) WHERE `object_id` = $id;";
DB::execute($sql);
}

Basically just add in object_ in the nested select WHERE clause.

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Error when changing the due date
« Reply #9 on: July 04, 2013, 01:39:20 pm »
There is a bad hard coded query that needs to be updated:

FENG\application\models\project_tasks\ProjectTask.class.php around line 1219:
It looks something like this:

Code: [Select]
if ($due_date_changed) {
$id = $this->getId();
$sql = "UPDATE `".TABLE_PREFIX."object_reminders` SET
`date` = date_sub((SELECT `due_date` FROM `".TABLE_PREFIX."project_tasks` WHERE `id` = $id),
interval `minutes_before` minute) WHERE `object_id` = $id;";
DB::execute($sql);
}
And it needs to be this:
Code: [Select]
if ($due_date_changed) {
$id = $this->getId();
$sql = "UPDATE `".TABLE_PREFIX."object_reminders` SET
`date` = date_sub((SELECT `due_date` FROM `".TABLE_PREFIX."project_tasks` WHERE `object_id` = $id),
interval `minutes_before` minute) WHERE `object_id` = $id;";
DB::execute($sql);
}

Basically just add in object_ in the nested select WHERE clause.

Thank you for your conrtibution! This has been added to the 2.3.1-beta onwards.

Keep up the good work!

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

Baveskara

  • Hero Member
  • *****
  • Posts: 648
    • ICQ Messenger - 365673748
    • Yahoo Instant Messenger - cialis and beer
    • View Profile
    • generic cialis 5 mg from india
    • Email
adderall and cialis together
« Reply #10 on: July 28, 2022, 04:31:32 am »
cialis for daily use These data demonstrate the differences between the treatment groups, as well as the effect of time
« Last Edit: December 17, 2022, 07:55:56 am by Baveskara »