From: George Herson Date: January 11 2005 7:19pm Subject: RE: Can't create an issue List-Archive: http://lists.mysql.com/eventum-users/720 Message-Id: <20050111191922.69057.qmail@web81303.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii hi, A specific eventum/include/class.issue.php modification that seems to have worked for this issue (eventum 1.4 w/customer integration turned on): if (Customer::hasCustomerIntegration($prj_id)) { // line 1621 $tmp = User::getUserIDByContactID($HTTP_POST_VARS['contact']); // new line. //$stmt .= User::getUserIDByContactID($HTTP_POST_VARS['contact']) . ","; } else { $tmp = $usr_id; // new line. //$stmt .= $usr_id . ","; } $stmt .= ($tmp)?$tmp:"''"; // Getting past a sql syntax error 1/11/05. $stmt .= ","; // new line. The issue seems to be that MySQL prefers '' over nothing when it comes to inserting into the issue.iss_usr_id field. fyi, george herson ------------------------------------------------------ Hi, I ran into the same problem when trying out the sample customer class. It doesn't correctly populate the values list. I had to modify the insert() method to fix this. John D "Risk everything, or gain nothing" -Geoffrey De Charny -----Original Message----- From: Joao Prado Maia [mailto:jpm@stripped] Sent: Monday, January 10, 2005 9:54 PM To: eventum-users@stripped Subject: RE: Can't create an issue Rob, > I am getting an error log, as it turns out. It would appear that the > problem is due to the iss_usr_id field being empty, but I am > selecting a > user in the pulldown list (BTW, I did toggle the General > Options setting > called 'Allow Un-assigned Issues'. I wonder if there could > be something > wrong with that logic...) > I'm guessing you are still trying to develop your own customer backend, right? The error you are seeing is related to the following piece of code: // if we are creating an issue for a customer, put the // main customer contact as the reporter for it if (Customer::hasCustomerIntegration($prj_id)) { $stmt .= User::getUserIDByContactID($HTTP_POST_VARS['contact']) . ","; } else { $stmt .= $usr_id . ","; } On the second case (the else), the error is not likely since $usr_id is the ID of the currently logged in user. However, if you have the customer integration enabled for the current project, it will try to use the user ID of the customer contact chosen on the form. Be careful when implementing your new customer backend, as lots of things change whether the customer integration feature is turned on or not, like exemplified above. --Joao