Bug #13161 Cannot See the Created Issue
Submitted: 14 Sep 2005 5:30 Modified: 4 Nov 2005 4:04
Reporter: Gourav Sinha Email Updates:
Status: Closed Impact on me:
None 
Category:Eventum Severity:S2 (Serious)
Version:1.6.1 OS:Windows (XP and IE)
Assigned to: Bryan Alsdorf CPU Architecture:Any

[14 Sep 2005 5:30] Gourav Sinha
Description:
Hi, 

i am a newbee to eventum. I installed eventum on my windows XP machine.
Before that i installed MySQL 5 and PHP 4.3.3.
Now when  i add an issue i cant see the issues in the issue list. 
When i checkout the error.log i see the following message.

[Wed Sep 14 10:51:38 2005] An error was found on line '67' of script 'C:\Inetpub\wwwroot\eventum\include\class.pager.php'.

The error message passed to us was:

'DB Error: no such field'

A more detailed error message follows:

'SELECT COUNT(iss_id) AS total_rows FROM                    eventum.tbl_issue,                    eventum.tbl_user                 LEFT JOIN                    eventum.`tbl_group`                 ON                    iss_grp_id=grp_id                 LEFT JOIN                    eventum.tbl_project_category                 ON                    iss_prc_id=prc_id                 LEFT JOIN                    eventum.tbl_project_release                 ON                    iss_pre_id = pre_id                 LEFT JOIN                    eventum.tbl_status                 ON                    iss_sta_id=sta_id                 LEFT JOIN                    eventum.tbl_project_priority                 ON                    iss_pri_id=pri_id                 LEFT JOIN                    eventum.tbl_issue_quarantine                 ON                    iss_id=iqu_iss_id AND                    (iqu_expiration > '2005-09-14 05:21:38' OR iqu_expiration IS NULL)                 WHERE                    iss_prj_id= 1 AND iss_usr_id = usr_id AND sta_is_closed=0                 GROUP BY                    iss_id                  [nativecode=1054 ** Unknown column 'iss_grp_id' in 'on clause']'

A backtrace is available:

Array
(
    [0] => Array
        (
            [file] => C:\Inetpub\wwwroot\eventum\include\class.issue.php
            [line] => 2276
            [function] => gettotalrows
            [class] => pager
            [type] => ::
            [args] => Array
                (
                    [0] => SELECT
                    iss_id,
                    iss_grp_id,
                    iss_prj_id,
                    iss_sta_id,
                    iss_customer_id,
                    iss_created_date,
                    iss_updated_date,
                    iss_last_response_date,
                    iss_closed_date,
                    iss_last_customer_action_date,
                    iss_usr_id,
                    iss_summary,
                    pri_title,
                    prc_title,
                    sta_title,
                    sta_color status_color,
                    sta_id,
                    iqu_status,
                    grp_name `group`,
                    pre_title,
                    iss_last_public_action_date,
                    iss_last_public_action_type,
                    iss_last_internal_action_date,
                    iss_last_internal_action_type,
                    GREATEST(iss_last_public_action_date, iss_last_internal_action_date) AS last_action_date,
                    IF(iss_last_internal_action_date > iss_last_public_action_date, 'internal', 'public') AS action_type,
                    iss_private,
                    usr_full_name,
                    iss_percent_complete,
                    iss_dev_time,
                    iss_expected_resolution_date
                 FROM
                    eventum.tbl_issue,
                    eventum.tbl_user
                 LEFT JOIN
                    eventum.`tbl_group`
                 ON
                    iss_grp_id=grp_id
                 LEFT JOIN
                    eventum.tbl_project_category
                 ON
                    iss_prc_id=prc_id
                 LEFT JOIN
                    eventum.tbl_project_release
                 ON
                    iss_pre_id = pre_id
                 LEFT JOIN
                    eventum.tbl_status
                 ON
                    iss_sta_id=sta_id
                 LEFT JOIN
                    eventum.tbl_project_priority
                 ON
                    iss_pri_id=pri_id
                 LEFT JOIN
                    eventum.tbl_issue_quarantine
                 ON
                    iss_id=iqu_iss_id AND
                    (iqu_expiration > '2005-09-14 05:21:38' OR iqu_expiration IS NULL)
                 WHERE
                    iss_prj_id= 1 AND iss_usr_id = usr_id AND sta_is_closed=0
                 GROUP BY
                    iss_id
                 ORDER BY
                    pri_rank ASC,
                    iss_id DESC
                )

        )

    [1] => Array
        (
            [file] => c:\inetpub\wwwroot\eventum\list.php
            [line] => 107
            [function] => getlisting
            [class] => issue
            [type] => ::
            [args] => Array
                (
                    [0] => 1
                    [1] => Array
                        (
                            [rows] => 5
                            [pagerRow] => 
                            [hide_closed] => 1
                            [sort_by] => pri_rank
                            [sort_order] => ASC
                            [keywords] => 
                            [search_type] => all_text
                            [users] => 
                            [status] => 
                            [priority] => 
                            [category] => 
                            [customer_email] => 
                            [show_authorized_issues] => 
                            [show_notification_list_issues] => 
                            [reporter] => 
                            [release] => 
                            [custom_field] => 
                        )

                    [2] => 0
                    [3] => 5
                )

        )

)

I tried to run the query in the Db and i got the same error as shown above.

I searched the archives and found that another person had the same issue and he reinstalled and was able to get it work. But that is not the case with me.

also when i write the Code:
"echo "<pre>";var_dump($res);echo "</pre>";" at line 1505 of the file 
/path-to-eventum/include/class.issue.php, as stated in "http://lists.mysql.com/eventum-users/255"  the page dispalys nothing ..no header nothing.

Please let me know how can i solve the problem.

Regards,
Gourav Sinha

How to repeat:
I just installed the application on my Xp and added a bug.
I can see the bug in DB but not in the Issue list.
[14 Sep 2005 5:32] Gourav Sinha
The log file after the bug.

Attachment: errors.log (application/octet-stream, text), 9.67 KiB.

[14 Sep 2005 14:28] Bryan Alsdorf
Hi,

Please send me the output of the following commands:

DESC tbl_issue;
DESC tbl_group;
[14 Sep 2005 15:26] Gourav Sinha
hi,

I am attaching the out of the commands that you asked for.
The problem is solved if you swap the name of the tables in the natural join.

like 
FROM
                    eventum.eventum_issue,
                    eventum.eventum_user
TO
FROM
                    eventum.eventum_user,
                    eventum.eventum_issue

But then are a lot of queries with the same problem.

I am attaching the latest log file as well with the latest errors with other tables.
[14 Sep 2005 15:27] Gourav Sinha
The Output of DESC Tbl_group

Attachment: _group.htm (text/plain), 1.81 KiB.

[14 Sep 2005 15:27] Gourav Sinha
The Output of DESC Tbl_issue

Attachment: _issue.htm (text/plain), 10.82 KiB.

[14 Sep 2005 15:28] Gourav Sinha
The latest log file.

Attachment: Errors.log (application/octet-stream, text), 196.61 KiB.

[23 Sep 2005 21:57] Costin Bereveanu
Hey,
The guy that suggested the table name switch was correct.
You may either do that, in class.issue.php, or enclose the two comma separated table names in paranthesis (without switching the names) - that seems to work too.
Warning: the same bug exists for more than one function, so keep enclosing (swapping) :)
[23 Sep 2005 21:59] Costin Bereveanu
By the way, I'm using PHP 5.0.5 and the latest MySQL 5 beta. Windows XP...
[23 Sep 2005 23:08] Bryan Alsdorf
I have confirmed this is a bug and will work on resolving it.
[4 Nov 2005 4:04] Bryan Alsdorf
Hi, this issue is now fixed and will be in our next release.
[16 Dec 2005 18:09] milan shah
I have the same problem and am not sure what to change in which file so could you please send me the edited phps and I can replace the ones I have. or put detailed info of WHAT to change where as I'm not a techi. 

I understand what you are saying but don't know where to make the changes.
Thanks