You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:18:27
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18535 Added Files: error.html Log Message: Added copy of error.html in templates/default/admin/ --- NEW FILE: error.html --- <table width="100%"> <tr> <td align="center"> <?php if ($iserror) echo "<div class=\"error\">$text</div>"; else echo $text; ?> <br> <br> <a href="javascript:history.go(-1)"><?php echo translate("Back"); ?></a> </td> </tr> </table> |
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:17:06
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17442 Added Files: index.php Log Message: Bug #1110978 - v1.0rc5 Admin timeout problem. Added a redirection from admin/index.php to index.php --- NEW FILE: index.php --- <?php header("Location: ../index.php"); ?> |
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:14:22
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17060/inc/db Modified Files: mssql.php mysql.php mysqli.php oci8.php pgsql.php Log Message: Make the group "User" less special (don't force everyone into it) Index: mssql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mssql.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mssql.php 23 Aug 2005 21:12:39 -0000 1.4 +++ mssql.php 29 Aug 2005 19:14:13 -0000 1.5 @@ -200,8 +200,7 @@ TBL_USER_GROUP.' ug '. 'left join '.TBL_AUTH_GROUP.' g on g.group_id = ug.group_id '. 'where '. - 'user_id = %s '. - 'and group_name <> \'User\'', + 'user_id = %s ', 'bug-cc-list' => 'select '. 'email '. Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- mysql.php 23 Aug 2005 21:12:39 -0000 1.27 +++ mysql.php 29 Aug 2005 19:14:13 -0000 1.28 @@ -200,8 +200,7 @@ TBL_USER_GROUP.' ug '. 'left join '.TBL_AUTH_GROUP.' g using (group_id) '. 'where '. - 'user_id = %s '. - 'and group_name <> \'User\'', + 'user_id = %s ', 'bug-cc-list' => 'select '. 'email '. Index: mysqli.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysqli.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mysqli.php 30 May 2005 19:32:27 -0000 1.1 +++ mysqli.php 29 Aug 2005 19:14:13 -0000 1.2 @@ -1,177 +1,470 @@ <?php + +// mysql.php - MySQL queries + $QUERY = array( - 'admin-list-groups' => 'select ag.group_id, group_name, locked, '. - 'count(ug.group_id) as count, assignable '. - 'from '.TBL_AUTH_GROUP.' ag '. - 'left join '.TBL_USER_GROUP.' ug using (group_id) '. - 'left join '.TBL_AUTH_USER.' using (user_id) '. - 'group by ag.group_id, group_name, locked, assignable '. - 'order by %s %s', - 'admin-list-oses' => 'select s.os_id, os_name, regex, sort_order, '. - 'count(bug_id) as bug_count '. - 'from '.TBL_OS.' s '. - 'left join '.TBL_BUG.' using (os_id) '. - 'group by s.os_id, os_name, regex, sort_order '. - 'order by %s %s', - 'admin-show-version' => 'select v.*, p.project_name as project_name '. - 'from '.TBL_VERSION.' v left join '.TBL_PROJECT.' p using(project_id) '. - 'where version_id = \'%s\'', - 'admin-show-component' => 'select c.*, p.project_name as project_name '. - 'from '.TBL_COMPONENT.' c left join '.TBL_PROJECT.' p using (project_id) '. - 'where component_id = \'%s\'', - 'admin-list-resolutions' => 'select s.resolution_id, resolution_name, '. - 'resolution_desc, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_RESOLUTION. ' s left join '.TBL_BUG.' using (resolution_id) '. - 'group by s.resolution_id, resolution_name, resolution_desc, sort_order '. - 'order by %s %s', - 'admin-list-severities' => 'select s.severity_id, severity_name, '. - 'severity_desc, severity_color, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_SEVERITY. ' s left join '.TBL_BUG.' using (severity_id) '. - 'group by s.severity_id, severity_name, severity_desc, severity_color, '. - 'sort_order '. - 'order by %s %s', - 'admin-list-databases' => 'select d.database_id, database_name, '. - 'sort_order, count(bug_id) as bug_count '. - 'from '.TBL_DATABASE. ' d left join '.TBL_BUG.' using (database_id) '. - 'group by d.database_id, database_name, sort_order '. - 'order by %s %s', - 'admin-list-sites' => 'select s.site_id, site_name, sort_order, '. - 'count(bug_id) as bug_count from '.TBL_SITE. ' s left join '. - TBL_BUG.' using (site_id) group by s.site_id, site_name, sort_order '. - 'order by %s %s', - 'admin-list-statuses' => 'select s.status_id, status_name, status_desc, '. - 'sort_order, bug_open, count(bug_id) as bug_count '. - 'from '.TBL_STATUS.' s left join '. TBL_BUG.' using (status_id) '. - 'group by s.status_id, status_name, status_desc, sort_order '. - 'order by %s %s', - 'admin-user-groups' => 'select ug.group_id '. - 'from '.TBL_USER_GROUP.' ug left join '.TBL_AUTH_GROUP.' g using (group_id) '. - 'where user_id = %s and group_name <> \'User\'', - 'bug-history' => 'select bh.*, login '. - 'from '.TBL_BUG_HISTORY.' bh '. - 'left join '. TBL_AUTH_USER.' on bh.created_by = user_id '. - 'where bug_id = %s order by bh.created_date', - 'bug-cc-list' => 'select email '. - 'from '.TBL_BUG_CC.' left join '. TBL_AUTH_USER.' u using(user_id), '. - TBL_USER_PREF.' p '. - 'where bug_id = %s and u.user_id = p.user_id and email_notices = 1', - 'bug-printable' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, project_name, component_name, version_name, '. - 'severity_name, os_name, status_name, resolution_name '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. - TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_OS.' os, '. TBL_VERSION.' v, '. - TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. - 'where bug_id = %s and b.project_id not in (%s) '. - 'and b.severity_id = sv.severity_id '. - 'and b.os_id = os.os_id and b.version_id = v.version_id '. - 'and b.component_id = c.component_id and b.project_id = p.project_id '. - 'and b.status_id = st.status_id', - 'bug-prev-next' => 'select bug_id, reporter.login as reporter, '. - 'owner.login as owner '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. - 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. - 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. - 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. - 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. - TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '. - TBL_VERSION.' version, '.TBL_COMPONENT.' component, '. - TBL_PROJECT.' project, '.TBL_SITE.' site '. - 'where b.severity_id = severity.severity_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.project_id = project.project_id and %s '. - 'and b.site_id = site.site_id '. - 'and bug_id <> %s '. - 'order by %s %s, bug_id asc', - 'bug-show-bug' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, status_name, resolution_name '. + 'admin-list-components' => + 'select '. + 'c.component_id, '. + 'component_name, '. + 'c.created_date, '. + 'active, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_COMPONENT.' c '. + 'left join '.TBL_BUG.' b using(component_id) '. + 'where '. + 'c.project_id = %s '. + 'group by '. + 'c.component_id, '. + 'c.component_name, '. + 'c.created_date, '. + 'c.active', + 'admin-list-databases' => + 'select '. + 'd.database_id, '. + 'database_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_DATABASE.' d '. + 'left join '.TBL_BUG.' using (database_id) '. + 'group by '. + 'd.database_id, '. + 'database_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-groups' => + 'select '. + 'ag.group_id, '. + 'group_name, '. + 'locked, '. + 'count(ug.group_id) as count '. + 'from '. + TBL_AUTH_GROUP.' ag '. + 'left join '.TBL_USER_GROUP.' ug using (group_id) '. + 'left join '.TBL_AUTH_USER.' using (user_id) '. + 'group by '. + 'ag.group_id, '. + 'group_name, '. + 'locked '. + 'order by '. + '%s %s', + 'admin-list-oses' => + 'select '. + 's.os_id, '. + 'os_name, '. + 'regex, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_OS.' s '. + 'left join '.TBL_BUG.' using (os_id) '. + 'group by '. + 's.os_id, '. + 'os_name, '. + 'regex, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-priorities' => + 'select '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_PRIORITY.' p '. + 'left join '.TBL_BUG.' b on b.priority = p.priority_id '. + 'group by '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-resolutions' => + 'select '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_RESOLUTION.' s '. + 'left join '.TBL_BUG.' using (resolution_id) '. + 'group by '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-severities' => + 'select '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SEVERITY.' s '. + 'left join '.TBL_BUG.' using (severity_id) '. + 'group by '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-sites' => + 'select '. + 's.site_id, '. + 'site_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SITE.' s '. + 'left join '.TBL_BUG.' using (site_id) '. + 'group by '. + 's.site_id, '. + 'site_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-statuses' => + 'select '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order, '. + 'bug_open, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_STATUS.' s '. + 'left join '.TBL_BUG.' using (status_id) '. + 'group by '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-versions' => + 'select '. + 'v.version_id, '. + 'version_name, '. + 'v.created_date, '. + 'active, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_VERSION.' v '. + 'left join '.TBL_BUG.' b using(version_id) '. + 'where '. + 'v.project_id = %s '. + 'group by '. + 'v.version_id, '. + 'v.version_name, '. + 'v.created_date, '. + 'v.active', + 'admin-show-component' => + 'select '. + 'c.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_COMPONENT.' c '. + 'left join '.TBL_PROJECT.' p using (project_id) '. + 'where '. + 'component_id = \'%s\'', + 'admin-show-version' => + 'select '. + 'v.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_VERSION.' v '. + 'left join '.TBL_PROJECT.' p using(project_id) '. + 'where '. + 'version_id = \'%s\'', + 'admin-user-groups' => + 'select '. + 'ug.group_id '. + 'from '. + TBL_USER_GROUP.' ug '. + 'left join '.TBL_AUTH_GROUP.' g using (group_id) '. + 'where '. + 'user_id = %s ', + 'bug-cc-list' => + 'select '. + 'email '. + 'from '. + TBL_BUG_CC.' '. + 'left join '.TBL_AUTH_USER.' u using(user_id), '. + TBL_USER_PREF.' p '. + 'where '. + 'bug_id = %s '. + 'and u.user_id = p.user_id '. + 'and email_notices = 1', + 'bug-history' => + 'select '. + 'bh.*, '. + 'login '. + 'from '. + TBL_BUG_HISTORY.' bh '. + 'left join '.TBL_AUTH_USER.' on bh.created_by = user_id '. + 'where '. + 'bug_id = %s '. + 'order by '. + 'bh.created_date', + 'bug-prev-next' => + 'select '. + 'b.bug_id, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'count(distinct comment.comment_id) as comments, '. + 'count(distinct attachment.attachment_id) as attachments, '. + 'count(distinct vote.user_id) as votes '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. + 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. + 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. + 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. + TBL_SEVERITY.' severity, '. + TBL_STATUS.' status, '. + TBL_OS.' os, '. + TBL_PRIORITY.' priority, '. + TBL_VERSION.' version, '. + TBL_COMPONENT.' component, '. + TBL_PROJECT.' project, '. + TBL_SITE.' site '. + 'where '. + 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. + 'and b.status_id = status.status_id '. + 'and b.os_id = os.os_id '. + 'and b.version_id = version.version_id '. + 'and b.component_id = component.component_id '. + 'and b.project_id = project.project_id '. + 'and %s '. + 'and b.site_id = site.site_id '. + 'and b.bug_id <> %s '. + 'group by '. + 'b.bug_id '. + 'order by '. + '%s %s, '. + 'b.bug_id asc', + 'bug-printable' => + 'select '. + 'b.*, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'project_name, '. + 'component_name, '. + 'version_name, '. + 'severity_name, '. + 'priority_name, '. + 'os_name, '. + 'status_name, '. + 'resolution_name '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. + TBL_SEVERITY.' sv, '. + TBL_STATUS.' st, '. + TBL_OS.' os, '. + TBL_VERSION.' v, '. + TBL_PRIORITY.' priority, '. + TBL_COMPONENT.' c, '. + TBL_PROJECT.' p '. + 'where '. + 'b.bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id '. + 'and b.priority = priority.priority_id '. + 'and b.os_id = os.os_id '. + 'and b.version_id = v.version_id '. + 'and b.component_id = c.component_id '. + 'and b.project_id = p.project_id '. + 'and b.status_id = st.status_id', + 'bug-show-bug' => + 'select '. + 'b.*, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'status_name, '. + 'resolution_name '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. + TBL_SEVERITY.' sv, '. + TBL_STATUS.' st, '. + TBL_SITE.' site, '. + TBL_PRIORITY.' prio '. + 'where '. + 'b.bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.site_id = site.site_id '. + 'and b.severity_id = sv.severity_id '. + 'and b.status_id = st.status_id '. + 'and b.priority = prio.priority_id', + 'functions-bug-cc' => + 'select '. + 'b.user_id, '. + 'login '. + 'from '. + TBL_BUG_CC.' b '. + 'left join '.TBL_AUTH_USER.' using(user_id) '. + 'where '. + 'bug_id = %s', + 'functions-project-js' => + 'select '. + 'p.project_id, '. + 'project_name '. + 'from '. + TBL_PROJECT.' p '. + 'left join '.TBL_PROJECT_GROUP.' pg using(project_id) '. + 'where '. + 'active = 1 '. + 'and (pg.project_id is null or pg.group_id in (%s)) '. + 'group by '. + 'p.project_id, '. + 'p.project_name '. + 'order by '. + 'project_name', + 'include-template-bookmark' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id), ". + TBL_BOOKMARK." w ". + "where ". + "w.user_id=%s ". + "AND w.bug_id = b.bug_id", + 'include-template-owner' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id) ". + "where ". + "assigned_to = %s", + 'include-template-reporter' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id) ". + "where ". + "created_by = %s", + 'index-projsummary-1' => + 'select project_name as "Project", '. + 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', + 'index-projsummary-2' => + "select resolution_name, ", + 'index-projsummary-3' => + "', sum(case when resolution_id = '", + 'index-projsummary-4' => + "' then 1 else 0 end) as \"'", + 'index-projsummary-5' => + " from ".TBL_RESOLUTION, + 'index-projsummary-6' => + '%s, count(bug_id) as "Total" '. 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. - TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_SITE.' site '. - 'where bug_id = %s and b.project_id not in (%s) '. - 'and b.site_id = site.site_id '. - 'and b.severity_id = sv.severity_id and b.status_id = st.status_id', - 'functions-bug-cc' => 'select b.user_id, login '. - 'from '.TBL_BUG_CC.' b left join '. TBL_AUTH_USER.' using(user_id) '. - 'where bug_id = %s', - 'functions-project-js' => 'select p.project_id, project_name '. - 'from '.TBL_PROJECT. ' p '. - 'left join '.TBL_PROJECT_GROUP.' pg using(project_id) '. - 'where active = 1 and (pg.project_id is null or pg.group_id in (%s)) '. - 'group by p.project_id, p.project_name '. + 'left join '.TBL_PROJECT.' p using (project_id) '. + 'where b.project_id not in (%s) '. + 'group by b.project_id, project_name '. 'order by project_name', - 'include-template-owner' => "SELECT sum(CASE WHEN s.status_id ". - "in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id ". - "not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) ". - "where assigned_to = %s", - 'include-template-reporter' => "SELECT sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) ". - "where created_by = %s", - 'index-projsummary-1' => 'select project_name as "Project", '. + 'join-where' => + 'where', + 'query-list-bugs' => + 'select '. + '%s '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. + 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. + 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. + 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. + TBL_SEVERITY.' severity, '. + TBL_STATUS.' status, '. + TBL_OS.' os, '. + TBL_SITE.' site, '. + TBL_VERSION.' version, '. + TBL_COMPONENT.' component, '. + TBL_PROJECT.' project, '. + TBL_PRIORITY.' priority '. + 'where '. + 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. + 'and b.status_id = status.status_id '. + 'and b.os_id = os.os_id '. + 'and b.site_id = site.site_id '. + 'and b.version_id = version.version_id '. + 'and b.component_id = component.component_id '. + 'and b.project_id = project.project_id %s '. + 'group by '. + 'b.bug_id '. + 'order by '. + '%s %s, '. + 'b.bug_id asc', + 'query-list-bugs-count' => + 'select '. + 'count(*) '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id ', + 'query-list-bugs-count-join' => + 'where ', + 'report-resbyeng-1' => + 'select email as "Assigned To", '. 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', - 'index-projsummary-2' => "select resolution_name, ", - 'index-projsummary-3' => "', sum(case when resolution_id = '", - 'index-projsummary-4' => "' then 1 else 0 end) as \"'", - 'index-projsummary-5' => " from ".TBL_RESOLUTION, - 'index-projsummary-6' => '%s, count(bug_id) as "Total" '. - 'from '.TBL_BUG. ' b left join '.TBL_PROJECT.' p using (project_id) '. - 'where b.project_id not in (%s) group by b.project_id, project_name '. - 'order by project_name', - 'query-list-bugs-count' => 'select count(*) '. + 'report-resbyeng-2' => + "select resolution_name, ", + 'report-resbyeng-3' => + "', sum(case when resolution_id = '", + 'report-resbyeng-4' => + "' then 1 else 0 end) as \"'", + 'report-resbyeng-5' => + " from ".TBL_RESOLUTION, + 'report-resbyeng-6' => + '%s, count(bug_id) as "Total" '. 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id ', - 'query-list-bugs-count-join' => 'where ', - 'query-list-bugs' => 'select %s '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. - 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. - 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. - 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. - 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. - TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '.TBL_SITE.' site, '. - TBL_VERSION.' version, '.TBL_COMPONENT.' component, '.TBL_PROJECT.' project '. - 'where b.severity_id = severity.severity_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.site_id = site.site_id and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.project_id = project.project_id %s '. - 'order by %s %s, bug_id asc', - 'report-resbyeng-1' => 'select email as "Assigned To", '. - 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', - 'report-resbyeng-2' => "select resolution_name, ", - 'report-resbyeng-3' => "', sum(case when resolution_id = '", - 'report-resbyeng-4' => "' then 1 else 0 end) as \"'", - 'report-resbyeng-5' => " from ".TBL_RESOLUTION, - 'report-resbyeng-6' => '%s, count(bug_id) as "Total" '. - 'from '.TBL_BUG. ' b '. 'left join '.TBL_AUTH_USER.' u on assigned_to = user_id %s '. 'group by assigned_to, u.email', - 'join-where' => 'where', - 'admin-list-components' => 'select c.component_id, component_name, '. - 'c.created_date, active, count(bug_id) as bug_count '. - 'from '.TBL_COMPONENT.' c left join '.TBL_BUG.' b using(component_id) '. - 'where c.project_id = %s '. - 'group by c.component_id, c.component_name, c.created_date, c.active', - 'admin-list-versions' => 'select v.version_id, version_name, '. - 'v.created_date, active, count(bug_id) as bug_count '. - 'from '.TBL_VERSION.' v left join '.TBL_BUG.' b using(version_id) '. - 'where v.project_id = %s '. - 'group by v.version_id, v.version_name, v.created_date, v.active', ); ?> Index: oci8.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/oci8.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- oci8.php 23 Aug 2005 21:12:39 -0000 1.20 +++ oci8.php 29 Aug 2005 19:14:13 -0000 1.21 @@ -222,8 +222,7 @@ TBL_AUTH_GROUP.' g '. 'where '. 'g.group_id = ug.group_id(+) '. - 'and user_id = %s '. - 'and group_name <> \'User\'', + 'and user_id = %s ', 'bug-cc-list' => 'select '. 'email '. Index: pgsql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/pgsql.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- pgsql.php 23 Aug 2005 21:12:39 -0000 1.28 +++ pgsql.php 29 Aug 2005 19:14:13 -0000 1.29 @@ -200,8 +200,7 @@ TBL_USER_GROUP.' ug '. 'left join '.TBL_AUTH_GROUP.' g using (group_id) '. 'where '. - 'user_id = %s '. - 'and group_name <> \'User\'', + 'user_id = %s ', 'bug-cc-list' => 'select '. 'email '. |
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:14:21
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17060/inc Modified Files: functions.php Log Message: Make the group "User" less special (don't force everyone into it) Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- functions.php 27 Aug 2005 13:51:42 -0000 1.63 +++ functions.php 29 Aug 2005 19:14:13 -0000 1.64 @@ -74,7 +74,7 @@ $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]"; $querymid = ' where sort_order > 0 order by sort_order'; $queries = array( - 'group' => $querystart.' where group_name <> \'User\' order by group_name', + 'group' => $querystart.' order by group_name', 'severity' => $querystart.$querymid, 'priority' => $querystart.$querymid, 'site' => $querystart.$querymid, |
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:14:21
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17060/admin Modified Files: user.php Log Message: Make the group "User" less special (don't force everyone into it) Index: user.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- user.php 22 Aug 2005 20:11:49 -0000 1.51 +++ user.php 29 Aug 2005 19:14:13 -0000 1.52 @@ -167,22 +167,30 @@ $filter_user = ''; $filter_group = ''; if (isset($_GET['userfilter'])) switch($_GET['userfilter']) { - case 1 : $filter_user = ' and u.active = 1'; break; - case 2 : $filter_user = ' and u.active = 0'; break; + case 1 : $filter_user = 'u.active = 1'; break; + case 2 : $filter_user = 'u.active = 0'; break; } if (isset($_GET['groupfilter'])) { if ((int)$_GET['groupfilter'] > 0) { - $filter_group = ' and ug.group_id = '.(int)$_GET['groupfilter']; + $filter_group = 'u.user_id = ug.user_id and ug.group_id = '.(int)$_GET['groupfilter']; } } - $nr = $db->getOne("select count(distinct u.user_id) from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug where u.user_id = ug.user_id".$filter_user.$filter_group); + if ($filter_group<>'' && $filter_user<>'') { + $filter_group = 'and '.$filter_group; + } + $nr = $db->getOne("select count(distinct u.user_id)". + " from ".TBL_AUTH_USER." u ". + ($filter_group<>'' ? ", ".TBL_USER_GROUP." ug" : ""). + (($filter_group<>'' or $filter_user<>'') ? " where $filter_user $filter_group" : "")); list($selrange, $llimit) = multipages($nr, $page, "order=$order&sort=$sort&userfilter=$user_filter&groupfilter=$group_filter"); $t->assign('users', $db->getAll($db->modifyLimitQuery("select distinct u.user_id, u.first_name, u.last_name, u.email, u.login, u.created_date, u.active". - " from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug where u.user_id = ug.user_id $filter_user $filter_group". - " order by $order $sort", $llimit, $selrange))); + " from ".TBL_AUTH_USER." u". + ($filter_group<>'' ? ", ".TBL_USER_GROUP." ug" : ""). + (($filter_group<>'' or $filter_user<>'') ? " where $filter_user $filter_group" : ""). + " order by $order $sort", $llimit, $selrange))); $headers = array( 'userid' => 'user_id', |
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:09:49
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15911 Modified Files: config-dist.php include.php install.php upgrade.php Log Message: Upgrade script for phpBT 1.0 to phpBT-devel (MySQL only) Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- config-dist.php 22 Aug 2005 20:54:43 -0000 1.34 +++ config-dist.php 29 Aug 2005 19:09:39 -0000 1.35 @@ -30,7 +30,7 @@ // Database Table Config // you can change either the prefix of the table names or each table name individually -define ('CUR_DB_VERSION', 4); // the version of the database +define ('CUR_DB_VERSION', 5); // the version of the database define ('TBL_PREFIX', '{tbl_prefix}'); // the prefix for all tables, leave empty to use the old style define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions'); Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.139 retrieving revision 1.140 diff -u -r1.139 -r1.140 --- include.php 22 Aug 2005 20:50:23 -0000 1.139 +++ include.php 29 Aug 2005 19:09:40 -0000 1.140 @@ -80,6 +80,11 @@ } } +else { + if (!defined('OPEN_BUG_STATUSES')) define('OPEN_BUG_STATUSES', '0'); + if (!defined('CHARSET')) define('CHARSET', 'utf-8'); + if (!defined('STYLE')) define('STYLE', 'default'); +} require_once ('inc/db/'.DB_TYPE.'.php'); $me = $HTTP_SERVER_VARS['PHP_SELF']; Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- install.php 23 Aug 2005 21:26:14 -0000 1.51 +++ install.php 29 Aug 2005 19:09:40 -0000 1.52 @@ -225,7 +225,7 @@ $do_query = ''; } /*!! BAD! Must figure out how to get db_version from config-dist.php... */ - $query = preg_replace(array_keys($tables), array_values($tables), 'INSERT INTO TBL_CONFIGURATION (varname,varvalue,description,vartype) VALUES (\'DB_VERSION\', './*!!!*/4/*!!!*/.', \'Database Version <b>Warning:</b> Changing this might make things go horribly wrong, so don\\\'t change it.\', \'mixed\')'); + $query = preg_replace(array_keys($tables), array_values($tables), 'INSERT INTO TBL_CONFIGURATION (varname,varvalue,description,vartype) VALUES (\'DB_VERSION\', './*!!!*/5/*!!!*/.', \'Database Version <b>Warning:</b> Changing this might make things go horribly wrong, so don\\\'t change it.\', \'mixed\')'); log_query($query); if ($num_errors > 0) { Index: upgrade.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- upgrade.php 19 Jul 2005 19:25:37 -0000 1.41 +++ upgrade.php 29 Aug 2005 19:09:40 -0000 1.42 @@ -23,7 +23,6 @@ // $Id$ define ('NO_AUTH', 1); -define ('RAWERROR', true); define ('THEME', 'default'); $upgrading = true; include 'include.php'; @@ -97,6 +96,7 @@ $log_text = $tmp_log; + $upgraded = 0; if ($thisvers == CUR_DB_VERSION) $upgraded = 1; if (!$upgraded) { switch(DB_TYPE) { @@ -120,6 +120,8 @@ log_query("update ".TBL_STATUS." set bug_open = 1"); log_query("ALTER TABLE ".TBL_STATUS." alter bug_open set NOT NULL"); } + if ($thisvers < 5) { + } break; case 'mysqli' : case 'mysql' : @@ -133,6 +135,14 @@ if ($thisvers < 4) { log_query('ALTER TABLE '.TBL_STATUS.' ADD bug_open TINYINT DEFAULT \'1\' NOT NULL'); } + if ($thisvers < 5) { + log_query("create table if not exists ".TBL_PRIORITY." ( priority_id int(10) unsigned NOT NULL default '0', priority_name varchar(30) NOT NULL default '', priority_desc text NOT NULL, sort_order tinyint(3) unsigned NOT NULL default '0', priority_color varchar(10) NOT NULL default '#FFFFFF', PRIMARY KEY (priority_id) )"); + log_query("create table if not exists ".TBL_BOOKMARK." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0' )"); + log_query("alter table ".TBL_COMPONENT." ADD sort_order tinyint(3) unsigned NOT NULL default '0' AFTER active"); + log_query("alter table ".TBL_VERSION." ADD sort_order tinyint(3) unsigned NOT NULL default '0' AFTER active"); + log_query("CREATE TABLE IF NOT EXISTS ".TBL_PRIORITY."_seq (id int unsigned auto_increment not null primary key)"); + log_query("INSERT INTO ".TBL_PRIORITY."_seq values (5)"); + } break; case 'oci8' : if (true) { @@ -154,6 +164,8 @@ if ($thisvers < 4) { log_query("ALTER TABLE ".TBL_STATUS." ADD (bug_open number(1) default '1' NOT NULL)"); } + if ($thisvers < 5) { + } break; } @@ -172,6 +184,17 @@ log_query("INSERT INTO ".TBL_AUTH_PERM." (perm_id, perm_name) VALUES (3, 'EditAssignment')"); } + if ($thisvers < 5) { + log_query("INSERT INTO ".TBL_AUTH_PERM." (perm_id, perm_name) VALUES (4, 'Assignable')"); + $comment_text .= "You must set your developer group(s) to be Assignable by visiting the \"Groups\" page within the Administration Pages.<br><br>\n"; + log_query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('USE_PRIORITY_COLOR','0','Should the query list use the priority colors as the row background color','bool')"); + log_query("INSERT INTO ".TBL_PRIORITY." VALUES (1,'Low','Fix if possible',1,'#dadada')"); + log_query("INSERT INTO ".TBL_PRIORITY." VALUES (2,'Medium Low','Must fix before final',2,'#dad0d0')"); + log_query("INSERT INTO ".TBL_PRIORITY." VALUES (3,'Medium','Fix before next milestone (alpha, beta, etc.)',3,'#dac0c0')"); + log_query("INSERT INTO ".TBL_PRIORITY." VALUES (4,'Medium High','Fix as soon as possible',4,'#dab0b0')"); + log_query("INSERT INTO ".TBL_PRIORITY." VALUES (5,'High','Fix immediately',5,'#daaaaa')"); + } + /* update to current DB_VERSION */ log_query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".CUR_DB_VERSION."' WHERE varname = 'DB_VERSION'"); if ($num_errors == 0) { |
|
From: Ulf E. <ulf...@us...> - 2005-08-29 19:09:48
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15911/templates/default Modified Files: upgrade.html Log Message: Upgrade script for phpBT 1.0 to phpBT-devel (MySQL only) Index: upgrade.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/upgrade.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- upgrade.html 31 May 2005 18:50:18 -0000 1.12 +++ upgrade.html 29 Aug 2005 19:09:41 -0000 1.13 @@ -6,7 +6,7 @@ <div align="center"> <br> <br> - <?php printf(translate('This script will upgrade your database from version %s to version %s of phpBugTracker.'), '0.9.x', '1.0'); ?> + <?php printf(translate('This script will upgrade your database from version %s to version %s of phpBugTracker.'), '1.0.x', '1-devel'); ?> <br> <br> <a href="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>?doit=1"><?php echo translate('Do it!'); ?></a> |
|
From: Benjamin C. <bc...@us...> - 2005-08-27 20:19:05
|
Update of /cvsroot/phpbt/phpbt/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13229/languages Added Files: Tag: releases-1_0 it.php Log Message: Adding Italian translation from HEAD --- NEW FILE: it.php --- <?php // it.php - Italian strings and titles à éì // ------------------------------------------------------------------------ // Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // // phpBugTracker is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // phpBugTracker is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ $STRING = array( "That attachment does not exist" => "L'allegato non esite", "Please specify a file to upload" => "Prego specificare il file da caricare", "The file you specified is larger than %s bytes" => "Il file specificato é più grande di %s bytes", "The file you specified is larger than %d bytes" => "Il file specificato é più grande di %d bytes", "That bug does not exist" => "Il bug non esiste", "That attachment already exists for this bug" => "L'allegato esiste già per questo bug", "Couldn't find where to save the file!" => "Non trovo dove salvare il file!", "Couldn't create a file in the save path" => "Non posso creare il file nel percorso di salvataggio", "There was an error moving the uploaded file" => "Si é verificato un errore spostando il file caricato", "Add Attachment" => "Aggiungi allegato", "You do not have the permissions required for that function" => "Non hai i permessi richiesti per la funzione specificata", "Bug Votes" => "Voti del Bug", "You have already voted for this bug" => "Hai già votato per questo bug", "You have reached the maximum number of votes per user" => "Hai raggiunto il numero massimo dei voti per utente", "There is no history for this bug" => "Non c'é storia per questo bug", "Bug History" => "Storia del Bug", "You can not change this bug" => "Non puoi modificare questo bug", "Someone has updated this bug since you viewed it. The bug info has been reloaded with the latest changes." => "Qualcuno ha aggiornato questo bug da quando l'hai visualizzato. Le informazioni sul bug sono state ricaricate con le ultime modifiche.", "That user does not exist" => "L'utente non esiste", "That bug dependency has already been added" => "La dipendenza del bug é già stata aggiunta", "Please enter a summary" => "Prego inserire un sommario", "Please enter a description" => "Prego inserire una descrizione", "Create Bug" => "Crea bug", "View Bug" => "Visualizza Bug", "No projects found" => "Nessun progetto trovato", "Select Project" => "Seleziona Progetto", "Invalid login" => "Login non valido", "phpBugTracker Login" => "phpBugTracker Login", "Your phpBugTracker password is %s" => "La tua password phpBugTracker é %s", "Your password has been emailed to you" => "La password é stata spedita alla tua email", "No bugs found" => "Nessun bug trovato", "Bug Summary" => "Sommario Bug", "Project" => "Progetto", "Open" => "Apri", "Total" => "Totale", "Home" => "Inizio", "Please enter the host name for your database server" => "Prego inserire il nome host per il server database", "Please enter the name of the database you will be using" => "Prego inserire il nome del database che verrà utilizzato", "Please enter the user name for connecting to the database" => "Prego inserire il nome dell'utente per la connessione al database", "Please enter the phpBT email address" => "Prego inserire l'email phpBT", "Please enter the admin login" => "Prego inserire il login di amministrazione", "Please use a valid email address for the admin login" => "Prego inserire l'indirizzo email dell'amministratore", "Please enter the admin password" => "Prego inserire la password dell'amministratore", "Please confirm the admin password" => "Prego confermare la password dell'amministratore", "The admin passwords don't match" => "Le password dell'amministratore non corrispondono", "Error writing to config.php" => "Errore duranre la scrittura di config.php", "Please enter a login" => "Prego inserire il login", "Please enter a valid email" => "Prego inserire un email valido", "That login has already been used" => "Il login specificato é già in uso", "New account created" => "Creato nuovo account", "Create new account" => "Crea nuovo account", "Query Bugs" => "Ricerca Bug", "Bug List" => "Lista Bug", "Assigned To" => "Assegnato a", "Reporting" => "Report", "Bug Counts by Date" => "Conteggio Bug per data", "Your bug list column preferences have been saved" => "Le tue preferenze sulle colonne della lista dei bug sono state salvate", "Please enter a password" => "Prego inserire una password", "Those passwords don't match -- please try again" => "Le password specificate non corrispondono -- riprovare prego", "Password changed" => "Password modificata", "Changes Saved" => "Modifiche salvate", "Preferences changed" => "Preferenze modificate", "Receive notifications of bug changes via email" => "Ricevi notifiche sulle modifiche del bug via email", "Show saved queries on the homepage" => "Mostra le interrogazioni salvate sulla pagina iniziale", "User preferences" => "Preferenze utente", "Configuration" => "Configurazione", "Please enter a name" => "Prego inserire un nome", "Edit Database" => "Modifica Database", "Database List" => "Lista Database", "Edit Group" => "Modifica Grouppo", "Group List" => "Lista Gruppi", "Edit Operating System" => "Modifica Sistema Operativo", "Operating System List" => "Lista Sistemi Operativi", "Please enter a version" => "Prego inserire una versione", "Edit Version" => "Modifica Versione", "Edit Component" => "Modifica Componente", "You cannot choose specific groups when \"All Groups\" is chosen" => "Non puoi scegliere gruppi specifici quando é stato scelto \"All Groups\"", "Edit Project" => "Modifica Progetto", "Project List" => "Lista Progetti", "Edit Resolution" => "Modifica Soluzione", "Resolution List" => "Lista soluzioni", "Edit Severity" => "Modifica severità ", "Severity List" => "Lista severità ", "Edit Site" => "Modifica Sito", "Site List" => "Lista Siti", "Edit Status" => "Modifica Stato", "Status List" => "Lista Stati", "Please enter an email" => "Prego inserire un email", "Edit User" => "Modifica Utente", "User List" => "Lista Utenti", "Name" => "Nome", "Description" => "Descrizione", "Owner" => "Proprietario", "None" => "Nessuno", "Active" => "Attivo", "Submit" => "Invio", "Add new project" => "Aggiungi nuovo progetto", "Created Date" => "Data Creazione", "Yes" => "Sì", "No" => "No", "Variable" => "Variabile", "Value" => "Valore", "Information" => "Informazione", "description" => "Descrizione", "Sort Order" => "Ordinamento", "Database list" => "Lista database", "Add new database" => "Aggiungi nuovo database", "Are you sure you want to delete this item?" => "Sei sicuro di voler eliminare questo elemento?", "Delete" => "Elimina", "Add new group" => "Aggiungi nuovo gruppo", "Users" => "Utenti", "Locked" => "Bloccato", "This will remove all user assignments to this group and the group itself. Continue?" => "Questo rimuoverà il gruppo stesso e tutte le assegnazioni di utenti a questo gruppo. Continuare?", "This will remove all user assignments to this group. Continue?" => "Questo rimuoverà tutte le assegnazioni di utenti a questo gruppo. Continuare?", "Purge" => "Elimina", "Assignable" => "Assegnabile", "Find Bug" => "Cerca Bug", "Projects" => "Progetti", "Groups" => "Grouppi", "Documentation" => "Documentazione", "User Tools" => "Strumenti Utente", "Statuses" => "Stati", "Resolutions" => "Soluzioni", "Severities" => "Severità ", "Operating Systems" => "Sistemi Operativi", "Databases" => "Database", "Sites" => "Siti", "Regex" => "Espressione regolare", "Add new operating system" => "Aggiungi nuovo Sistema Operativo", "Are you sure you want to delete this OS" => "Sei sicuro di voler elimare questo SO", "Items with a Sort Order = 0 will not be selectable by users." => "Gli elementi con Ordinamento = 0 non saranno selezionabili dagli utenti.", "Only those items that have no bugs referencing them can be deleted." => "Solo gli elementi con non hanno bug collegati possono essere eliminati.", "Project Information" => "Informazioni sul Progetto", "Version Information" => "Informazioni sulla Versione", "Initial Version" => "Versione iniziale", "Component Information" => "Informazioni sui componenti", "Initial Component Name" => "Nome componente iniziale", "Only users in the following groups can see this project" => "Solo gli utenti nei gruppi seguenti potranno vedere questo progetto", "These developers can administer this project" => "Questi sviluppatori possono amministrare questo progetto", "Versions" => "Versioni", "Add new version" => "Aggiungi nuova versione", "Version" => "Versione", "Created" => "Creato", "No versions found" => "Nessuna versione trovata", "Components" => "Componenti", "Add new component" => "Aggiungi nuovo componente", "Component" => "Componente", "No components found" => "Nessun componente trovato", "Add new resolution" => "Aggiungi nuova soluzione", "Are you sure you want to delete this resolution?" => "Sei sicuro di voler eliminare questa soluzione?", "Row Color" => "Colore Riga", "Add new severity" => "Aggiungi nuova severità ", "Are you sure you want to delete this severity?" => "Sei sicuro di voler eliminare questa severità ?", "Add new site" => "Aggiungi nuovo sito", "Open/Closed" => "Aperto/Chiuso", "Closed" => "Chiuso", "Add new status" => "Aggiungi nuovo stato", "Login" => "Login", "Email" => "Email", "First Name" => "Nome", "Last Name" => "Cognome", "Password" => "Password", "User Groups" => "Gruppi utenti", "Email Notify" => "Notifica Email", "Add new user" => "Aggiungi nuovo utente", "Filter" => "Filtro", "Bug" => "Bug", "Reporter" => "Reporter", "Assigned to" => "Assignato a", "Status" => "Stato", "Resolution" => "Soluzione", "Severity" => "Severità ", "Priority" => "Priorità ", "Operating System" => "Sistema Operativo", "Summary" => "Sommario", "URL" => "URL", "Depends on bugs" => "Depende dai bug", "Blocks bugs" => "Blocca i bug", "Comments" => "Commenti", "Posted by" => "Inviato da", "Back to bug" => "Ritorna al bug", "You must login to modify this bug" => "Devi accedere per modificare questo bug", "Return to bug list" => "Returna alla lista dei bug", "Previous bug" => "Bug precedente", "Next bug" => "Bug successivo", "To be closed in version" => "Da chiudere nella versione", "Choose one" => "Sceglierne uno", "Database" => "Database", "Closed in version" => "Chiuso nella versione", "Site" => "Sito", "Add CC" => "Aggiungi CC", "Add dependency" => "Aggiungi dipendenza", "Remove dependency" => "Rimuovi dependenza", "Remove selected CCs" => "Rimuovi CC selezionati", "Additional comments" => "Commenti aggiuntivi", "Supress notification email" => "Sopprimi notifica email", "Attachments" => "Allegati", "Create new attachment" => "Crea nuovo allegato", "Size" => "Dimensione", "Type" => "Tipo", "Are you sure you want to delete this attachment?" => "Sei sicuro di voler eliminare questo allegato?", "No attachments found for this bug" => "Non é stato trovato nessun allegato per questo bug", "Vote for this bug" => "Vota per questo bug", "View votes" => "Visualizza voti", "View bug history" => "Mostra storia del bug", "Date" => "Data", "Who" => "Chi", "What" => "Cosa", "Old Value" => "Vecchio valore", "New Value" => "Nuovo valore", "When" => "Quando", "No history found for this bug" => "Storia non trovata per questo bug", "Download to spreadsheet" => "Scarica su foglio di calcolo", "No votes found for this bug" => "Nessun voto trovato per questo bug", "Back" => "Indietro", "Five most recently submitted bugs" => "I cinque bug segnalati più di recente", "Five most recently closed bugs" => "I cinque bug chiusi più di recente", "Saved Queries" => "Interrogazioni Salvate", "The image path is not writeable" => "Il percorso dell'immagine non é scrivibile", "Quick Stats" => "Statistiche Brevi", "# bugs" => "# bug", "phpBugTracker Installation" => "Installazione phpBugTracker", "DB Test Failure" => "Test DB fallito", "The installation script could not connect to the database <b>%s</b> on the host <b>%s</b> using the specified username and password.<br>Please check these details are correct and that the database already exists then retry." => "Lo script d'installazione non si é potuto connettere al database <b>%s</b> sull'host <b>%s</b> usando l'utente e la password specificata.<br>Prego verificare che queste informazioni siano corrette e che il database sia esistente quindi riprovare.", "DB Test Success" => "Test DB eseguito con successo", "The installation script successfully connected to the database <b>%s</b> on the host <b>%s</b> using the specified username and password.<br>Congratulations!" => "Lo script di installazione si é connesso con successo al database <b>%s</b> sull'host <b>%s</b> usando l'utente e la password specificati.<br>Congratulations!", "Close window" => "Chiudi finestr", "Database Options" => "Opzioni Database", "Database Name" => "Nome Database", "This database must already exist" => "Questo database deve essere già esistente", "User" => "Utente", "Table Prefix" => "Prefisso Tabelle", "Test Database Connection" => "Verifica Connessione al Database", "phpBT Email" => "Email phpBT", "The email address used for sending bug updates, etc." => "Indirizzo email usato per inviare aggiornamenti su bug, etc.", "Admin Login" => "Login Amministratore", "Must be a valid email address" => "L'indirizzo email deve essere valido", "Admin Password" => "Password Amministratore", "Confirm Password" => "Conferma Password", "Encrypt Passwords in DB" => "Cifratura Password nel DB", "When you submit the form, the database tables will be created and config.php will be saved to disk. You will then be able to login and use the bug tracker." => "Quando confermerai il questa maschera, verranno create le tabelle sul database e il file config.php verrà salvato sul disco. Fatto questo potrai accedere ed usare il sistema di gestione dei bug.", "Since config.php is not writeable by this script, when you submit this form you will be prompted to save config.php. Copy this file to the location of the bug tracker, and then you will be able to <a href=\index.php\>login to the bug tracker</a>. From the home page you can go to the Admin Tools and customize your installation via the Configuration link. Once you have completed the configuration, you will be ready to add a project and start reporting bugs!" => "Poiché il file config.php non é scrivibile da questo script, quando confermi questo form ti verrà richiesto di salvare config.php. Copia questo file dove hai installato il sistema di gestione bug, e successivamente potrai <a href=\index.php\>accedere al sistema di gestione bug</a>. Dalla pagina iniziale potrai andare agli Strumenti di Amministrazione e personalizzare la tua installazione seguendo il link Configurazione. Una volta completata la configurazione, sarai pronto ad aggiungere un progetto e iniziare a segnalare i bug!", "Save Options" => "Salva Opzioni", "User Login" => "Login Utente", "Invalid login and/or password" => "Login e/o password non validi", "Your password has been mailed to you" => "Ti é stata spedita la tua password", "Email my password" => "Inviami la password per email", "Open a new account" => "Apri un nuovo account", "You have been logged out" => "Hai eseguito il logout", "Return to phpBugTracker home" => "Ritorna alla pagina iniziale di phpBugTracker", "Sorry, but the self-creation of new accounts has been disabled. Please contact the administrator to have an account created for you." => "Spiacente, ma la creazione automatica dei nuovi account é stato disabilitato. Prego contattare l'amministratore per richiedere la creazione dell'account.", "Create a new account" => "Crea nuovo account", "optional" => "opzionale", "Thanks for creating an account. Check your email for your password." => "Grazie di aver creato l'account. Controlla la posta verificare se hai ricevuto la password.", "First, you must pick a product on which to enter a bug." => "Innanzitutto, devi selezionare un prodotto per il quale segnalare il bug.", "All" => "Tutti", "Sort by" => "Ordina per", "Bug number" => "Bug number", "Ascending" => "Crescente", "Descending" => "Decrescente", "Save this query as" => "Salva questa interrogazione come", "Reset to default query" => "Reimposta l'interrogazione ai valori di default", "Are you sure you want to delete this saved query?" => "Sei sicuro di voler eliminare l'interrogazione salvata?", "Go to the advanced query page" => "Vai alla pagina interrogazioni avanzate", "Reported on Site" => "Segnalato sul sito", "matching as" => "corrispondenza come", "regexp" => "regexp", "not regexp" => "not regexp", "substring" => "sottostringa", "exact" => "esatta", "A description entry" => "Come voce descrittiva", "Created Date Range" => "Intervallo data creazione", "to" => "a", "Closed in Version" => "Chiuso nella versione", "To be Closed in Version" => "Da chiudere nella versione", "Sort By" => "Ordina per", "Go to the simple query page" => "Vai alla pagina interrogazione semplice", "Show bug statistics for the selected project" => "Mostra le statistiche dei bug per il progetto selezionato", "All projects" => "Tutti i progetti", "Go" => "Vai", "Bug Resolutions" => "Soluzioni Bug", "Unassigned" => "Non assegnato", "Upgade phpBugTracker" => "Aggiorna phpBugTracker", "Your database has been updated." => "Il vostro database é stato aggiornato.", "phpBugTracker home" => "Pagina iniziale phpBugTracker", "This script will upgrade your database from version %s to version %s of phpBugTracker." => "Questo script aggiornerà il database dalla versione %s alla versione %s di phpBugTracker.", "Do it!" => "Esegui!", "Change Password" => "Cambia Password", "Enter new password" => "Inserire nuova password", "Verify password" => "Verifica password", "Change Preferences" => "Cambia Preferenze", "Number of results per page" => "Numbero di risultati per pagina", "Bug List Columns" => "Colonne nella lista bug", "Choose the fields you want to see in the bug list" => "Scegli i campi che vuoi vedere nella lista bug", "Votes" => "Voti", "Are you sure you want to delete this vote?" => "Sei sicuro di voler eliminare questo voto?", "Add a new bug" => "Aggiungi nuovo bug", "View Reports" => "Mostra Interogazioni", "Create a New Account" => "Crea un nuovo account", "Read Documentation" => "Leggi la documentazione", "Administration Tools" => "Strumenti di Amministrazione", "Email Password" => "Invia Password per Email", "Forgot your password? Have it sent to you" => "Hai dimenticato la password? Ricevila per email", "Remember %s for next time" => "Ricorda %s per la prossima volta", "Remember me" => "Ricordati di me", "Bugs assigned to me" => "Bugs assegnati a me", "Bugs reported by me" => "Bugs segnalati da me", "Personal Page" => "Pagina Personale", "Logout %s" => "Logout %s", "You do not have the rights to view this project." => "Non hai i permessi per vedere questo progetto.", "Unable to load JPGraph" => "Impossibile caricare JPGraph", "Unable to load JPGraph pie class" => "Impossibile caricare JPGraph pie class", "There was a problem when trying to use the JPGraph library. Please fix or disable by setting 'USE_JPGRAPH' to 'NO' on the Configuration page of the Administration Tools." => "Si é verificato un problema cercando di usare la libreria JPGraph. Prego correggere il problema o disabilitarla impostando 'USE_JPGRAPH' a 'NO' nella pagina Configurazione degli Strumenti di Amministrazione.", ); ?> |
|
From: Benjamin C. <bc...@us...> - 2005-08-27 20:17:16
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13011/inc Modified Files: Tag: releases-1_0 functions.php Log Message: Bringing in fix from HEAD for db_concat() Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.54 retrieving revision 1.54.2.1 diff -u -r1.54 -r1.54.2.1 --- functions.php 20 Jul 2005 18:47:25 -0000 1.54 +++ functions.php 27 Aug 2005 20:17:07 -0000 1.54.2.1 @@ -494,6 +494,7 @@ $pieces = func_get_args(); switch(DB_TYPE) { + case 'mysqli' : case 'mysql' : $retstr = 'concat('. delimit_list(', ', $pieces).')'; break; case 'pgsql' : case 'oci8' : |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:51:49
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4494/inc Modified Files: functions.php Log Message: Adding 'mysqli' to db_concat() Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- functions.php 27 Aug 2005 13:14:28 -0000 1.62 +++ functions.php 27 Aug 2005 13:51:42 -0000 1.63 @@ -497,6 +497,7 @@ $pieces = func_get_args(); switch(DB_TYPE) { + case 'mysqli' : case 'mysql' : $retstr = 'concat('. delimit_list(', ', $pieces).')'; break; case 'pgsql' : case 'oci8' : |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:29:11
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32706 Modified Files: bugemail-newbug.txt bugemail.txt Log Message: Bug #1256056 - plain text Bug Emails contain html encoded characters.. Fix submitted by Brian May Index: bugemail-newbug.txt =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugemail-newbug.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- bugemail-newbug.txt 25 Oct 2004 12:07:04 -0000 1.4 +++ bugemail-newbug.txt 27 Aug 2005 13:28:59 -0000 1.5 @@ -6,7 +6,7 @@ Bug #: <?php echo $bugid; ?> (<?php echo $bugurl; ?>) Reported By: <?php echo $reporter."\n"; ?> ---------------------------------------------------------------------------- - Summary: <?php echo $title."\n"; ?> + Summary: <?php echo html_entity_decode($title)."\n"; ?> URL: <?php echo $url."\n"; ?> Product: <?php echo $project_id."\n"; ?> Version: <?php echo $version_id."\n"; ?> @@ -24,6 +24,6 @@ COMMENTS ----- Posted by <?php echo $oldpostedby; ?> at <?php echo $oldpostedon; ?> ----- -<?php echo $oldcomments."\n"; ?> +<?php echo html_entity_decode($oldcomments)."\n"; ?> <?php } ?> Index: bugemail.txt =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugemail.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- bugemail.txt 25 Oct 2004 12:07:04 -0000 1.6 +++ bugemail.txt 27 Aug 2005 13:28:59 -0000 1.7 @@ -6,7 +6,7 @@ Bug #: <?php echo $bugid; ?> (<?php echo $bugurl; ?>) <?php echo $reporter_stat; ?> Reported By: <?php echo $reporter."\n"; ?> ---------------------------------------------------------------------------- -<?php echo $title_stat; ?> Summary: <?php echo $title."\n"; ?> +<?php echo $title_stat; ?> Summary: <?php echo html_entity_decode($title)."\n"; ?> <?php echo $url_stat; ?> URL: <?php echo $url."\n"; ?> <?php echo $project_id_stat; ?> Product: <?php echo $project_id."\n"; ?> <?php echo $version_id_stat; ?> Version: <?php echo $version_id."\n"; ?> @@ -26,9 +26,9 @@ COMMENTS ----- Posted by <?php echo $oldpostedby; ?> at <?php echo $oldpostedon; ?> ----- -<?php echo $oldcomments."\n"; ?> +<?php echo html_entity_decode($oldcomments)."\n"; ?> ----- Posted by <?php echo $newpostedby; ?> at <?php echo $newpostedon; ?> ----- -<?php echo $newcomments."\n"; ?> +<?php echo html_entity_decode($newcomments)."\n"; ?> <?php } ?> |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:17:44
|
Update of /cvsroot/phpbt/phpbt/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30283 Added Files: it.php Log Message: Updated Italian translation by Alessandro Staltari. |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:14:44
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29692/phpbt/inc Modified Files: auth.php functions.php Log Message: Various permission related fixes. Index: auth.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- auth.php 4 Jun 2005 18:56:55 -0000 1.21 +++ auth.php 27 Aug 2005 13:14:28 -0000 1.22 @@ -126,13 +126,21 @@ } } - function have_perm_proj($project_id) { + function have_perm_proj($project_id = -1) { global $db; if ($this->have_perm('Admin')) { return true; } + if ($project_id == -1) { + if ( $db->getCol('SELECT user_id FROM '.TBL_PROJECT_PERM.' WHERE user_id = '.$_SESSION['uid']) ) { + return true; + } else { + return false; + } + } + if ( $db->getCol('SELECT user_id FROM '.TBL_PROJECT_PERM.' WHERE user_id = '.$_SESSION['uid']." AND project_id = $project_id") ) { return true; } else { Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- functions.php 22 Aug 2005 20:54:43 -0000 1.61 +++ functions.php 27 Aug 2005 13:14:28 -0000 1.62 @@ -308,6 +308,7 @@ global $db; switch($var) { + case 'reporter' : case 'assigned_to' : return maskemail($db->getOne("select login from ".TBL_AUTH_USER." where user_id = ".$db->quote($val))); break; @@ -318,7 +319,7 @@ /// /// Divide the results of a database query into multiple pages function multipages($nr, $page, $urlstr) { - global $me, $selrange, $t, $u, $db, $perm; + global $me, $selrange, $t, $u, $db, $perm, $auth; $pages = ''; if (!$page) $page = 1; @@ -327,7 +328,7 @@ $llimit = 0; $page = 0; } else { - if ($perm->check_auth('group', 'Users')) + if ($auth->is_authenticated()) $selrange = $db->getOne('select def_results from '.TBL_USER_PREF.' where user_id = '.$db->quote($u)); $llimit = ($page-1)*$selrange; } |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:14:44
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29692/phpbt/templates/default Modified Files: bugdisplay.html bugform.html wrap.html Log Message: Various permission related fixes. Index: bugdisplay.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- bugdisplay.html 22 Aug 2005 20:30:56 -0000 1.50 +++ bugdisplay.html 27 Aug 2005 13:14:28 -0000 1.51 @@ -128,7 +128,7 @@ <td><select name="resolution_id" <?php echo $disabled ?>><option value="0"><?php echo translate("None"); ?></option><?php build_select('resolution', $resolution_id) ?></select></td> </tr><tr> <td><?php echo translate("Assigned to"); ?>:</td> - <?php if (isset($perm) && $perm->have_perm('EditAssignment')) { ?> + <?php if (isset($perm) && ($perm->have_perm('EditAssignment') or $perm->have_perm_proj($project_id))) { ?> <td><select name="assigned_to" <?php echo $disabled ?>><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', $assigned_to) ?></select></td> <?php } else { ?> <td> @@ -210,7 +210,7 @@ <td align="center"><?php echo $attachments[$i]['mime_type']; ?></td> <td align="center"><?php echo date(DATE_FORMAT, $attachments[$i]['created_date']); ?></td> <td align="center"><a href='attachment.php?attachid=<?php echo $attachments[$i]['attachment_id']; ?>'>View</a> - <?php if (isset($perm) and $perm->have_perm('Administrator')) { ?> + <?php if (isset($perm) and $perm->have_perm_proj($project_id)) { ?> | <a href='attachment.php?del=<?php echo $attachments[$i]['attachment_id']; ?>' onClick="return confirm('<?php echo translate("Are you sure you want to delete this attachment?"); ?>');"><?php echo translate("Delete"); ?></a> <?php } ?> </td> Index: bugform.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugform.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- bugform.html 20 Jul 2005 18:01:33 -0000 1.12 +++ bugform.html 27 Aug 2005 13:14:28 -0000 1.13 @@ -10,6 +10,8 @@ if (!isset($database)) $database = ''; if (!isset($site)) $site = ''; if (!isset($os)) $os = ''; + + $reporter = $reporter ? $reporter : $u ?> <form action="bug.php" method="post" enctype="multipart/form-data"> <table border="0"> @@ -33,9 +35,15 @@ <?php echo translate("Reporter"); ?>: </td> <td> + <?php if (isset($perm) and $perm->have_perm_proj($project)) { ?> <select name="reporter"> <?php build_select('reporter', $reporter) ?> </select> + <?php } + else { + echo lookup('reporter', $reporter); + } ?> + <input type="hidden" name="reporter" value="<?php echo $reporter ?>"> </td> </tr> <tr> Index: wrap.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/wrap.html,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- wrap.html 22 Aug 2005 20:30:56 -0000 1.32 +++ wrap.html 27 Aug 2005 13:14:28 -0000 1.33 @@ -26,7 +26,7 @@ <li><a href="report.php"><?php echo translate("View Reports"); ?></a></li> <?php if (!NEW_ACCOUNTS_DISABLED && empty($_SESSION['uid'])) { ?><li><a href="newaccount.php"><?php echo translate("Create a New Account"); ?></a></li><?php } ?> <li><a href="docs/html/userguide.html"><?php echo translate("Read Documentation"); ?></a></li> - <?php if (isset($perm) && $perm->have_perm('Administrator')) { ?><li><a href="admin/project.php"><?php echo translate("Administration Tools"); ?></a></li><?php } ?> + <?php if (isset($perm) && $perm->have_perm_proj()) { ?><li><a href="admin/project.php"><?php echo translate("Administration Tools"); ?></a></li><?php } ?> </ul> </div> |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:14:44
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29692/phpbt/templates/default/admin Modified Files: project-edit.html projectlist.html Log Message: Various permission related fixes. Index: project-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-edit.html,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- project-edit.html 22 Aug 2005 20:21:42 -0000 1.15 +++ project-edit.html 27 Aug 2005 13:14:28 -0000 1.16 @@ -65,7 +65,7 @@ <input type="checkbox" name="active" value="1" <?php if($active) echo 'checked'; ?>> </td> </tr> -<?php if(isset($perm) and $perm->have_perm('Administrator')) { ?> +<?php if(isset($perm) and $perm->have_perm('Admin')) { ?> <tr> <td> <?php echo translate("These developers can administer this project"); ?>: @@ -80,7 +80,7 @@ <td> <?php echo translate("These developers can administer this project"); ?>: <br> - <?php for ($i = 0, $count = count($project_admins); $i < $count; $i++) echo $project_developers[$i].'<br />'; ?> + <?php for ($i = 0, $count = count($project_admins); $i < $count; $i++) echo $project_admins[$i].'<br />'; ?> </td> </tr> <?php } ?> Index: projectlist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/projectlist.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- projectlist.html 25 Oct 2004 12:07:03 -0000 1.9 +++ projectlist.html 27 Aug 2005 13:14:28 -0000 1.10 @@ -2,7 +2,7 @@ <tr> <td valign="top"> <b> <?php echo $page_title; ?></b> - <?php if (isset($perm) and $perm->have_perm('Administrator')) + <?php if (isset($perm) and $perm->have_perm('Admin')) echo " - <a href=\"{$_SERVER['SCRIPT_NAME']}?op=add\">".translate("Add new project")."</a>"; ?> <hr size="1"> @@ -15,7 +15,7 @@ <?php for ($i = 0, $count = count($projects); $i < $count; $i++) { ?> <tr> <td> - <?php if (isset($perm) and ($perm->have_perm('Administrator') or $perm->have_perm_proj($projects[$i]['project_id']))) { ?> + <?php if (isset($perm) and ($perm->have_perm('Admin') or $perm->have_perm_proj($projects[$i]['project_id']))) { ?> <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&id=<?php echo $projects[$i]['project_id']; ?>"><?php echo stripslashes($projects[$i]['project_name']); ?></a> <?php } else { echo stripslashes($projects[$i]['project_name']); } ?> </td> |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:14:44
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29692/phpbt/admin Modified Files: project.php Log Message: Various permission related fixes. Index: project.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- project.php 22 Aug 2005 20:21:42 -0000 1.48 +++ project.php 27 Aug 2005 13:14:28 -0000 1.49 @@ -247,7 +247,7 @@ else $t->assign('error', $error); $t->assign('project_groups', $db->getCol('select group_id from '.TBL_PROJECT_GROUP." where project_id = $projectid")); - if ($perm->have_perm('Administrator')) { + if ($perm->have_perm('Admin')) { $t->assign('project_admins', $db->getCol('select user_id from '.TBL_PROJECT_PERM." where project_id = $projectid")); |
|
From: Ulf E. <ulf...@us...> - 2005-08-27 13:14:44
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29692/phpbt Modified Files: attachment.php bug.php Log Message: Various permission related fixes. Index: attachment.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/attachment.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- attachment.php 20 Jul 2005 18:48:01 -0000 1.25 +++ attachment.php 27 Aug 2005 13:14:28 -0000 1.26 @@ -156,7 +156,7 @@ } if (isset($_GET['del'])) { - if (!$perm->have_perm('Administrator')) { + if (!$perm->have_perm('Admin')) { show_text(translate("You do not have the permissions required for that function")); } else { del_attachment($_GET['del']); Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.143 retrieving revision 1.144 diff -u -r1.143 -r1.144 --- bug.php 22 Aug 2005 20:54:43 -0000 1.143 +++ bug.php 27 Aug 2005 13:14:28 -0000 1.144 @@ -355,7 +355,7 @@ // Should we allow changes to be made to this bug by this user? if (STRICT_UPDATING and !($u == $buginfo['assigned_to'] or - $u == $buginfo['created_by'] or $perm->have_perm('Manager'))) { + $u == $buginfo['created_by'] or $perm->have_perm_proj($project_id))) { show_bug($bugid,array('status' => translate("You can not change this bug"))); return; } @@ -558,7 +558,7 @@ } function show_form($bugid = 0, $error = '') { - global $db, $t; + global $db, $t, $u; $projectname = $db->getOne("select project_name from ".TBL_PROJECT." where project_id = '{$_GET['project']}'"); if ($bugid && !$error) { @@ -566,6 +566,7 @@ } else { $t->assign($_POST); $t->assign(array( + 'u' => $u, 'error' => $error, 'project' => $_GET['project'], 'projectname' => $projectname |
|
From: Ulf E. <ulf...@fa...> - 2005-08-23 21:29:12
|
* Ulf Erikson [2005-08-22 23:28]: > This is just a minor warning or heads up if someone wish to play with > them: The update script is not ready yet not is support for Oracle or > Postgres. Hopefully this will be added "soon". I have updated inc/db/*.php and schemas/*.in. Things might work in Oracle and Postgres now. I have no way to test it myself.. Any volunteers? ;-) Still no update of upgrade.php. > Have fun, > /Ulf > > > * Ulf Erikson [2005-08-22 23:04]: > >> Index: CHANGELOG >> =================================================================== >> RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v >> retrieving revision 1.70 >> retrieving revision 1.71 >> diff -u -r1.70 -r1.71 >> --- CHANGELOG 3 Aug 2005 12:32:31 -0000 1.70 >> +++ CHANGELOG 22 Aug 2005 21:04:39 -0000 1.71 >> @@ -1,3 +1,12 @@ >> +-- 1.x -- +: Moved priority levels into a table >> +: Changed the 'Assignable' bit to a group permission >> +: Added sort-order to components and versions >> +: Added support to bookmark/monitor a set of bugs >> +: Added a simple UI to edit group permissions >> +: Added support to (re)edit a query >> +: Added support for sending smtp mail >> + >> -- 1.0 -- 3 Aug 2005 >> : Added links from project summary on home page (Phil Davis). >> : Added display of the bug ids a bug blocks. |
|
From: Ulf E. <ulf...@us...> - 2005-08-23 21:26:26
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26361/phpbt Modified Files: install.php Log Message: Use '#' as comment char in schemas/*.in Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- install.php 22 Aug 2005 20:30:56 -0000 1.50 +++ install.php 23 Aug 2005 21:26:14 -0000 1.51 @@ -215,6 +215,7 @@ $do_query = ''; foreach ($queries as $query) { // First, collect multi-line queries into one line, then run the query + if ($query{0} == '#') continue; $do_query .= chop($query); if (empty($do_query) or substr($do_query, -1) != ';') continue; if ($_POST['db_type'] == 'oci8' ) { |
|
From: Ulf E. <ulf...@us...> - 2005-08-23 21:12:51
|
Update of /cvsroot/phpbt/phpbt/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23167/phpbt/schemas Modified Files: mssql.in mysql.in oci8.in pgsql.in Log Message: Updates Index: mssql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mssql.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mssql.in 23 Aug 2005 21:09:42 -0000 1.2 +++ mssql.in 23 Aug 2005 21:12:38 -0000 1.3 @@ -26,7 +26,6 @@ group_id smallint NOT NULL default '0', group_name varchar(80) NOT NULL default '', locked bit NOT NULL default '0', - assignable bit NOT NULL default '0', created_by smallint NOT NULL default '0', created_date int NOT NULL default '0', last_modified_by smallint NOT NULL default '0', @@ -69,6 +68,14 @@ #-- +# TBL_BOOKMARK +CREATE TABLE TBL_BOOKMARK ( + user_id smallint NOT NULL default '0', + bug_id smallint NOT NULL default '0' +); + + +#-- # TBL_BUG CREATE TABLE TBL_BUG ( bug_id smallint NOT NULL default '0', @@ -170,6 +177,7 @@ component_desc text NOT NULL, owner smallint NOT NULL default '0', active bit NOT NULL default '1', + sort_order tinyint NOT NULL default '0', created_by smallint NOT NULL default '0', created_date int NOT NULL default '0', last_modified_by smallint NOT NULL default '0', @@ -220,6 +228,18 @@ #-- +# TBL_PRIORITY +CREATE TABLE TBL_PRIORITY ( + priority_id tinyint NOT NULL default '0', + priority_name varchar(30) NOT NULL default '', + priority_desc text NOT NULL, + sort_order tinyint NOT NULL default '0', + priority_color varchar(10) NOT NULL default '#FFFFFF', + PRIMARY KEY (priority_id) +); + + +#-- # TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id smallint NOT NULL default '0', @@ -349,6 +369,7 @@ project_id smallint NOT NULL default '0', version_name char(30) NOT NULL default '', active bit NOT NULL default '1', + sort_order tinyint NOT NULL default '0', created_by smallint NOT NULL default '0', created_date int NOT NULL default '0', last_modified_by smallint NOT NULL default '0', @@ -373,23 +394,28 @@ # Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); -INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1); +INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1); CREATE TABLE TBL_AUTH_GROUP_seq ([id] [int] IDENTITY (3, 1) NOT NULL, [vapor] [int] NULL) -# ... and three permissions +# ... and four permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment'); +INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (4, 'Assignable'); -# Admins can do all the admin stuff, and +# Admins can do all the admin stuff, INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); -# users can edit bugs +# users can edit bugs, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); +# developers are users who can own bugs +INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 2); +INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 4); + # Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); @@ -412,6 +438,7 @@ INSERT INTO TBL_CONFIGURATION VALUES ('MASK_EMAIL','1','Should email addresses have . changed to ''dot'' and @ change to ''at''?','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('HIDE_EMAIL','1','Should email addresses be hidden for those not logged in?','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('USE_SEVERITY_COLOR','1','Should the query list use the severity colors as the row background color (like SourceForge)','bool'); +INSERT INTO TBL_CONFIGURATION VALUES ('USE_PRIORITY_COLOR','0','Should the query list use the priority colors as the row background color','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_IS_LOGIN','1','Whether to use email addresses as logins','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('STRICT_UPDATING', '0', 'Only the bug reporter, bug owner, managers, and admins can change a bug', 'bool'); INSERT INTO TBL_CONFIGURATION VALUES ('NEW_ACCOUNTS_DISABLED', '0', 'Only admins can create new user accounts - newaccount.php is disabled', 'bool'); @@ -504,6 +531,19 @@ # +# -- Initialize the PRIORITY table -- +# + +INSERT INTO TBL_PRIORITY VALUES (1,'Low','Fix if possible',1,'#dadada'); +INSERT INTO TBL_PRIORITY VALUES (2,'Medium Low','Must fix before final',2,'#dad0d0'); +INSERT INTO TBL_PRIORITY VALUES (3,'Medium','Fix before next milestone (alpha, beta, etc.)',3,'#dac0c0'); +INSERT INTO TBL_PRIORITY VALUES (4,'Medium High','Fix as soon as possible',4,'#dab0b0'); +INSERT INTO TBL_PRIORITY VALUES (5,'High','Fix immediately',5,'#daaaaa'); + +CREATE TABLE TBL_PRIORITY_seq ([id] [int] IDENTITY (5, 1) NOT NULL, [vapor] [int] NULL) + + +# # -- Initialize the STATUS table -- # Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- mysql.in 23 Aug 2005 21:09:42 -0000 1.50 +++ mysql.in 23 Aug 2005 21:12:38 -0000 1.51 @@ -360,11 +360,11 @@ #-- # TBL_USER_PREF CREATE TABLE TBL_USER_PREF ( - user_id int(11) NOT NULL default '0', - email_notices tinyint(1) NOT NULL default '1', - saved_queries tinyint(1) NOT NULL default '1', - def_results int(11) NOT NULL default '20', - PRIMARY KEY (user_id) + user_id int(11) NOT NULL default '0', + email_notices tinyint(1) NOT NULL default '1', + saved_queries tinyint(1) NOT NULL default '1', + def_results int(11) NOT NULL default '20', + PRIMARY KEY (user_id) ) TYPE=MyISAM; Index: oci8.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/oci8.in,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- oci8.in 23 Aug 2005 21:09:42 -0000 1.29 +++ oci8.in 23 Aug 2005 21:12:38 -0000 1.30 @@ -30,7 +30,6 @@ created_date number(20) default '0' NOT NULL, last_modified_by number(10) default '0' NOT NULL, last_modified_date number(20) default '0' NOT NULL, - assignable number(1) default '0' NOT NULL, PRIMARY KEY (group_id) ) ; @@ -68,6 +67,14 @@ #-- +# TBL_BOOKMARK +CREATE TABLE TBL_BOOKMARK ( + user_id number(10) default '0' NOT NULL, + bug_id number(10) default '0' NOT NULL +); + + +#-- # TBL_BUG CREATE TABLE TBL_BUG ( bug_id number(10) default '0' NOT NULL, @@ -173,6 +180,7 @@ component_desc varchar2(4000) NOT NULL, owner number(10) default '0' NOT NULL, active number(1) default '1' NOT NULL, + sort_order number(3) default '0' NOT NULL, created_by number(10) default '0' NOT NULL, created_date number(20) default '0' NOT NULL, last_modified_by number(10) default '0' NOT NULL, @@ -193,6 +201,16 @@ #-- +# TBL_DATABASE +CREATE TABLE TBL_DATABASE ( + database_id number(3) default '0' NOT NULL, + database_name varchar2(40) default '' NOT NULL, + sort_order number(3) default '0' NOT NULL, + PRIMARY KEY (database_id) +); + + +#-- # TBL_GROUP_PERM CREATE TABLE TBL_GROUP_PERM ( group_id number(10) default '0' NOT NULL, @@ -215,6 +233,18 @@ #-- +# TBL_PRIORITY +CREATE TABLE TBL_PRIORITY ( + priority_id number(3) default '0' NOT NULL, + priority_name varchar2(30) default '' NOT NULL, + priority_desc varchar2(4000) NOT NULL, + sort_order number(3) default '0' NOT NULL, + priority_color varchar2(10) default '#FFFFFF' NOT NULL, + PRIMARY KEY (priority_id) +); + + +#-- # TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id number(10) default '0' NOT NULL, @@ -285,6 +315,16 @@ #-- +# TBL_SITE +CREATE TABLE TBL_SITE ( + site_id number(3) default '0' NOT NULL, + site_name varchar2(50) default '' NOT NULL, + sort_order number(3) default '0' NOT NULL, + PRIMARY KEY (site_id) +); + + +#-- # TBL_STATUS CREATE TABLE TBL_STATUS ( status_id number(10) default '0' NOT NULL, @@ -340,6 +380,7 @@ project_id number(10) default '0' NOT NULL, version_name varchar2(30) default '' NOT NULL, active number(1) default '1' NOT NULL, + sort_order number(3) default '0' NOT NULL, created_by number(10) default '0' NOT NULL, created_date number(20) default '0' NOT NULL, last_modified_by number(10) default '0' NOT NULL, @@ -348,30 +389,11 @@ ) ; -#-- -# TBL_DATABASE -CREATE TABLE TBL_DATABASE ( - database_id number(3) default '0' NOT NULL, - database_name varchar2(40) default '' NOT NULL, - sort_order number(3) default '0' NOT NULL, - PRIMARY KEY (database_id) -); - - -#-- -# TBL_SITE -CREATE TABLE TBL_SITE ( - site_id number(3) default '0' NOT NULL, - site_name varchar2(50) default '' NOT NULL, - sort_order number(3) default '0' NOT NULL, - PRIMARY KEY (site_id) -); - - # # -- Insert initial data -- # + INSERT INTO TBL_AUTH_USER (user_id, login, first_name, last_name, email, password) values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', @@ -383,22 +405,28 @@ # Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); -INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1); +INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1); CREATE SEQUENCE TBL_AUTH_GROUP_seq START WITH 4 NOCACHE; -# ... and only two permissions +# ... and four permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); +INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment'); +INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (4, 'Assignable'); -# Admins can do all the admin stuff, and +# Admins can do all the admin stuff, INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); -# users can edit bugs +# users can edit bugs, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); +# developers are users who can own bugs +INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 2); +INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 4); + # Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); @@ -421,6 +449,7 @@ INSERT INTO TBL_CONFIGURATION VALUES ('MASK_EMAIL','1','Should email addresses have . changed to dot and @ changed to at ?','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('HIDE_EMAIL','1','Should email addresses be hidden for those not logged in?','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('USE_SEVERITY_COLOR','1','Should the query list use the severity colors as the row background color (like SourceForge)','bool'); +INSERT INTO TBL_CONFIGURATION VALUES ('USE_PRIORITY_COLOR','0','Should the query list use the priority colors as the row background color','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_IS_LOGIN','1','Whether to use email addresses as logins','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('STRICT_UPDATING', '0', 'Only the bug reporter, bug owner, managers, and admins can change a bug', 'bool'); INSERT INTO TBL_CONFIGURATION VALUES ('NEW_ACCOUNTS_DISABLED', '0', 'Only admins can create new user accounts - newaccount.php is disabled', 'bool'); @@ -441,7 +470,6 @@ INSERT INTO TBL_CONFIGURATION VALUES ('BUG_PROMOTED','2','The status to assign a bug when it is promoted (if enabled).','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('BUG_ASSIGNED','3','The status to assign a bug when it is assigned.','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('BUG_REOPENED','4','The status to assign a bug when it is reopened.','multi'); -INSERT INTO TBL_CONFIGURATION VALUES ('BUG_CLOSED','7','The status to assign a bug when it is closed.','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool'); @@ -514,16 +542,29 @@ # +# -- Initialize the PRIORITY table -- +# + +INSERT INTO TBL_PRIORITY VALUES (1,'Low','Fix if possible',1,'#dadada'); +INSERT INTO TBL_PRIORITY VALUES (2,'Medium Low','Must fix before final',2,'#dad0d0'); +INSERT INTO TBL_PRIORITY VALUES (3,'Medium','Fix before next milestone (alpha, beta, etc.)',3,'#dac0c0'); +INSERT INTO TBL_PRIORITY VALUES (4,'Medium High','Fix as soon as possible',4,'#dab0b0'); +INSERT INTO TBL_PRIORITY VALUES (5,'High','Fix immediately',5,'#daaaaa'); + +CREATE SEQUENCE TBL_SEVERITY_seq START WITH 6 NOCACHE; + + +# # -- Initialize the STATUS table -- # -INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1); -INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2); -INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3); -INSERT INTO TBL_STATUS VALUES (4,'Reopened','Closed but opened again for further inspection',4); -INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5); -INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6); -INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7); +INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1,1); +INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2,1); +INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3,1); +INSERT INTO TBL_STATUS VALUES (4,'Reopened','Closed but opened again for further inspection',4,1); +INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5,0); +INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6,0); +INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7,0); CREATE SEQUENCE TBL_STATUS_seq START WITH 8 NOCACHE; Index: pgsql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- pgsql.in 23 Aug 2005 21:09:42 -0000 1.49 +++ pgsql.in 23 Aug 2005 21:12:38 -0000 1.50 @@ -26,7 +26,6 @@ group_id INT4 NOT NULL DEFAULT '0', group_name varchar(80) NOT NULL DEFAULT '', locked INT2 NOT NULL DEFAULT 0, - assignable INT2 NOT NULL DEFAULT 0, created_by INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', last_modified_by INT4 NOT NULL DEFAULT '0', @@ -68,6 +67,14 @@ #-- +# TBL_BOOKMARK +CREATE TABLE TBL_BOOKMARK ( + user_id INT4 NOT NULL DEFAULT '0', + bug_id INT4 NOT NULL DEFAULT '0' +); + + +#-- # TBL_BUG CREATE TABLE TBL_BUG ( bug_id INT4 NOT NULL DEFAULT '0', @@ -169,6 +176,7 @@ component_desc TEXT DEFAULT '' NOT NULL, owner INT4 NOT NULL DEFAULT '0', active INT2 NOT NULL DEFAULT '1', + sort_order INT2 NOT NULL DEFAULT '0', created_by INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', last_modified_by INT4 NOT NULL DEFAULT '0', @@ -219,6 +227,18 @@ #-- +# TBL_PRIORITY +CREATE TABLE TBL_PRIORITY ( + priority_id INT4 NOT NULL DEFAULT '0', + priority_name varchar(30) NOT NULL DEFAULT '', + priority_desc TEXT DEFAULT '' NOT NULL, + sort_order INT2 NOT NULL DEFAULT '0', + priority_color varchar(10) NOT NULL DEFAULT '#FFFFFF', + PRIMARY KEY (priority_id) +); + + +#-- # TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id INT4 NOT NULL DEFAULT '0', @@ -348,6 +368,7 @@ project_id INT4 NOT NULL DEFAULT '0', version_name varchar(30) NOT NULL DEFAULT '', active INT2 NOT NULL DEFAULT '1', + sort_order INT2 NOT NULL DEFAULT '0', created_by INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', last_modified_by INT4 NOT NULL DEFAULT '0', @@ -372,23 +393,28 @@ # Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); -INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1); +INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1); CREATE SEQUENCE TBL_AUTH_GROUP_seq START 4; -# ... and three permissions +# ... and four permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment'); +INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (4, 'Assignable'); -# Admins can do all the admin stuff, and +# Admins can do all the admin stuff, INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); -# users can edit bugs +# users can edit bugs, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); +# developers are users who can own bugs +INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 2); +INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 4); + # Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); @@ -411,6 +437,7 @@ INSERT INTO TBL_CONFIGURATION VALUES ('MASK_EMAIL','1','Should email addresses have . changed to ''dot'' and @ change to ''at''?','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('HIDE_EMAIL','1','Should email addresses be hidden for those not logged in?','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('USE_SEVERITY_COLOR','1','Should the query list use the severity colors as the row background color (like SourceForge)','bool'); +INSERT INTO TBL_CONFIGURATION VALUES ('USE_PRIORITY_COLOR','0','Should the query list use the priority colors as the row background color','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_IS_LOGIN','1','Whether to use email addresses as logins','bool'); INSERT INTO TBL_CONFIGURATION VALUES ('STRICT_UPDATING', '0', 'Only the bug reporter, bug owner, managers, and admins can change a bug', 'bool'); INSERT INTO TBL_CONFIGURATION VALUES ('NEW_ACCOUNTS_DISABLED', '0', 'Only admins can create new user accounts - newaccount.php is disabled', 'bool'); @@ -503,6 +530,19 @@ # +# -- Initialize the PRIORITY table -- +# + +INSERT INTO TBL_PRIORITY VALUES (1,'Low','Fix if possible',1,'#dadada'); +INSERT INTO TBL_PRIORITY VALUES (2,'Medium Low','Must fix before final',2,'#dad0d0'); +INSERT INTO TBL_PRIORITY VALUES (3,'Medium','Fix before next milestone (alpha, beta, etc.)',3,'#dac0c0'); +INSERT INTO TBL_PRIORITY VALUES (4,'Medium High','Fix as soon as possible',4,'#dab0b0'); +INSERT INTO TBL_PRIORITY VALUES (5,'High','Fix immediately',5,'#daaaaa'); + +CREATE SEQUENCE TBL_PRIORITY_seq START 6; + + +# # -- Initialize the STATUS table -- # |
|
From: Ulf E. <ulf...@us...> - 2005-08-23 21:12:49
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23167/phpbt/inc/db Modified Files: mssql.php mysql.php oci8.php pgsql.php Log Message: Updates Index: mssql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mssql.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mssql.php 23 Aug 2005 21:09:42 -0000 1.3 +++ mssql.php 23 Aug 2005 21:12:39 -0000 1.4 @@ -9,6 +9,7 @@ 'c.component_name, '. 'c.created_date, '. 'c.active, '. + 'sort_order, '. 'count(bug_id) as bug_count '. 'from '. TBL_COMPONENT.' c '. @@ -40,8 +41,7 @@ 'ag.group_id, '. 'group_name, '. 'locked, '. - 'count(ug.group_id) as count, '. - 'assignable '. + 'count(ug.group_id) as count '. 'from '. TBL_AUTH_GROUP.' ag '. 'left join '.TBL_USER_GROUP.' ug on ug.group_id = ag.group_id '. @@ -49,8 +49,7 @@ 'group by '. 'ag.group_id, '. 'group_name, '. - 'locked, '. - 'assignable '. + 'locked '. 'order by '. '%s %s', 'admin-list-oses' => @@ -70,6 +69,25 @@ 'sort_order '. 'order by '. '%s %s', + 'admin-list-priorities' => + 'select '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_PRIORITY.' p '. + 'left join '.TBL_BUG.' b on b.priority = p.priority_id '. + 'group by '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order '. + 'order by '. + '%s %s', 'admin-list-resolutions' => 'select '. 's.resolution_id, '. @@ -145,6 +163,7 @@ 'v.version_name, '. 'v.created_date, '. 'v.active, '. + 'sort_order, '. 'count(bug_id) as bug_count '. 'from '. TBL_VERSION.' v '. @@ -207,14 +226,21 @@ 'bh.created_date', 'bug-prev-next' => 'select '. - 'bug_id, '. + 'b.bug_id, '. 'reporter.login as reporter, '. - 'owner.login as owner '. + 'owner.login as owner, '. + 'count(distinct comment.comment_id) as comments, '. + 'count(distinct attachment.attachment_id) as attachments, '. + 'count(distinct vote.user_id) as votes '. 'from '. TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' db on b.database_id = db.database_id '. 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. @@ -222,12 +248,14 @@ TBL_SEVERITY.' severity, '. TBL_STATUS.' status, '. TBL_OS.' os, '. + TBL_PRIORITY.' priority, '. TBL_VERSION.' version, '. TBL_COMPONENT.' component, '. TBL_PROJECT.' project, '. TBL_SITE.' site '. 'where '. 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.status_id = status.status_id '. 'and b.os_id = os.os_id '. 'and b.version_id = version.version_id '. @@ -235,10 +263,12 @@ 'and b.project_id = project.project_id '. 'and %s '. 'and b.site_id = site.site_id '. - 'and bug_id <> %s '. + 'and b.bug_id <> %s '. + 'group by '. + 'b.bug_id '. 'order by '. '%s %s, '. - 'bug_id asc', + 'b.bug_id asc', 'bug-printable' => 'select '. 'b.*, '. @@ -248,6 +278,7 @@ 'component_name, '. 'version_name, '. 'severity_name, '. + 'priority_name, '. 'os_name, '. 'status_name, '. 'resolution_name '. @@ -255,17 +286,20 @@ TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '. TBL_STATUS.' st, '. TBL_OS.' os, '. TBL_VERSION.' v, '. + TBL_PRIORITY.' priority, '. TBL_COMPONENT.' c, '. TBL_PROJECT.' p '. 'where '. - 'bug_id = %s '. + 'b.bug_id = %s '. 'and b.project_id not in (%s) '. 'and b.severity_id = sv.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.os_id = os.os_id '. 'and b.version_id = v.version_id '. 'and b.component_id = c.component_id '. @@ -282,16 +316,19 @@ TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '. TBL_STATUS.' st, '. - TBL_SITE.' site '. + TBL_SITE.' site, '. + TBL_PRIORITY.' prio '. 'where '. - 'bug_id = %s '. + 'b.bug_id = %s '. 'and b.project_id not in (%s) '. 'and b.site_id = site.site_id '. 'and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id', + 'and b.status_id = st.status_id'. + 'and b.priority = prio.priority_id', 'functions-bug-cc' => 'select '. 'b.user_id, '. @@ -316,6 +353,18 @@ 'p.project_name '. 'order by '. 'project_name', + 'include-template-bookmark' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s on s.status_id = b.status_id ". + TBL_BOOKMARK." w ". + "where ". + "w.user_id=%s ". + "AND w.bug_id = b.bug_id", + 'include-template-owner' => "SELECT ". "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". @@ -362,6 +411,10 @@ 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. @@ -372,25 +425,30 @@ TBL_SITE.' site, '. TBL_VERSION.' version, '. TBL_COMPONENT.' component, '. - TBL_PROJECT.' project '. + TBL_PROJECT.' project, '. + TBL_PRIORITY.' priority '. 'where '. 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.status_id = status.status_id '. 'and b.os_id = os.os_id '. 'and b.site_id = site.site_id '. 'and b.version_id = version.version_id '. 'and b.component_id = component.component_id '. 'and b.project_id = project.project_id %s '. + 'group by '. + 'b.bug_id '. 'order by '. '%s %s, '. - 'bug_id asc', + 'b.bug_id asc', 'query-list-bugs-count' => 'select '. 'count(*) '. 'from '. TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id ', + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id ', 'query-list-bugs-count-join' => 'where ', 'report-resbyeng-1' => Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- mysql.php 23 Aug 2005 21:09:42 -0000 1.26 +++ mysql.php 23 Aug 2005 21:12:39 -0000 1.27 @@ -264,7 +264,7 @@ 'and %s '. 'and b.site_id = site.site_id '. 'and b.bug_id <> %s '. - 'GROUP BY '. + 'group by '. 'b.bug_id '. 'order by '. '%s %s, '. @@ -327,7 +327,7 @@ 'and b.project_id not in (%s) '. 'and b.site_id = site.site_id '. 'and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id ', + 'and b.status_id = st.status_id '. 'and b.priority = prio.priority_id', 'functions-bug-cc' => 'select '. @@ -435,7 +435,7 @@ 'and b.version_id = version.version_id '. 'and b.component_id = component.component_id '. 'and b.project_id = project.project_id %s '. - 'GROUP BY '. + 'group by '. 'b.bug_id '. 'order by '. '%s %s, '. Index: oci8.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/oci8.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- oci8.php 23 Aug 2005 21:09:42 -0000 1.19 +++ oci8.php 23 Aug 2005 21:12:39 -0000 1.20 @@ -9,6 +9,7 @@ 'component_name, '. 'c.created_date, '. 'active, '. + 'sort_order, '. 'count(bug_id) as bug_count '. 'from '. TBL_COMPONENT.' c, '. @@ -43,11 +44,10 @@ 'ag.group_id, '. 'ag.group_name, '. 'ag.locked, '. - 'count(ug.group_id) as count, '. - 'assignable '. + 'count(ug.group_id) as count '. 'from '. TBL_AUTH_GROUP.' ag, '. - TBL_USER_GROUP.' ug,'. + TBL_USER_GROUP.' ug, '. TBL_AUTH_USER.' au '. 'where '. 'ag.group_id = ug.group_id(+) '. @@ -55,8 +55,7 @@ 'group by '. 'ag.group_id, '. 'ag.group_name, '. - 'ag.locked, '. - 'ag.assignable '. + 'ag.locked '. 'order by '. '%s %s', 'admin-list-oses' => @@ -78,6 +77,27 @@ 's.sort_order '. 'order by '. 's.%s %s', + 'admin-list-priorities' => + 'select '. + 'p.priority_id, '. + 'p.priority_name, '. + 'p.priority_desc, '. + 'p.priority_color, '. + 'p.sort_order, '. + 'count(b.bug_id) as bug_count '. + 'from '. + TBL_PRIORITY.' p, '. + TBL_BUG.' b '. + 'where '. + 'p.priority_id = b.priority(+) '. + 'group by '. + 'p.priority_id, '. + 'p.priority_name, '. + 'p.priority_desc, '. + 'p.priority_color, '. + 'p.sort_order '. + 'order by '. + 'p.%s %s', 'admin-list-resolutions' => 'select '. 's.resolution_id, '. @@ -90,8 +110,13 @@ TBL_BUG.' b '. 'where '. 's.resolution_id = b.resolution_id(+) '. - 'group by s.resolution_id, resolution_name, resolution_desc, sort_order '. - 'order by %s %s', + 'group by '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order '. + 'order by '. + '%s %s', 'admin-list-severities' => 'select '. 's.severity_id, '. @@ -156,6 +181,7 @@ 'version_name, '. 'v.created_date, '. 'active, '. + 'sort_order, '. 'count(bug_id) as bug_count '. 'from '. TBL_VERSION.' v, '. @@ -226,12 +252,19 @@ 'select '. 'b.bug_id, '. 'reporter.login as reporter, '. - 'owner.login as owner '. + 'owner.login as owner, '. + 'count(distinct comment.comment_id) as comments, '. + 'count(distinct attachment.attachment_id) as attachments, '. + 'count(distinct vote.user_id) as votes '. 'from '. TBL_BUG.' b, '. TBL_AUTH_USER.' owner, '. TBL_AUTH_USER.' reporter, '. TBL_AUTH_USER.' lastmodifier, '. + TBL_COMMENT.' comment, '. + TBL_ATTACHMENT.' attachment, '. + TBL_BUG_VOTE.' vote, '. + TBL_BOOKMARK.' bookmark, '. TBL_RESOLUTION.' resolution, '. TBL_DATABASE.' database, '. TBL_VERSION.' version2, '. @@ -239,6 +272,7 @@ TBL_SEVERITY.' severity, '. TBL_STATUS.' status, '. TBL_OS.' os, '. + TBL_PRIORITY.' priority, '. TBL_VERSION.' version, '. TBL_COMPONENT.' component, '. TBL_PROJECT.' project, '. @@ -247,18 +281,26 @@ 'b.assigned_to = owner.user_id(+) '. 'and b.created_by = reporter.user_id(+) '. 'and b.last_modified_by = lastmodifier.user_id(+) '. + 'and b.bug_id = comment.bug_id(+) '. + 'and b.bug_id = attachment.bug_id(+) '. + 'and b.bug_id = vote.bug_id(+) '. + 'and b.bug_id = bookmark.bug_id(+) '. 'and b.resolution_id = resolution.resolution_id(+) '. 'and b.database_id = database.database_id(+) '. 'and b.to_be_closed_in_version_id = version2.version_id(+) '. 'and b.closed_in_version_id = version3.version_id(+) '. 'and b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.status_id = status.status_id '. 'and b.os_id = os.os_id '. 'and b.version_id = version.version_id '. 'and b.component_id = component.component_id '. - 'and b.site_id = site.site_id '. 'and b.project_id = project.project_id '. - 'and %s and bug_id <> %s '. + 'and %s '. + 'and b.site_id = site.site_id '. + 'and b.bug_id <> %s '. + 'group by '. + 'b.bug_id '. 'order by '. '%s %s, '. 'bug_id asc', @@ -278,49 +320,57 @@ TBL_BUG.' b, '. TBL_AUTH_USER.' owner, '. TBL_AUTH_USER.' reporter, '. + TBL_BOOKMARK.' bookmark, '. TBL_RESOLUTION.' r, '. TBL_SEVERITY.' sv, '. TBL_STATUS.' st, '. TBL_OS.' os, '. TBL_VERSION.' v, '. + TBL_PRIORITY.' priority, '. TBL_COMPONENT.' c, '. - TBL_PROJECT.' p ', + TBL_PROJECT.' p '. 'where '. 'b.assigned_to = owner.user_id(+) '. 'and b.created_by = reporter.user_id(+) '. + 'and b.bug_id = bookmark.bug_id(+) '. 'and b.resolution_id = r.resolution_id(+) '. + 'and b.bug_id = %s '. + 'and b.project_id not in (%s)'. + 'and b.severity_id = sv.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.os_id = os.os_id '. 'and b.version_id = v.version_id '. 'and b.component_id = c.component_id '. 'and b.project_id = p.project_id '. - 'and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id '. - 'and bug_id = %s '. - 'and b.project_id not in (%s)', + 'and b.status_id = st.status_id ', 'bug-show-bug' => 'select '. 'b.*, '. 'reporter.login as reporter, '. 'owner.login as owner, '. - 'r.resolution_name, '. - 'st.status_name '. + 'st.status_name, '. + 'r.resolution_name '. 'from '. TBL_BUG.' b, '. TBL_AUTH_USER.' owner, '. TBL_AUTH_USER.' reporter, '. + TBL_BOOKMARK.' bookmark, '. TBL_RESOLUTION.' r, '. TBL_SEVERITY.' sv, '. TBL_STATUS.' st, '. - TBL_SITE.' site '. + TBL_SITE.' site, '. + TBL_PRIORITY.' prio '. 'where '. 'b.resolution_id = r.resolution_id(+) '. 'and b.assigned_to = owner.user_id(+) '. 'and b.created_by = reporter.user_id(+) '. + 'and b.bug_id = bookmark.bug_id(+) '. + 'and b.bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.site_id = site.site_id '. 'and b.severity_id = sv.severity_id '. 'and b.status_id = st.status_id '. - 'and b.site_id = site.site_id '. - 'and bug_id = %s '. - 'and b.project_id not in (%s)', + 'and b.priority = prio.priority_id', 'functions-bug-cc' => 'select '. 'b.user_id, '. @@ -347,6 +397,18 @@ 'p.project_name '. 'order by '. 'project_name', + 'include-template-bookmark' => + "SELECT ". + "sum(decode( s.status_id in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )), ". + "sum(decode( s.status_id not in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )), ". + "from ". + TBL_BUG." b, ". + TBL_STATUS." s, ". + TBL_BOOKMARK." w ". + "where ". + "b.status_id = s.status_id (+) ". + "AND w.user_id=%s ". + "AND w.bug_id = b.bug_id", 'include-template-owner' => "SELECT ". "sum(decode( s.status_id in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )), ". @@ -392,48 +454,62 @@ '%s '. 'from '. TBL_BUG.' b, '. - TBL_AUTH_USER.' lastmodifier, '. TBL_AUTH_USER.' owner, '. TBL_AUTH_USER.' reporter, '. + TBL_AUTH_USER.' lastmodifier, '. + TBL_COMMENT.' comment, '. + TBL_ATTACHMENT.' attachment, '. + TBL_BUG_VOTE.' vote, '. + TBL_BOOKMARK.' bookmark, '. + TBL_RESOLUTION.' resolution, '. + TBL_DATABASE.' database, '. + TBL_VERSION.' version2, '. + TBL_VERSION.' version3, '. TBL_SEVERITY.' severity, '. TBL_STATUS.' status, '. TBL_OS.' os, '. + TBL_SITE.' site, '. TBL_VERSION.' version, '. - TBL_VERSION.' version2, '. - TBL_VERSION.' version3, '. TBL_COMPONENT.' component, '. TBL_PROJECT.' project, '. - TBL_RESOLUTION.' resolution, '. - TBL_SITE.' site, '. - TBL_DATABASE.' '. + TBL_PRIORITY.' priority '. 'where '. 'b.assigned_to = owner.user_id(+) '. 'and b.created_by = reporter.user_id(+) '. 'and b.last_modified_by = lastmodifier.user_id(+) '. + 'and b.bug_id = comment.bug_id(+) '. + 'and b.bug_id = attachment.bug_id(+) '. + 'and b.bug_id = vote.bug_id(+) '. + 'and b.bug_id = bookmark.bug_id(+) '. 'and b.resolution_id = resolution.resolution_id(+) '. + 'and b.database_id = database.database_id(+) '. + 'and b.to_be_closed_in_version_id = version2.version_id(+) '. + 'and b.closed_in_version_id = version3.version_id(+) '. 'and b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.status_id = status.status_id '. 'and b.os_id = os.os_id '. - 'and b.version_id = version.version_id '. - 'and b.to_be_closed_in_version_id = version2.version_id(+) '. - 'and b.closed_in_version_id = version3.version_id(+) '. - 'and b.database_id = '.TBL_DATABASE.'.database_id(+) '. 'and b.site_id = site.site_id '. + 'and b.version_id = version.version_id '. 'and b.component_id = component.component_id '. 'and b.project_id = project.project_id %s '. + 'group by '. + 'b.bug_id '. 'order by '. '%s %s, '. - 'bug_id asc', + 'b.bug_id asc', 'query-list-bugs-count' => 'select '. 'count(*) '. 'from '. TBL_BUG.' b, '. TBL_AUTH_USER.' owner, '. - TBL_AUTH_USER.' reporter '. + TBL_AUTH_USER.' reporter, '. + TBL_BOOKMARK.' bookmark '. 'where '. 'b.assigned_to = owner.user_id(+) '. - 'and b.created_by = reporter.user_id(+) ', + 'and b.created_by = reporter.user_id(+) '. + 'and b.bug_id = bookmark.bug_id(+) ', 'query-list-bugs-count-join' => 'and ', 'report-resbyeng-1' => Index: pgsql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/pgsql.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- pgsql.php 23 Aug 2005 21:09:42 -0000 1.27 +++ pgsql.php 23 Aug 2005 21:12:39 -0000 1.28 @@ -9,6 +9,7 @@ 'c.component_name, '. 'c.created_date, '. 'c.active, '. + 'c.sort_order, '. 'count(bug_id) as bug_count '. 'from '. TBL_COMPONENT.' c '. @@ -40,8 +41,7 @@ 'ag.group_id, '. 'group_name, '. 'locked, '. - 'count(ug.group_id) as count, '. - 'assignable '. + 'count(ug.group_id) as count '. 'from '. TBL_AUTH_GROUP.' ag '. 'left join '.TBL_USER_GROUP.' ug using (group_id) '. @@ -49,8 +49,7 @@ 'group by '. 'ag.group_id, '. 'group_name, '. - 'locked, '. - 'assignable '. + 'locked '. 'order by '. '%s %s', 'admin-list-oses' => @@ -70,6 +69,25 @@ 'sort_order '. 'order by '. '%s %s', + 'admin-list-priorities' => + 'select '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_PRIORITY.' p '. + 'left join '.TBL_BUG.' b on b.priority = p.priority_id '. + 'group by '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order '. + 'order by '. + '%s %s', 'admin-list-resolutions' => 'select '. 's.resolution_id, '. @@ -145,6 +163,7 @@ 'v.version_name, '. 'v.created_date, '. 'v.active, '. + 'v.sort_order, '. 'count(bug_id) as bug_count '. 'from '. TBL_VERSION.' v '. @@ -207,14 +226,21 @@ 'bh.created_date', 'bug-prev-next' => 'select '. - 'bug_id, '. + 'b.bug_id, '. 'reporter.login as reporter, '. - 'owner.login as owner '. + 'owner.login as owner, '. + 'count(distinct comment.comment_id) as comments, '. + 'count(distinct attachment.attachment_id) as attachments, '. + 'count(distinct vote.user_id) as votes '. 'from '. TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. @@ -222,12 +248,14 @@ TBL_SEVERITY.' severity, '. TBL_STATUS.' status, '. TBL_OS.' os, '. + TBL_PRIORITY.' priority, '. TBL_VERSION.' version, '. TBL_COMPONENT.' component, '. TBL_PROJECT.' project, '. TBL_SITE.' site '. 'where '. 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.status_id = status.status_id '. 'and b.os_id = os.os_id '. 'and b.version_id = version.version_id '. @@ -235,10 +263,12 @@ 'and b.project_id = project.project_id '. 'and %s '. 'and b.site_id = site.site_id '. - 'and bug_id <> %s '. + 'and b.bug_id <> %s '. + 'group by '. + 'b.bug_id '. 'order by '. '%s %s, '. - 'bug_id asc', + 'b.bug_id asc', 'bug-printable' => 'select '. 'b.*, '. @@ -248,6 +278,7 @@ 'component_name, '. 'version_name, '. 'severity_name, '. + 'priority_name, '. 'os_name, '. 'status_name, '. 'resolution_name '. @@ -255,17 +286,20 @@ TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '. TBL_STATUS.' st, '. TBL_OS.' os, '. TBL_VERSION.' v, '. + TBL_PRIORITY.' priority, '. TBL_COMPONENT.' c, '. TBL_PROJECT.' p '. 'where '. - 'bug_id = %s '. + 'b.bug_id = %s '. 'and b.project_id not in (%s) '. 'and b.severity_id = sv.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.os_id = os.os_id '. 'and b.version_id = v.version_id '. 'and b.component_id = c.component_id '. @@ -282,16 +316,19 @@ TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '. TBL_STATUS.' st, '. - TBL_SITE.' site '. + TBL_SITE.' site, '. + TBL_PRIORITY.' prio '. 'where '. - 'bug_id = %s '. + 'b.bug_id = %s '. 'and b.project_id not in (%s) '. 'and b.site_id = site.site_id '. 'and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id', + 'and b.status_id = st.status_id'. + 'and b.priority = prio.priority_id', 'functions-bug-cc' => 'select '. 'b.user_id, '. @@ -316,6 +353,17 @@ 'p.project_name '. 'order by '. 'project_name', + 'include-template-bookmark' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id), ". + TBL_BOOKMARK." w ". + "where ". + "w.user_id=%s ". + "AND w.bug_id = b.bug_id", 'include-template-owner' => "SELECT ". "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". @@ -362,6 +410,10 @@ 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. @@ -372,25 +424,30 @@ TBL_SITE.' site, '. TBL_VERSION.' version, '. TBL_COMPONENT.' component, '. - TBL_PROJECT.' project '. + TBL_PROJECT.' project, '. + TBL_PRIORITY.' priority '. 'where '. 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. 'and b.status_id = status.status_id '. 'and b.os_id = os.os_id '. 'and b.site_id = site.site_id '. 'and b.version_id = version.version_id '. 'and b.component_id = component.component_id '. 'and b.project_id = project.project_id %s '. + 'group by '. + 'b.bug_id '. 'order by '. '%s %s, '. - 'bug_id asc', + 'b.bug_id asc', 'query-list-bugs-count' => 'select '. 'count(*) '. 'from '. TBL_BUG.' b '. 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id ', + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id ', 'query-list-bugs-count-join' => 'where ', 'report-resbyeng-1' => |
|
From: Ulf E. <ulf...@us...> - 2005-08-23 21:09:50
|
Update of /cvsroot/phpbt/phpbt/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22034/phpbt/schemas Modified Files: mssql.in mysql.in oci8.in pgsql.in Log Message: Sorting and reformatting to simplify updates in future Index: mssql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mssql.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mssql.in 19 Jul 2005 19:46:50 -0000 1.1 +++ mssql.in 23 Aug 2005 21:09:42 -0000 1.2 @@ -3,6 +3,10 @@ # # $Id$ + + +#-- +# TBL_ATTACHMENT CREATE TABLE TBL_ATTACHMENT ( attachment_id id smallint NOT NULL default '0', bug_id smallint NOT NULL default '0', @@ -15,6 +19,9 @@ PRIMARY KEY (attachment_id) ); + +#-- +# TBL_AUTH_GROUP CREATE TABLE TBL_AUTH_GROUP ( group_id smallint NOT NULL default '0', group_name varchar(80) NOT NULL default '', @@ -27,6 +34,9 @@ PRIMARY KEY (group_id) ); + +#-- +# TBL_AUTH_PERM CREATE TABLE TBL_AUTH_PERM ( perm_id smallint NOT NULL default '0', perm_name varchar(80) NOT NULL default '', @@ -37,6 +47,9 @@ PRIMARY KEY (perm_id) ); + +#-- +# TBL_AUTH_USER CREATE TABLE TBL_AUTH_USER ( user_id smallint NOT NULL default '0', login char(40) NOT NULL default '', @@ -54,6 +67,9 @@ UNIQUE login (login) ); + +#-- +# TBL_BUG CREATE TABLE TBL_BUG ( bug_id smallint NOT NULL default '0', title varchar(100) NOT NULL default '', @@ -81,6 +97,9 @@ PRIMARY KEY (bug_id) ); + +#-- +# TBL_BUG_CC CREATE TABLE TBL_BUG_CC ( bug_id smallint NOT NULL default '0', user_id smallint NOT NULL default '0', @@ -89,18 +108,27 @@ PRIMARY KEY (bug_id,user_id) ); + +#-- +# TBL_BUG_DEPENDENCY CREATE TABLE TBL_BUG_DEPENDENCY ( bug_id smallint NOT NULL default '0', depends_on smallint NOT NULL default '0', PRIMARY KEY (bug_id,depends_on) ); + +#-- +# TBL_BUG_GROUP CREATE TABLE TBL_BUG_GROUP ( bug_id smallint NOT NULL default '0', group_id smallint NOT NULL default '0', PRIMARY KEY (bug_id,group_id), ); + +#-- +# TBL_BUG_HISTORY CREATE TABLE TBL_BUG_HISTORY ( bug_id smallint NOT NULL default '0', changed_field varchar(30) NOT NULL default '', @@ -110,6 +138,9 @@ created_date int NOT NULL default '0' ); + +#-- +# TBL_BUG_VOTE CREATE TABLE TBL_BUG_VOTE ( user_id smallint NOT NULL default '0', bug_id smallint NOT NULL default '0', @@ -117,6 +148,9 @@ PRIMARY KEY (user_id, bug_id), ); + +#-- +# TBL_COMMENT CREATE TABLE TBL_COMMENT ( comment_id smallint NOT NULL default '0', bug_id smallint NOT NULL default '0', @@ -126,6 +160,9 @@ PRIMARY KEY (comment_id) ); + +#-- +# TBL_COMPONENT CREATE TABLE TBL_COMPONENT ( component_id smallint NOT NULL default '0', project_id smallint NOT NULL default '0', @@ -140,6 +177,9 @@ PRIMARY KEY (component_id) ); + +#-- +# TBL_CONFIGURATION CREATE TABLE TBL_CONFIGURATION ( varname char(40) NOT NULL default '', varvalue char(255) NOT NULL default '', @@ -148,12 +188,28 @@ PRIMARY KEY (varname) ); + +#-- +# TBL_DATABASE +CREATE TABLE TBL_DATABASE ( + database_id tinyint NOT NULL default '0', + database_name varchar(40) NOT NULL default '', + sort_order tinyint NOT NULL default '0', + PRIMARY KEY (database_id) +); + + +#-- +# TBL_GROUP_PERM CREATE TABLE TBL_GROUP_PERM ( group_id smallint NOT NULL default '0', perm_id smallint NOT NULL default '0', PRIMARY KEY (group_id,perm_id), ); + +#-- +# TBL_OS CREATE TABLE TBL_OS ( os_id smallint NOT NULL default '0', os_name char(30) NOT NULL default '', @@ -162,6 +218,9 @@ PRIMARY KEY (os_id) ); + +#-- +# TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id smallint NOT NULL default '0', project_name varchar(30) NOT NULL default '', @@ -174,6 +233,9 @@ PRIMARY KEY (project_id) ); + +#-- +# TBL_PROJECT_GROUP CREATE TABLE TBL_PROJECT_GROUP ( project_id smallint NOT NULL default '0', group_id smallint NOT NULL default '0', @@ -182,11 +244,17 @@ PRIMARY KEY (project_id,group_id), ); + +#-- +# TBL_PROJECT_PERM CREATE TABLE TBL_PROJECT_PERM ( project_id smallint NOT NULL default '0', user_id smallint NOT NULL default '0' ); + +#-- +# TBL_RESOLUTION CREATE TABLE TBL_RESOLUTION ( resolution_id smallint NOT NULL default '0', resolution_name varchar(30) NOT NULL default '', @@ -195,6 +263,9 @@ PRIMARY KEY (resolution_id) ); + +#-- +# TBL_SAVED_QUERY CREATE TABLE TBL_SAVED_QUERY ( saved_query_id smallint NOT NULL default '0', user_id smallint NOT NULL default '0', @@ -203,6 +274,9 @@ PRIMARY KEY (saved_query_id,user_id) ); + +#-- +# TBL_SEVERITY CREATE TABLE TBL_SEVERITY ( severity_id smallint NOT NULL default '0', severity_name varchar(30) NOT NULL default '', @@ -212,6 +286,19 @@ PRIMARY KEY (severity_id) ); + +#-- +# TBL_SITE +CREATE TABLE TBL_SITE ( + site_id tinyint NOT NULL default '0', + site_name varchar(50) NOT NULL default '', + sort_order tinyint NOT NULL default '0', + PRIMARY KEY (site_id) +); + + +#-- +# TBL_STATUS CREATE TABLE TBL_STATUS ( status_id smallint NOT NULL default '0', status_name varchar(30) NOT NULL default '', @@ -221,6 +308,9 @@ PRIMARY KEY (status_id) ); + +#-- +# TBL_USER_GROUP CREATE TABLE TBL_USER_GROUP ( user_id smallint NOT NULL default '0', group_id smallint NOT NULL default '0', @@ -229,6 +319,9 @@ PRIMARY KEY (user_id,group_id), ); + +#-- +# TBL_USER_PERM CREATE TABLE TBL_USER_PERM ( user_id smallint NOT NULL default '0', perm_id smallint NOT NULL default '0', @@ -237,6 +330,9 @@ PRIMARY KEY (user_id,perm_id), ); + +#-- +# TBL_USER_PREF CREATE TABLE TBL_USER_PREF ( user_id smallint NOT NULL default '0', email_notices bit NOT NULL default '1', @@ -245,6 +341,9 @@ PRIMARY KEY (user_id) ); + +#-- +# TBL_VERSION CREATE TABLE TBL_VERSION ( version_id smallint NOT NULL default '0', project_id smallint NOT NULL default '0', @@ -257,52 +356,53 @@ PRIMARY KEY (version_id) ); -CREATE TABLE TBL_DATABASE ( - database_id tinyint NOT NULL default '0', - database_name varchar(40) NOT NULL default '', - sort_order tinyint NOT NULL default '0', - PRIMARY KEY (database_id) -); - -CREATE TABLE TBL_SITE ( - site_id tinyint NOT NULL default '0', - site_name varchar(50) NOT NULL default '', - sort_order tinyint NOT NULL default '0', - PRIMARY KEY (site_id) -); # # -- Insert initial data -- # + INSERT INTO TBL_AUTH_USER (user_id, login, first_name, last_name, email, password) - values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL', - 'OPTION_ADMIN_PASS'); + values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', + 'OPTION_ADMIN_EMAIL', 'OPTION_ADMIN_PASS'); + CREATE TABLE TBL_AUTH_USER_seq ([id] [int] IDENTITY (1, 1) NOT NULL, [vapor] [int] NULL) + # Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1); + CREATE TABLE TBL_AUTH_GROUP_seq ([id] [int] IDENTITY (3, 1) NOT NULL, [vapor] [int] NULL) -# ... and only two permissions + +# ... and three permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment'); -# Admins can do all the admin stuff and users can edit bugs + +# Admins can do all the admin stuff, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); + +# users can edit bugs INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); -# And user_id 1 is an admin and a user + +# Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); -INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 2); + # Add user's prefs as default values for all users defined so far (only admin) INSERT INTO TBL_USER_PREF (user_id) SELECT USER_ID FROM TBL_AUTH_USER; + +# +# -- Initialize the CONFIGURATION table -- +# + INSERT INTO TBL_CONFIGURATION VALUES ('INSTALL_URL','OPTION_INSTALL_URL','The base URL of the phpBugTracker installation','string'); INSERT INTO TBL_CONFIGURATION VALUES ('JPGRAPH_PATH','','If not in the include path. This is the file path on the web server, not a URL.','string'); INSERT INTO TBL_CONFIGURATION VALUES ('CVS_WEB','http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/','Location of your cvs web interface (see format_comments() in bug.php)','string'); @@ -334,6 +434,11 @@ INSERT INTO TBL_CONFIGURATION VALUES ('BUG_REOPENED','4','The status to assign a bug when it is reopened.','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool'); + +# +# -- Initialize the OS table -- +# + INSERT INTO TBL_OS VALUES (1,'All',1,''); INSERT INTO TBL_OS VALUES (2,'Windows 3.1',2,'/Mozilla.*\\(Win16.*\\)/'); INSERT INTO TBL_OS VALUES (3,'Windows 95',3,'/Mozilla.*\\(.*;.*; 32bit.*\\)/'); @@ -365,16 +470,28 @@ INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/'); INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/'); INSERT INTO TBL_OS VALUES (31,'other',31,''); + CREATE TABLE TBL_OS_seq ([id] [int] IDENTITY (31, 1) NOT NULL, [vapor] [int] NULL) + +# +# -- Initialize the RESOLUTION table -- +# + INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1); INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It''s not a bug -- it''s a feature!',2); INSERT INTO TBL_RESOLUTION VALUES (3,'Won''t Fix','This bug will stay',3); INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We''ll get around to it later',4); INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can''t replicate the bug',5); INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6); + CREATE TABLE TBL_RESOLUTION_seq ([id] [int] IDENTITY (6, 1) NOT NULL, [vapor] [int] NULL) + +# +# -- Initialize the SEVERITY table -- +# + INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada'); INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0'); INSERT INTO TBL_SEVERITY VALUES (3,'Feature Request','Requests for specific features',3,'#dacaca'); @@ -382,8 +499,14 @@ INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa'); INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0'); INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa'); + CREATE TABLE TBL_SEVERITY_seq ([id] [int] IDENTITY (7, 1) NOT NULL, [vapor] [int] NULL) + +# +# -- Initialize the STATUS table -- +# + INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1, 1); INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2,1); INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3,1); @@ -391,24 +514,43 @@ INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5,0); INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6,0); INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7,0); + CREATE TABLE TBL_STATUS_seq ([id] [int] IDENTITY (7, 1) NOT NULL, [vapor] [int] NULL) + +# +# -- Initialize the DATABASE table -- +# + INSERT INTO TBL_DATABASE VALUES (1,'Oracle 8.1.7',1); INSERT INTO TBL_DATABASE VALUES (2,'MySQL 3.23.49',2); INSERT INTO TBL_DATABASE VALUES (3,'PostgreSQL 7.1.3',3); + CREATE TABLE TBL_DATABASE_seq ([id] [int] IDENTITY (3, 1) NOT NULL, [vapor] [int] NULL) + +# +# -- Initialize the SITE table -- +# + # Examples only INSERT INTO TBL_SITE VALUES (0,'All',1); INSERT INTO TBL_SITE VALUES (1,'Production - location 1',2); INSERT INTO TBL_SITE VALUES (2,'Production - location 2',3); INSERT INTO TBL_SITE VALUES (3,'Test site - location 1',4); INSERT INTO TBL_SITE VALUES (4,'Test site - location 2',5); + CREATE TABLE TBL_SITE_seq ([id] [int] IDENTITY (4, 1) NOT NULL, [vapor] [int] NULL) -#-- Sequences for the tables with no initial entries + +# +# -- Sequences for the tables with no initial entries -- +# + CREATE TABLE TBL_BUG_seq ([id] [int] IDENTITY (1, 1) NOT NULL, [vapor] [int] NULL) CREATE TABLE TBL_COMMENT_seq ([id] [int] IDENTITY (1, 1) NOT NULL, [vapor] [int] NULL) CREATE TABLE TBL_COMPONENT_seq ([id] [int] IDENTITY (1, 1) NOT NULL, [vapor] [int] NULL) CREATE TABLE TBL_PROJECT_seq ([id] [int] IDENTITY (1, 1) NOT NULL, [vapor] [int] NULL) CREATE TABLE TBL_VERSION_seq ([id] [int] IDENTITY (1, 1) NOT NULL, [vapor] [int] NULL) + +#-- Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- mysql.in 22 Aug 2005 20:30:56 -0000 1.49 +++ mysql.in 23 Aug 2005 21:09:42 -0000 1.50 @@ -3,6 +3,10 @@ # # $Id$ + + +#-- +# TBL_ATTACHMENT CREATE TABLE TBL_ATTACHMENT ( attachment_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', @@ -15,6 +19,9 @@ PRIMARY KEY (attachment_id) ) TYPE=MyISAM; + +#-- +# TBL_AUTH_GROUP CREATE TABLE TBL_AUTH_GROUP ( group_id int(10) unsigned NOT NULL default '0', group_name varchar(80) NOT NULL default '', @@ -26,6 +33,9 @@ PRIMARY KEY (group_id) ) TYPE=MyISAM; + +#-- +# TBL_AUTH_PERM CREATE TABLE TBL_AUTH_PERM ( perm_id int(10) unsigned NOT NULL default '0', perm_name varchar(80) NOT NULL default '', @@ -36,6 +46,9 @@ PRIMARY KEY (perm_id) ) TYPE=MyISAM; + +#-- +# TBL_AUTH_USER CREATE TABLE TBL_AUTH_USER ( user_id int(10) unsigned NOT NULL default '0', login char(40) NOT NULL default '', @@ -53,6 +66,17 @@ UNIQUE KEY login (login) ) TYPE=MyISAM; + +#-- +# TBL_BOOKMARK +CREATE TABLE TBL_BOOKMARK ( + user_id int(10) unsigned NOT NULL default '0', + bug_id int(10) unsigned NOT NULL default '0' +) TYPE=MyISAM; + + +#-- +# TBL_BUG CREATE TABLE TBL_BUG ( bug_id int(10) unsigned NOT NULL default '0', title varchar(100) NOT NULL default '', @@ -80,6 +104,9 @@ PRIMARY KEY (bug_id) ) TYPE=MyISAM; + +#-- +# TBL_BUG_CC CREATE TABLE TBL_BUG_CC ( bug_id int(10) unsigned NOT NULL default '0', user_id int(10) unsigned NOT NULL default '0', @@ -88,12 +115,18 @@ PRIMARY KEY (bug_id,user_id) ) TYPE=MyISAM; + +#-- +# TBL_BUG_DEPENDENCY CREATE TABLE TBL_BUG_DEPENDENCY ( bug_id int(10) unsigned NOT NULL default '0', depends_on int(10) unsigned NOT NULL default '0', PRIMARY KEY (bug_id,depends_on) ) TYPE=MyISAM; + +#-- +# TBL_BUG_GROUP CREATE TABLE TBL_BUG_GROUP ( bug_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', @@ -101,6 +134,9 @@ KEY group_id (group_id) ) TYPE=MyISAM; + +#-- +# TBL_BUG_HISTORY CREATE TABLE TBL_BUG_HISTORY ( bug_id int(10) unsigned NOT NULL default '0', changed_field varchar(30) NOT NULL default '', @@ -110,6 +146,9 @@ created_date bigint(20) unsigned NOT NULL default '0' ) TYPE=MyISAM; + +#-- +# TBL_BUG_VOTE CREATE TABLE TBL_BUG_VOTE ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', @@ -118,6 +157,9 @@ KEY bug_id (bug_id) ) TYPE=MyISAM; + +#-- +# TBL_COMMENT CREATE TABLE TBL_COMMENT ( comment_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', @@ -127,6 +169,9 @@ PRIMARY KEY (comment_id) ) TYPE=MyISAM; + +#-- +# TBL_COMPONENT CREATE TABLE TBL_COMPONENT ( component_id int(10) unsigned NOT NULL default '0', project_id int(10) unsigned NOT NULL default '0', @@ -142,6 +187,9 @@ PRIMARY KEY (component_id) ) TYPE=MyISAM; + +#-- +# TBL_CONFIGURATION CREATE TABLE TBL_CONFIGURATION ( varname char(40) NOT NULL default '', varvalue char(255) NOT NULL default '', @@ -150,6 +198,19 @@ PRIMARY KEY (varname) ) TYPE=MyISAM; + +#-- +# TBL_DATABASE +CREATE TABLE TBL_DATABASE ( + database_id tinyint(3) unsigned NOT NULL default '0', + database_name varchar(40) NOT NULL default '', + sort_order tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (database_id) +) TYPE=MyISAM; + + +#-- +# TBL_GROUP_PERM CREATE TABLE TBL_GROUP_PERM ( group_id int(10) unsigned NOT NULL default '0', perm_id int(10) unsigned NOT NULL default '0', @@ -157,6 +218,9 @@ KEY perm_id (perm_id) ) TYPE=MyISAM; + +#-- +# TBL_OS CREATE TABLE TBL_OS ( os_id int(10) unsigned NOT NULL default '0', os_name char(30) NOT NULL default '', @@ -165,6 +229,21 @@ PRIMARY KEY (os_id) ) TYPE=MyISAM; + +#-- +# TBL_PRIORITY +CREATE TABLE TBL_PRIORITY ( + priority_id int(10) unsigned NOT NULL default '0', + priority_name varchar(30) NOT NULL default '', + priority_desc text NOT NULL, + sort_order tinyint(3) unsigned NOT NULL default '0', + priority_color varchar(10) NOT NULL default '#FFFFFF', + PRIMARY KEY (priority_id) +) TYPE=MyISAM; + + +#-- +# TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id int(10) unsigned NOT NULL default '0', project_name varchar(30) NOT NULL default '', @@ -177,6 +256,9 @@ PRIMARY KEY (project_id) ) TYPE=MyISAM; + +#-- +# TBL_PROJECT_GROUP CREATE TABLE TBL_PROJECT_GROUP ( project_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', @@ -186,11 +268,17 @@ KEY group_id (group_id) ) TYPE=MyISAM; + +#-- +# TBL_PROJECT_PERM CREATE TABLE TBL_PROJECT_PERM ( project_id int(11) NOT NULL default '0', user_id int(11) NOT NULL default '0' ) TYPE=MyISAM; + +#-- +# TBL_RESOLUTION CREATE TABLE TBL_RESOLUTION ( resolution_id int(10) unsigned NOT NULL default '0', resolution_name varchar(30) NOT NULL default '', @@ -199,6 +287,9 @@ PRIMARY KEY (resolution_id) ) TYPE=MyISAM; + +#-- +# TBL_SAVED_QUERY CREATE TABLE TBL_SAVED_QUERY ( saved_query_id int(10) unsigned NOT NULL default '0', user_id int(10) unsigned NOT NULL default '0', @@ -207,6 +298,9 @@ PRIMARY KEY (saved_query_id,user_id) ) TYPE=MyISAM; + +#-- +# TBL_SEVERITY CREATE TABLE TBL_SEVERITY ( severity_id int(10) unsigned NOT NULL default '0', severity_name varchar(30) NOT NULL default '', @@ -216,15 +310,19 @@ PRIMARY KEY (severity_id) ) TYPE=MyISAM; -CREATE TABLE TBL_PRIORITY ( - priority_id int(10) unsigned NOT NULL default '0', - priority_name varchar(30) NOT NULL default '', - priority_desc text NOT NULL, + +#-- +# TBL_SITE +CREATE TABLE TBL_SITE ( + site_id tinyint(3) unsigned NOT NULL default '0', + site_name varchar(50) NOT NULL default '', sort_order tinyint(3) unsigned NOT NULL default '0', - priority_color varchar(10) NOT NULL default '#FFFFFF', - PRIMARY KEY (priority_id) + PRIMARY KEY (site_id) ) TYPE=MyISAM; + +#-- +# TBL_STATUS CREATE TABLE TBL_STATUS ( status_id int(10) unsigned NOT NULL default '0', status_name varchar(30) NOT NULL default '', @@ -234,6 +332,9 @@ PRIMARY KEY (status_id) ) TYPE=MyISAM; + +#-- +# TBL_USER_GROUP CREATE TABLE TBL_USER_GROUP ( user_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', @@ -243,6 +344,9 @@ KEY group_id (group_id) ) TYPE=MyISAM; + +#-- +# TBL_USER_PERM CREATE TABLE TBL_USER_PERM ( user_id int(10) unsigned NOT NULL default '0', perm_id int(10) unsigned NOT NULL default '0', @@ -252,6 +356,9 @@ KEY perm_id (perm_id) ) TYPE=MyISAM; + +#-- +# TBL_USER_PREF CREATE TABLE TBL_USER_PREF ( user_id int(11) NOT NULL default '0', email_notices tinyint(1) NOT NULL default '1', @@ -260,6 +367,9 @@ PRIMARY KEY (user_id) ) TYPE=MyISAM; + +#-- +# TBL_VERSION CREATE TABLE TBL_VERSION ( version_id int(10) unsigned NOT NULL default '0', project_id int(10) unsigned NOT NULL default '0', @@ -273,62 +383,62 @@ PRIMARY KEY (version_id) ) TYPE=MyISAM; -CREATE TABLE TBL_DATABASE ( - database_id tinyint(3) unsigned NOT NULL default '0', - database_name varchar(40) NOT NULL default '', - sort_order tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (database_id) -) TYPE=MyISAM; - -CREATE TABLE TBL_SITE ( - site_id tinyint(3) unsigned NOT NULL default '0', - site_name varchar(50) NOT NULL default '', - sort_order tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (site_id) -) TYPE=MyISAM; - -CREATE TABLE TBL_BOOKMARK ( - user_id int(10) unsigned NOT NULL default '0', - bug_id int(10) unsigned NOT NULL default '0' -) TYPE=MyISAM; # # -- Insert initial data -- # + INSERT INTO TBL_AUTH_USER (user_id, login, first_name, last_name, email, password) - values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL', - 'OPTION_ADMIN_PASS'); -create table TBL_AUTH_USER_seq (id int unsigned auto_increment not null primary key); -insert into TBL_AUTH_USER_seq values (1); + values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', + 'OPTION_ADMIN_EMAIL', 'OPTION_ADMIN_PASS'); + +CREATE TABLE TBL_AUTH_USER_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_AUTH_USER_seq values (1); + # Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1); -create table TBL_AUTH_GROUP_seq (id int unsigned auto_increment not null primary key); -insert into TBL_AUTH_GROUP_seq values (3); -# ... and only two permissions +CREATE TABLE TBL_AUTH_GROUP_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_AUTH_GROUP_seq values (3); + + +# ... and four permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (4, 'Assignable'); -# Admins can do all the admin stuff, users can edit bugs, and -# developers are users who can own bugs + +# Admins can do all the admin stuff, INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); + +# users can edit bugs, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); + +# developers are users who can own bugs INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 2); INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (3, 4); -# Insert user_id 1 into the admin group + +# Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); + # Add user's prefs as default values for all users defined so far (only admin) INSERT INTO TBL_USER_PREF (user_id) SELECT USER_ID FROM TBL_AUTH_USER; + +# +# -- Initialize the CONFIGURATION table -- +# + INSERT INTO TBL_CONFIGURATION VALUES ('INSTALL_URL','OPTION_INSTALL_URL','The base URL of the phpBugTracker installation','string'); INSERT INTO TBL_CONFIGURATION VALUES ('JPGRAPH_PATH','','If not in the include path. This is the file path on the web server, not a URL.','string'); INSERT INTO TBL_CONFIGURATION VALUES ('CVS_WEB','http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/','Location of your cvs web interface (see format_comments() in bug.php)','string'); @@ -361,6 +471,11 @@ INSERT INTO TBL_CONFIGURATION VALUES ('BUG_REOPENED','4','The status to assign a bug when it is reopened.','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool'); + +# +# -- Initialize the OS table -- +# + INSERT INTO TBL_OS VALUES (1,'All',1,''); INSERT INTO TBL_OS VALUES (2,'Windows 3.1',2,'/Mozilla.*\\(Win16.*\\)/'); INSERT INTO TBL_OS VALUES (3,'Windows 95',3,'/Mozilla.*\\(.*;.*; 32bit.*\\)/'); @@ -392,8 +507,15 @@ INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/'); INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/'); INSERT INTO TBL_OS VALUES (31,'other',31,''); -create table TBL_OS_seq (id int unsigned auto_increment not null primary key); -insert into TBL_OS_seq values (31); + +CREATE TABLE TBL_OS_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_OS_seq values (31); + + +# +# -- Initialize the RESOLUTION table -- +# INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1); INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It''s not a bug -- it''s a feature!',2); @@ -401,8 +523,15 @@ INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We''ll get around to it later',4); INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can''t replicate the bug',5); INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6); -create table TBL_RESOLUTION_seq (id int unsigned auto_increment not null primary key); -insert into TBL_RESOLUTION_seq values (6); + +CREATE TABLE TBL_RESOLUTION_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_RESOLUTION_seq values (6); + + +# +# -- Initialize the SEVERITY table -- +# INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada'); INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0'); @@ -411,32 +540,60 @@ INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa'); INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0'); INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa'); -create table TBL_SEVERITY_seq (id int unsigned auto_increment not null primary key); -insert into TBL_SEVERITY_seq values (7); + +CREATE TABLE TBL_SEVERITY_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_SEVERITY_seq values (7); + + +# +# -- Initialize the PRIORITY table -- +# INSERT INTO TBL_PRIORITY VALUES (1,'Low','Fix if possible',1,'#dadada'); INSERT INTO TBL_PRIORITY VALUES (2,'Medium Low','Must fix before final',2,'#dad0d0'); INSERT INTO TBL_PRIORITY VALUES (3,'Medium','Fix before next milestone (alpha, beta, etc.)',3,'#dac0c0'); INSERT INTO TBL_PRIORITY VALUES (4,'Medium High','Fix as soon as possible',4,'#dab0b0'); INSERT INTO TBL_PRIORITY VALUES (5,'High','Fix immediately',5,'#daaaaa'); -create table TBL_PRIORITY_seq (id int unsigned auto_increment not null primary key); -insert into TBL_PRIORITY_seq values (5); -INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1, 1); +CREATE TABLE TBL_PRIORITY_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_PRIORITY_seq values (5); + + +# +# -- Initialize the STATUS table -- +# + +INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1,1); INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2,1); INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3,1); INSERT INTO TBL_STATUS VALUES (4,'Reopened','Closed but opened again for further inspection',4,1); INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5,0); INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6,0); INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7,0); -create table TBL_STATUS_seq (id int unsigned auto_increment not null primary key); -insert into TBL_STATUS_seq values (7); + +CREATE TABLE TBL_STATUS_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_STATUS_seq values (7); + + +# +# -- Initialize the DATABASE table -- +# INSERT INTO TBL_DATABASE VALUES (1,'Oracle 8.1.7',1); INSERT INTO TBL_DATABASE VALUES (2,'MySQL 3.23.49',2); INSERT INTO TBL_DATABASE VALUES (3,'PostgreSQL 7.1.3',3); -create table TBL_DATABASE_seq (id int unsigned auto_increment not null primary key); -insert into TBL_DATABASE_seq values (3); + +CREATE TABLE TBL_DATABASE_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_DATABASE_seq values (3); + + +# +# -- Initialize the SITE table -- +# # Examples only INSERT INTO TBL_SITE VALUES (0,'All',1); @@ -444,17 +601,34 @@ INSERT INTO TBL_SITE VALUES (2,'Production - location 2',3); INSERT INTO TBL_SITE VALUES (3,'Test site - location 1',4); INSERT INTO TBL_SITE VALUES (4,'Test site - location 2',5); -create table TBL_SITE_seq (id int unsigned auto_increment not null primary key); -insert into TBL_SITE_seq values (4); -#-- Sequences for the tables with no initial entries -create table TBL_BUG_seq (id int unsigned auto_increment not null primary key); -insert into TBL_BUG_seq values(1); -create table TBL_COMMENT_seq (id int unsigned auto_increment not null primary key); -insert into TBL_COMMENT_seq values(1); -create table TBL_COMPONENT_seq (id int unsigned auto_increment not null primary key); -insert into TBL_COMPONENT_seq values(1); -create table TBL_PROJECT_seq (id int unsigned auto_increment not null primary key); -insert into TBL_PROJECT_seq values(1); -create table TBL_VERSION_seq (id int unsigned auto_increment not null primary key); -insert into TBL_VERSION_seq values(1); +CREATE TABLE TBL_SITE_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_SITE_seq values (4); + + +# +# -- Sequences for the tables with no initial entries -- +# + +CREATE TABLE TBL_BUG_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_BUG_seq values(1); + +CREATE TABLE TBL_COMMENT_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_COMMENT_seq values(1); + +CREATE TABLE TBL_COMPONENT_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_COMPONENT_seq values(1); + +CREATE TABLE TBL_PROJECT_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_PROJECT_seq values(1); + +CREATE TABLE TBL_VERSION_seq ( + id int unsigned auto_increment not null primary key); +INSERT INTO TBL_VERSION_seq values(1); + +#-- Index: oci8.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/oci8.in,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- oci8.in 20 Jun 2005 01:05:29 -0000 1.28 +++ oci8.in 23 Aug 2005 21:09:42 -0000 1.29 @@ -1,9 +1,12 @@ +# Oracle database creation script +# This is a template for install.php -- not for creating the database! +# +# $Id$ --- Oracle database creation script --- This is a template for install.php -- not for creating the database! --- --- $Id$ + +#-- +# TBL_ATTACHMENT CREATE TABLE TBL_ATTACHMENT ( attachment_id number(10) default '0' NOT NULL, bug_id number(10) default '0' NOT NULL, @@ -16,6 +19,9 @@ PRIMARY KEY (attachment_id) ) ; + +#-- +# TBL_AUTH_GROUP CREATE TABLE TBL_AUTH_GROUP ( group_id number(10) default '0' NOT NULL, group_name varchar2(80) default '' NOT NULL, @@ -28,6 +34,9 @@ PRIMARY KEY (group_id) ) ; + +#-- +# TBL_AUTH_PERM CREATE TABLE TBL_AUTH_PERM ( perm_id number(10) default '0' NOT NULL, perm_name varchar2(80) default '' NOT NULL, @@ -38,6 +47,9 @@ PRIMARY KEY (perm_id) ) ; + +#-- +# TBL_AUTH_USER CREATE TABLE TBL_AUTH_USER ( user_id number(10) default '0' NOT NULL, login varchar2(40) default '' NOT NULL UNIQUE, @@ -54,6 +66,9 @@ PRIMARY KEY (user_id) ) ; + +#-- +# TBL_BUG CREATE TABLE TBL_BUG ( bug_id number(10) default '0' NOT NULL, title varchar2(100) default '' NOT NULL, @@ -81,6 +96,9 @@ PRIMARY KEY (bug_id) ) ; + +#-- +# TBL_BUG_CC CREATE TABLE TBL_BUG_CC ( bug_id number(10) default '0' NOT NULL, user_id number(10) default '0' NOT NULL, @@ -89,12 +107,18 @@ PRIMARY KEY (bug_id ,user_id) ) ; + +#-- +# TBL_BUG_DEPENDENCY CREATE TABLE TBL_BUG_DEPENDENCY ( bug_id number(10) default '0' NOT NULL, depends_on number(10) default '0' NOT NULL, PRIMARY KEY (bug_id ,depends_on) ) ; + +#-- +# TBL_BUG_GROUP CREATE TABLE TBL_BUG_GROUP ( bug_id number(10) default '0' NOT NULL, group_id number(10) default '0' NOT NULL, @@ -103,6 +127,9 @@ CREATE INDEX GROUPIDX ON TBL_BUG_GROUP ( group_id ); + +#-- +# TBL_BUG_HISTORY CREATE TABLE TBL_BUG_HISTORY ( bug_id number(10) default '0' NOT NULL, changed_field varchar2(30) default '' NOT NULL, @@ -112,6 +139,9 @@ created_date number(20) default '0' ) ; + +#-- +# TBL_BUG_VOTE CREATE TABLE TBL_BUG_VOTE ( user_id number(10) default '0' NOT NULL, bug_id number(10) default '0' NOT NULL, @@ -121,6 +151,9 @@ CREATE INDEX BUGIDX ON TBL_BUG_VOTE ( bug_id ); + +#-- +# TBL_COMMENT CREATE TABLE TBL_COMMENT ( comment_id number(10) default '0' NOT NULL, bug_id number(10) default '0' NOT NULL, @@ -130,6 +163,9 @@ PRIMARY KEY (comment_id) ) ; + +#-- +# TBL_COMPONENT CREATE TABLE TBL_COMPONENT ( component_id number(10) default '0' NOT NULL, project_id number(10) default '0' NOT NULL, @@ -144,6 +180,9 @@ PRIMARY KEY (component_id) ) ; + +#-- +# TBL_CONFIGURATION CREATE TABLE TBL_CONFIGURATION ( varname varchar2(40) default '' NOT NULL, varvalue varchar2(255) default '' , @@ -152,6 +191,9 @@ PRIMARY KEY (varname) ) ; + +#-- +# TBL_GROUP_PERM CREATE TABLE TBL_GROUP_PERM ( group_id number(10) default '0' NOT NULL, perm_id number(10) default '0' NOT NULL, @@ -160,6 +202,9 @@ CREATE INDEX PERMIDX ON TBL_GROUP_PERM ( perm_id ); + +#-- +# TBL_OS CREATE TABLE TBL_OS ( os_id number(10) default '0' NOT NULL, os_name varchar2(30) default '' NOT NULL, @@ -168,6 +213,9 @@ PRIMARY KEY (os_id) ) ; + +#-- +# TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id number(10) default '0' NOT NULL, project_name varchar2(30) default '' NOT NULL, @@ -180,6 +228,9 @@ PRIMARY KEY (project_id) ) ; + +#-- +# TBL_PROJECT_GROUP CREATE TABLE TBL_PROJECT_GROUP ( project_id number(10) default '0' NOT NULL, group_id number(10) default '0' NOT NULL, @@ -190,11 +241,17 @@ CREATE INDEX GROUPPROJIDX ON TBL_PROJECT_GROUP ( group_id ); + +#-- +# TBL_PROJECT_PERM CREATE TABLE TBL_PROJECT_PERM ( project_id number(10) default '0' NOT NULL, user_id number(10) default '0' NOT NULL ); + +#-- +# TBL_RESOLUTION CREATE TABLE TBL_RESOLUTION ( resolution_id number(10) default '0' NOT NULL, resolution_name varchar2(30) default '' NOT NULL, @@ -203,6 +260,9 @@ PRIMARY KEY (resolution_id) ) ; + +#-- +# TBL_SAVED_QUERY CREATE TABLE TBL_SAVED_QUERY ( saved_query_id number(10) default '0' NOT NULL, user_id number(10) default '0' NOT NULL, @@ -211,6 +271,9 @@ PRIMARY KEY (saved_query_id ,user_id) ) ; + +#-- +# TBL_SEVERITY CREATE TABLE TBL_SEVERITY ( severity_id number(10) default '0' NOT NULL, severity_name varchar2(30) default '' NOT NULL, @@ -220,6 +283,9 @@ PRIMARY KEY (severity_id) ) ; + +#-- +# TBL_STATUS CREATE TABLE TBL_STATUS ( status_id number(10) default '0' NOT NULL, status_name varchar2(30) default '' NOT NULL, @@ -229,6 +295,9 @@ PRIMARY KEY (status_id) ) ; + +#-- +# TBL_USER_GROUP CREATE TABLE TBL_USER_GROUP ( user_id number(10) default '0' NOT NULL, group_id number(10) default '0' NOT NULL, @@ -239,6 +308,9 @@ CREATE INDEX GROUPUSERIDX ON TBL_USER_GROUP ( group_id ); + +#-- +# TBL_USER_PERM CREATE TABLE TBL_USER_PERM ( user_id number(10) default '0' NOT NULL, perm_id number(10) default '0' NOT NULL, @@ -246,8 +318,12 @@ created_date number(20) default '0' NOT NULL, PRIMARY KEY (user_id ,perm_id) ) ; + CREATE INDEX PERMUSERIDX ON TBL_USER_PERM ( perm_id ); + +#-- +# TBL_USER_PREF CREATE TABLE TBL_USER_PREF ( user_id number(10) default '0' NOT NULL, email_notices number(1) default '1' NOT NULL, @@ -256,6 +332,9 @@ PRIMARY KEY (user_id) ); + +#-- +# TBL_VERSION CREATE TABLE TBL_VERSION ( version_id number(10) default '0' NOT NULL, project_id number(10) default '0' NOT NULL, @@ -268,6 +347,9 @@ PRIMARY KEY (version_id) ) ; + +#-- +# TBL_DATABASE CREATE TABLE TBL_DATABASE ( database_id number(3) default '0' NOT NULL, database_name varchar2(40) default '' NOT NULL, @@ -275,6 +357,9 @@ PRIMARY KEY (database_id) ); + +#-- +# TBL_SITE CREATE TABLE TBL_SITE ( site_id number(3) default '0' NOT NULL, site_name varchar2(50) default '' NOT NULL, @@ -282,33 +367,51 @@ PRIMARY KEY (site_id) ); + +# +# -- Insert initial data -- +# + INSERT INTO TBL_AUTH_USER (user_id, login, first_name, last_name, email, password) - values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL', - 'OPTION_ADMIN_PASS'); + values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', + 'OPTION_ADMIN_EMAIL', 'OPTION_ADMIN_PASS'); + CREATE SEQUENCE TBL_AUTH_USER_seq START WITH 2 NOCACHE; --- Start off with three user levels... + +# Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1); + CREATE SEQUENCE TBL_AUTH_GROUP_seq START WITH 4 NOCACHE; --- ... and only two permissions + +# ... and only two permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); --- Admins can do all the admin stuff and users can edit bugs + +# Admins can do all the admin stuff, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); + +# users can edit bugs INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); --- And user_id 1 is an admin and a user + +# Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); -INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 2); --- Add user's prefs as default values for all users defined so far (only admin) + +# Add user's prefs as default values for all users defined so far (only admin) INSERT INTO TBL_USER_PREF (user_id) values (1); + +# +# -- Initialize the CONFIGURATION table -- +# + INSERT INTO TBL_CONFIGURATION VALUES ('INSTALL_URL','OPTION_INSTALL_URL','The base URL of the phpBugTracker installation','string'); INSERT INTO TBL_CONFIGURATION VALUES ('JPGRAPH_PATH','','If not in the include path. This is the file path on the web server, not a URL.','string'); INSERT INTO TBL_CONFIGURATION VALUES ('CVS_WEB','http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/','Location of your cvs web interface (see format_comments() in bug.php)','string'); @@ -341,6 +444,11 @@ INSERT INTO TBL_CONFIGURATION VALUES ('BUG_CLOSED','7','The status to assign a bug when it is closed.','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool'); + +# +# -- Initialize the OS table -- +# + INSERT INTO TBL_OS VALUES (1,'All',1,''); INSERT INTO TBL_OS VALUES (2,'Windows 3.1',2,'/Mozilla.*\\(Win16.*\\)/'); INSERT INTO TBL_OS VALUES (3,'Windows 95',3,'/Mozilla.*\\(.*;.*; 32bit.*\\)/'); @@ -372,16 +480,28 @@ INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/'); INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/'); INSERT INTO TBL_OS VALUES (31,'other',31,''); + CREATE SEQUENCE TBL_OS_seq START WITH 32 NOCACHE; + +# +# -- Initialize the RESOLUTION table -- +# + INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1); INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It''s not a bug -- it''s a feature!',2); INSERT INTO TBL_RESOLUTION VALUES (3,'Won''t Fix','This bug will stay',3); INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We''ll get around to it later',4); INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can''t replicate the bug',5); INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6); + CREATE SEQUENCE TBL_RESOLUTION_seq START WITH 7 NOCACHE; + +# +# -- Initialize the SEVERITY table -- +# + INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada'); INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0'); INSERT INTO TBL_SEVERITY VALUES (3,'Feature Request','Requests for specific features',3,'#dacaca'); @@ -389,8 +509,14 @@ INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa'); INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0'); INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa'); + CREATE SEQUENCE TBL_SEVERITY_seq START WITH 8 NOCACHE; + +# +# -- Initialize the STATUS table -- +# + INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1); INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2); INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3); @@ -398,23 +524,43 @@ INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5); INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6); INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7); + CREATE SEQUENCE TBL_STATUS_seq START WITH 8 NOCACHE; + +# +# -- Initialize the DATABASE table -- +# + INSERT INTO TBL_DATABASE VALUES (1,'Oracle 8.1.7',1); INSERT INTO TBL_DATABASE VALUES (2,'MySQL 3.23.49',2); INSERT INTO TBL_DATABASE VALUES (3,'PostgreSQL 7.1.3',3); + CREATE SEQUENCE TBL_DATABASE_seq START WITH 4 NOCACHE; + +# +# -- Initialize the SITE table -- +# + +# Examples only INSERT INTO TBL_SITE VALUES (0,'All',1); INSERT INTO TBL_SITE VALUES (1,'Production - location 1',2); INSERT INTO TBL_SITE VALUES (2,'Production - location 2',3); INSERT INTO TBL_SITE VALUES (3,'Test site - location 1',4); INSERT INTO TBL_SITE VALUES (4,'Test site - location 2',5); + CREATE SEQUENCE TBL_SITE_seq START WITH 5 NOCACHE; --- Sequences for the tables with no initial entries + +# +# -- Sequences for the tables with no initial entries -- +# + CREATE SEQUENCE TBL_BUG_seq START WITH 1 NOCACHE; CREATE SEQUENCE TBL_COMMENT_seq START WITH 1 NOCACHE; CREATE SEQUENCE TBL_COMPONENT_seq START WITH 1 NOCACHE; CREATE SEQUENCE TBL_PROJECT_seq START WITH 1 NOCACHE; CREATE SEQUENCE TBL_VERSION_seq START WITH 1 NOCACHE; + +#-- Index: pgsql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- pgsql.in 20 Jun 2005 01:05:29 -0000 1.48 +++ pgsql.in 23 Aug 2005 21:09:42 -0000 1.49 @@ -1,12 +1,12 @@ - --- PostgreSQL database creation script --- This is a template for install.php -- not for creating the database! --- --- $Id$ +# PostgreSQL database creation script +# This is a template for install.php -- not for creating the database! +# +# $Id$ BEGIN; - +#-- +# TBL_ATTACHMENT CREATE TABLE TBL_ATTACHMENT ( attachment_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', @@ -19,6 +19,9 @@ PRIMARY KEY (attachment_id) ); + +#-- +# TBL_AUTH_GROUP CREATE TABLE TBL_AUTH_GROUP ( group_id INT4 NOT NULL DEFAULT '0', group_name varchar(80) NOT NULL DEFAULT '', @@ -31,6 +34,9 @@ PRIMARY KEY (group_id) ); + +#-- +# TBL_AUTH_PERM CREATE TABLE TBL_AUTH_PERM ( perm_id INT4 NOT NULL DEFAULT '0', perm_name varchar(80) NOT NULL DEFAULT '', @@ -41,6 +47,9 @@ PRIMARY KEY (perm_id) ); + +#-- +# TBL_AUTH_USER CREATE TABLE TBL_AUTH_USER ( user_id INT4 NOT NULL DEFAULT '0', login varchar(40) NOT NULL DEFAULT '', @@ -57,6 +66,9 @@ PRIMARY KEY (user_id) ); + +#-- +# TBL_BUG CREATE TABLE TBL_BUG ( bug_id INT4 NOT NULL DEFAULT '0', title varchar(100) NOT NULL DEFAULT '', @@ -84,6 +96,9 @@ PRIMARY KEY (bug_id) ); + +#-- +# TBL_BUG_CC CREATE TABLE TBL_BUG_CC ( bug_id INT4 NOT NULL DEFAULT '0', user_id INT4 NOT NULL DEFAULT '0', @@ -92,18 +107,27 @@ PRIMARY KEY (bug_id,user_id) ); + +#-- +# TBL_BUG_DEPENDENCY CREATE TABLE TBL_BUG_DEPENDENCY ( bug_id INT4 NOT NULL DEFAULT '0', depends_on INT4 NOT NULL DEFAULT '0', PRIMARY KEY (bug_id,depends_on) ); + +#-- +# TBL_BUG_GROUP CREATE TABLE TBL_BUG_GROUP ( bug_id INT4 NOT NULL DEFAULT '0', group_id INT4 NOT NULL DEFAULT '0', PRIMARY KEY (bug_id,group_id) ); + +#-- +# TBL_BUG_HISTORY CREATE TABLE TBL_BUG_HISTORY ( bug_id INT4 NOT NULL DEFAULT '0', changed_field varchar(30) NOT NULL DEFAULT '', @@ -113,6 +137,9 @@ created_date INT8 NOT NULL DEFAULT '0' ); + +#-- +# TBL_BUG_VOTE CREATE TABLE TBL_BUG_VOTE ( user_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', @@ -120,6 +147,9 @@ PRIMARY KEY (user_id,bug_id) ); + +#-- +# TBL_COMMENT CREATE TABLE TBL_COMMENT ( comment_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', @@ -129,6 +159,9 @@ PRIMARY KEY (comment_id) ); + +#-- +# TBL_COMPONENT CREATE TABLE TBL_COMPONENT ( component_id INT4 NOT NULL DEFAULT '0', project_id INT4 NOT NULL DEFAULT '0', @@ -143,6 +176,9 @@ PRIMARY KEY (component_id) ); + +#-- +# TBL_CONFIGURATION CREATE TABLE TBL_CONFIGURATION ( varname varchar(40) NOT NULL DEFAULT '', varvalue varchar(255) NOT NULL DEFAULT '', @@ -151,12 +187,28 @@ PRIMARY KEY (varname) ); + +#-- +# TBL_DATABASE +CREATE TABLE TBL_DATABASE ( + database_id INT2 NOT NULL DEFAULT '0', + database_name varchar(40) NOT NULL DEFAULT '', + sort_order INT2 NOT NULL DEFAULT '0', + PRIMARY KEY (database_id) +); + + +#-- +# TBL_GROUP_PERM CREATE TABLE TBL_GROUP_PERM ( group_id INT4 NOT NULL DEFAULT '0', perm_id INT4 NOT NULL DEFAULT '0', PRIMARY KEY (group_id,perm_id) ); + +#-- +# TBL_OS CREATE TABLE TBL_OS ( os_id INT4 NOT NULL DEFAULT '0', os_name varchar(30) NOT NULL DEFAULT '', @@ -165,6 +217,9 @@ PRIMARY KEY (os_id) ); + +#-- +# TBL_PROJECT CREATE TABLE TBL_PROJECT ( project_id INT4 NOT NULL DEFAULT '0', project_name varchar(30) NOT NULL DEFAULT '', @@ -177,6 +232,9 @@ PRIMARY KEY (project_id) ); + +#-- +# TBL_PROJECT_GROUP CREATE TABLE TBL_PROJECT_GROUP ( project_id INT4 NOT NULL DEFAULT '0', group_id INT4 NOT NULL DEFAULT '0', @@ -185,11 +243,17 @@ PRIMARY KEY (project_id,group_id) ); + +#-- +# TBL_PROJECT_PERM CREATE TABLE TBL_PROJECT_PERM ( project_id INT4 NOT NULL DEFAULT '0', user_id INT4 NOT NULL DEFAULT '0' ); + +#-- +# TBL_RESOLUTION CREATE TABLE TBL_RESOLUTION ( resolution_id INT4 NOT NULL DEFAULT '0', resolution_name varchar(30) NOT NULL DEFAULT '', @@ -199,6 +263,8 @@ ); +#-- +# TBL_SAVED_QUERY CREATE TABLE TBL_SAVED_QUERY ( saved_query_id INT4 DEFAULT '0', user_id INT4 NOT NULL DEFAULT '0', @@ -207,6 +273,9 @@ PRIMARY KEY (saved_query_id,user_id) ); + +#-- +# TBL_SEVERITY CREATE TABLE TBL_SEVERITY ( severity_id INT4 NOT NULL DEFAULT '0', severity_name varchar(30) NOT NULL DEFAULT '', @@ -216,6 +285,19 @@ PRIMARY KEY (severity_id) ); + +#-- +# TBL_SITE +CREATE TABLE TBL_SITE ( + site_id INT2 NOT NULL DEFAULT '0', + site_name varchar(50) NOT NULL DEFAULT '', + sort_order INT2 NOT NULL DEFAULT '0', + PRIMARY KEY (site_id) +); + + +#-- +# TBL_STATUS CREATE TABLE TBL_STATUS ( status_id INT4 NOT NULL DEFAULT '0', status_name varchar(30) NOT NULL DEFAULT '', @@ -225,6 +307,9 @@ PRIMARY KEY (status_id) ); + +#-- +# TBL_USER_GROUP CREATE TABLE TBL_USER_GROUP ( user_id INT4 NOT NULL DEFAULT '0', group_id INT4 NOT NULL DEFAULT '0', @@ -233,6 +318,9 @@ PRIMARY KEY (user_id,group_id) ); + +#-- +# TBL_USER_PERM CREATE TABLE TBL_USER_PERM ( user_id INT4 NOT NULL DEFAULT '0', perm_id INT4 NOT NULL DEFAULT '0', @@ -241,14 +329,20 @@ PRIMARY KEY (user_id,perm_id) ); + +#-- +# TBL_USER_PREF CREATE TABLE TBL_USER_PREF ( - user_id INT4 NOT NULL DEFAULT '0', - email_notices INT2 NOT NULL DEFAULT '1', - saved_queries INT2 NOT NULL DEFAULT '1', - def_results INT4 NOT NULL DEFAULT '20', - PRIMARY KEY (user_id) + user_id INT4 NOT NULL DEFAULT '0', + email_notices INT2 NOT NULL DEFAULT '1', + saved_queries INT2 NOT NULL DEFAULT '1', + def_results INT4 NOT NULL DEFAULT '20', + PRIMARY KEY (user_id) ); + +#-- +# TBL_VERSION CREATE TABLE TBL_VERSION ( version_id INT4 NOT NULL DEFAULT '0', project_id INT4 NOT NULL DEFAULT '0', @@ -261,52 +355,53 @@ PRIMARY KEY (version_id) ); -CREATE TABLE TBL_DATABASE ( - database_id INT2 NOT NULL DEFAULT '0', - database_name varchar(40) NOT NULL DEFAULT '', - sort_order INT2 NOT NULL DEFAULT '0', - PRIMARY KEY (database_id) -); -CREATE TABLE TBL_SITE ( - site_id INT2 NOT NULL DEFAULT '0', - site_name varchar(50) NOT NULL DEFAULT '', - sort_order INT2 NOT NULL DEFAULT '0', - PRIMARY KEY (site_id) -); +# +# -- Insert initial data -- +# --- --- -- Insert initial data -- --- INSERT INTO TBL_AUTH_USER (user_id, login, first_name, last_name, email, password) - values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL', - 'OPTION_ADMIN_PASS'); + values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', + 'OPTION_ADMIN_EMAIL', 'OPTION_ADMIN_PASS'); + CREATE SEQUENCE TBL_AUTH_USER_seq START 2; --- Start off with three user levels... + +# Start off with three user levels... INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1); INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1); + CREATE SEQUENCE TBL_AUTH_GROUP_seq START 4; --- ... and only two permissions + +# ... and three permissions INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug'); INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment'); --- Admins can do all the admin stuff and users can edit bugs + +# Admins can do all the admin stuff, and INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1); + +# users can edit bugs INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2); --- And user_id 1 is an admin and a user + +# Insert user_id 1 into the admin group INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1); -INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 2); --- Add user's prefs as default values for all users defined so far (only admin) + +# Add user's prefs as default values for all users defined so far (only admin) INSERT INTO TBL_USER_PREF (user_id) values (1); + +# +# -- Initialize the CONFIGURATION table -- +# + INSERT INTO TBL_CONFIGURATION VALUES ('INSTALL_URL','OPTION_INSTALL_URL','The base URL of the phpBugTracker installation','string'); INSERT INTO TBL_CONFIGURATION VALUES ('JPGRAPH_PATH','','If not in the include path. This is the file path on the web server, not a URL.','string'); INSERT INTO TBL_CONFIGURATION VALUES ('CVS_WEB','http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/','Location of your cvs web interface (see format_comments() in bug.php)','string'); @@ -338,6 +433,11 @@ INSERT INTO TBL_CONFIGURATION VALUES ('BUG_REOPENED','4','The status to assign a bug when it is reopened.','multi'); INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool'); + +# +# -- Initialize the OS table -- +# + INSERT INTO TBL_OS VALUES (1,'All',1,''); INSERT INTO TBL_OS VALUES (2,'Windows 3.1',2,'/Mozilla.*\\(Win16.*\\)/'); INSERT INTO TBL_OS VALUES (3,'Windows 95',3,'/Mozilla.*\\(.*;.*; 32bit.*\\)/'); @@ -369,16 +469,28 @@ INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/'); INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/'); INSERT INTO TBL_OS VALUES (31,'other',31,''); + CREATE SEQUENCE TBL_OS_seq START 32; + +# +# -- Initialize the RESOLUTION table -- +# + INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1); INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It''s not a bug -- it''s a feature!',2); INSERT INTO TBL_RESOLUTION VALUES (3,'Won''t Fix','This bug will stay',3); INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We''ll get around to it later',4); INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can''t replicate the bug',5); INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6); + CREATE SEQUENCE TBL_RESOLUTION_seq START 7; + +# +# -- Initialize the SEVERITY table -- +# + INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada'); INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0'); INSERT INTO TBL_SEVERITY VALUES (3,'Feature Request','Requests for specific features',3,'#dacaca'); @@ -386,8 +498,14 @@ INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa'); INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0'); INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa'); + CREATE SEQUENCE TBL_SEVERITY_seq START 8; + +# +# -- Initialize the STATUS table -- +# + INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1,1); INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2,1); INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3,1); @@ -395,53 +513,55 @@ INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5,0); INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6,0); INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7,0); + CREATE SEQUENCE TBL_STATUS_seq START 8; + +# +# -- Initialize the DATABASE table -- +# + INSERT INTO TBL_DATABASE VALUES (1,'Oracle 8.1.7',1); INSERT INTO TBL_DATABASE VALUES (2,'MySQL 3.23.49',2); INSERT INTO TBL_DATABASE VALUES (3,'PostgreSQL 7.1.3',3); + CREATE SEQUENCE TBL_DATABASE_seq START 4; + +# +# -- Initialize the SITE table -- +# + +# Examples only INSERT INTO TBL_SITE VALUES (0,'All',1); INSERT INTO TBL_SITE VALUES (1,'Production - location 1',2); INSERT INTO TBL_SITE VALUES (2,'Production - location 2',3); INSERT INTO TBL_SITE VALUES (3,'Test site - location 1',4); INSERT INTO TBL_SITE VALUES (4,'Test site - location 2',5); -CREATE SEQUENCE TBL_SITE_seq START 5; --- --- Indexes for table TBL_GROUP_PERM --- +CREATE SEQUENCE TBL_SITE_seq START 5; -CREATE INDEX perm_id_TBL_GROUP_PERM_index ON TBL_GROUP_PERM (perm_id); --- --- Indexes for table TBL_USER_GROUP --- +# +# -- Create indexes -- +# +CREATE INDEX perm_id_TBL_GROUP_PERM_index ON TBL_GROUP_PERM (perm_id); CREATE INDEX group_id_TBL_USER_GROUP_index ON TBL_USER_GROUP (group_id); - --- --- Indexes for table TBL_USER_PERM --- - CREATE INDEX perm_id_TBL_USER_PERM_index ON TBL_USER_PERM (perm_id); +CREATE INDEX group_id_TBL_BUG_GROUP_index ON TBL_BUG_GROUP (group_id); --- --- Indexes for table TBL_BUG_GROUP --- -CREATE INDEX group_id_TBL_BUG_GROUP_index ON TBL_BUG_GROUP (group_id); +# +# -- Sequences for the tables with no initial entries -- +# --- Sequences for the tables with no initial entries --- CREATE SEQUENCE TBL_BUG_seq; CREATE SEQUENCE TBL_COMMENT_seq; CREATE SEQUENCE TBL_COMPONENT_seq; CREATE SEQUENCE TBL_PROJECT_seq; CREATE SEQUENCE TBL_VERSION_seq; --- +#-- COMMIT; - |
|
From: Ulf E. <ulf...@us...> - 2005-08-23 21:09:50
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22034/phpbt/inc/db Modified Files: mssql.php mysql.php oci8.php pgsql.php Log Message: Sorting and reformatting to simplify updates in future Index: mssql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mssql.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mssql.php 19 Jul 2005 19:44:36 -0000 1.2 +++ mssql.php 23 Aug 2005 21:09:42 -0000 1.3 @@ -1,178 +1,414 @@ <?php +// mssql.php - Microsoft SQL Server queries + $QUERY = array( - 'admin-list-groups' => 'select ag.group_id, group_name, locked, '. - 'count(ug.group_id) as count, assignable '. - 'from '.TBL_AUTH_GROUP.' ag '. - 'left join '.TBL_USER_GROUP.' ug on ug.group_id = ag.group_id '. - 'left join '.TBL_AUTH_USER.' au on ug.user_id = au.user_id '. - 'group by ag.group_id, group_name, locked, assignable '. - 'order by %s %s', - 'admin-list-oses' => 'select s.os_id, os_name, regex, sort_order, '. - 'count(bug_id) as bug_count '. - 'from '.TBL_OS.' s '. - 'left join '.TBL_BUG.' b on s.os_id = b.os_id '. - 'group by s.os_id, os_name, regex, sort_order '. - 'order by %s %s', - 'admin-show-version' => 'select v.*, p.project_name as project_name '. - 'from '.TBL_VERSION.' v left join '.TBL_PROJECT.' p on p.project_id = v.project_id'. - 'where version_id = \'%s\'', - 'admin-show-component' => 'select c.*, p.project_name as project_name '. - 'from '.TBL_COMPONENT.' c left join '.TBL_PROJECT.' p on p.project_id = c.project_id '. - 'where component_id = \'%s\'', - 'admin-list-resolutions' => 'select s.resolution_id, resolution_name, '. - 'resolution_desc, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_RESOLUTION. ' s left join '.TBL_BUG.' b on b.resolution_id = s.resolution_id '. - 'group by s.resolution_id, resolution_name, resolution_desc, sort_order '. - 'order by %s %s', - 'admin-list-severities' => 'select s.severity_id, severity_name, '. - 'severity_desc, severity_color, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_SEVERITY. ' s left join '.TBL_BUG.' b on b.severity_id = s.severity_id '. - 'group by s.severity_id, severity_name, severity_desc, severity_color, '. - 'sort_order '. - 'order by %s %s', - 'admin-list-databases' => 'select d.database_id, database_name, '. - 'sort_order, count(bug_id) as bug_count '. - 'from '.TBL_DATABASE. ' d left join '.TBL_BUG.' b on b.database_id = d.database_id '. - 'group by d.database_id, database_name, sort_order '. - 'order by %s %s', - 'admin-list-sites' => 'select s.site_id, site_name, sort_order, '. - 'count(bug_id) as bug_count from '.TBL_SITE. ' s left join '. - TBL_BUG.' b on b.site_id = s.site_id group by s.site_id, site_name, sort_order '. - 'order by %s %s', - 'admin-list-statuses' => 'select s.status_id, status_name, status_desc, '. - 'sort_order, bug_open, count(bug_id) as bug_count '. - 'from '.TBL_STATUS.' s left join '. TBL_BUG.' b on b.status_id = s.status_id '. - 'group by s.status_id, status_name, status_desc, sort_order '. - 'order by %s %s', - 'admin-user-groups' => 'select ug.group_id '. - 'from '.TBL_USER_GROUP.' ug left join '.TBL_AUTH_GROUP.' g on g.group_id = ug.group_id '. - 'where user_id = %s and group_name <> \'User\'', - 'bug-history' => 'select bh.*, login '. - 'from '.TBL_BUG_HISTORY.' bh '. - 'left join '. TBL_AUTH_USER.' on bh.created_by = user_id '. - 'where bug_id = %s order by bh.created_date', - 'bug-cc-list' => 'select email '. - 'from '.TBL_BUG_CC.' b left join '. TBL_AUTH_USER.' u on u.user_id = b.user_id, '. - TBL_USER_PREF.' p '. - 'where bug_id = %s and u.user_id = p.user_id and email_notices = 1', - 'bug-printable' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, project_name, component_name, version_name, '. - 'severity_name, os_name, status_name, resolution_name '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. - TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_OS.' os, '. TBL_VERSION.' v, '. - TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. - 'where bug_id = %s and b.project_id not in (%s) '. - 'and b.severity_id = sv.severity_id '. - 'and b.os_id = os.os_id and b.version_id = v.version_id '. - 'and b.component_id = c.component_id and b.project_id = p.project_id '. - 'and b.status_id = st.status_id', - 'bug-prev-next' => 'select bug_id, reporter.login as reporter, '. - 'owner.login as owner '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. - 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. - 'left join '.TBL_DATABASE.' db on b.database_id = db.database_id '. - 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. - 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. - TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '. - TBL_VERSION.' version, '.TBL_COMPONENT.' component, '. - TBL_PROJECT.' project, '.TBL_SITE.' site '. - 'where b.severity_id = severity.severity_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.project_id = project.project_id and %s '. - 'and b.site_id = site.site_id '. - 'and bug_id <> %s '. - 'order by %s %s, bug_id asc', - 'bug-show-bug' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, status_name, resolution_name '. + 'admin-list-components' => + 'select '. + 'c.component_id, '. + 'c.component_name, '. + 'c.created_date, '. + 'c.active, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_COMPONENT.' c '. + 'left join '.TBL_BUG.' b on b.component_id = c.component_id '. + 'where '. + 'c.project_id = %s '. + 'group by '. + 'c.component_id, '. + 'c.component_name, '. + 'c.created_date, '. + 'c.active', + 'admin-list-databases' => + 'select '. + 'd.database_id, '. + 'database_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_DATABASE.' d '. + 'left join '.TBL_BUG.' b on b.database_id = d.database_id '. + 'group by '. + 'd.database_id, '. + 'database_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-groups' => + 'select '. + 'ag.group_id, '. + 'group_name, '. + 'locked, '. + 'count(ug.group_id) as count, '. + 'assignable '. + 'from '. + TBL_AUTH_GROUP.' ag '. + 'left join '.TBL_USER_GROUP.' ug on ug.group_id = ag.group_id '. + 'left join '.TBL_AUTH_USER.' au on ug.user_id = au.user_id '. + 'group by '. + 'ag.group_id, '. + 'group_name, '. + 'locked, '. + 'assignable '. + 'order by '. + '%s %s', + 'admin-list-oses' => + 'select '. + 's.os_id, '. + 'os_name, '. + 'regex, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_OS.' s '. + 'left join '.TBL_BUG.' b on s.os_id = b.os_id '. + 'group by '. + 's.os_id, '. + 'os_name, '. + 'regex, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-resolutions' => + 'select '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_RESOLUTION.' s '. + 'left join '.TBL_BUG.' b on b.resolution_id = s.resolution_id '. + 'group by '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-severities' => + 'select '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SEVERITY.' s '. + 'left join '.TBL_BUG.' b on b.severity_id = s.severity_id '. + 'group by '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-sites' => + 'select '. + 's.site_id, '. + 'site_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SITE.' s '. + 'left join '.TBL_BUG.' b on b.site_id = s.site_id '. + 'group by '. + 's.site_id, '. + 'site_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-statuses' => + 'select '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order, '. + 'bug_open, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_STATUS.' s '. + 'left join '.TBL_BUG.' b on b.status_id = s.status_id '. + 'group by '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-versions' => + 'select '. + 'v.version_id, '. + 'v.version_name, '. + 'v.created_date, '. + 'v.active, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_VERSION.' v '. + 'left join '.TBL_BUG.' b on b.version_id = v.version_id '. + 'where '. + 'v.project_id = %s '. + 'group by '. + 'v.version_id, '. + 'v.version_name, '. + 'v.created_date, '. + 'v.active', + 'admin-show-component' => + 'select '. + 'c.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_COMPONENT.' c '. + 'left join '.TBL_PROJECT.' p on p.project_id = c.project_id '. + 'where '. + 'component_id = \'%s\'', + 'admin-show-version' => + 'select '. + 'v.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_VERSION.' v '. + 'left join '.TBL_PROJECT.' p on p.project_id = v.project_id'. + 'where '. + 'version_id = \'%s\'', + 'admin-user-groups' => + 'select '. + 'ug.group_id '. + 'from '. + TBL_USER_GROUP.' ug '. + 'left join '.TBL_AUTH_GROUP.' g on g.group_id = ug.group_id '. + 'where '. + 'user_id = %s '. + 'and group_name <> \'User\'', + 'bug-cc-list' => + 'select '. + 'email '. + 'from '. + TBL_BUG_CC.' b '. + 'left join '.TBL_AUTH_USER.' u on u.user_id = b.user_id, '. + TBL_USER_PREF.' p '. + 'where '. + 'bug_id = %s '. + 'and u.user_id = p.user_id '. + 'and email_notices = 1', + 'bug-history' => + 'select '. + 'bh.*, '. + 'login '. + 'from '. + TBL_BUG_HISTORY.' bh '. + 'left join '.TBL_AUTH_USER.' on bh.created_by = user_id '. + 'where '. + 'bug_id = %s '. + 'order by '. + 'bh.created_date', + 'bug-prev-next' => + 'select '. + 'bug_id, '. + 'reporter.login as reporter, '. + 'owner.login as owner '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. + 'left join '.TBL_DATABASE.' db on b.database_id = db.database_id '. + 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. + 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. + TBL_SEVERITY.' severity, '. + TBL_STATUS.' status, '. + TBL_OS.' os, '. + TBL_VERSION.' version, '. + TBL_COMPONENT.' component, '. + TBL_PROJECT.' project, '. + TBL_SITE.' site '. + 'where '. + 'b.severity_id = severity.severity_id '. + 'and b.status_id = status.status_id '. + 'and b.os_id = os.os_id '. + 'and b.version_id = version.version_id '. + 'and b.component_id = component.component_id '. + 'and b.project_id = project.project_id '. + 'and %s '. + 'and b.site_id = site.site_id '. + 'and bug_id <> %s '. + 'order by '. + '%s %s, '. + 'bug_id asc', + 'bug-printable' => + 'select '. + 'b.*, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'project_name, '. + 'component_name, '. + 'version_name, '. + 'severity_name, '. + 'os_name, '. + 'status_name, '. + 'resolution_name '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. + TBL_SEVERITY.' sv, '. + TBL_STATUS.' st, '. + TBL_OS.' os, '. + TBL_VERSION.' v, '. + TBL_COMPONENT.' c, '. + TBL_PROJECT.' p '. + 'where '. + 'bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id '. + 'and b.os_id = os.os_id '. + 'and b.version_id = v.version_id '. + 'and b.component_id = c.component_id '. + 'and b.project_id = p.project_id '. + 'and b.status_id = st.status_id', + 'bug-show-bug' => + 'select '. + 'b.*, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'status_name, '. + 'resolution_name '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. + TBL_SEVERITY.' sv, '. + TBL_STATUS.' st, '. + TBL_SITE.' site '. + 'where '. + 'bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.site_id = site.site_id '. + 'and b.severity_id = sv.severity_id '. + 'and b.status_id = st.status_id', + 'functions-bug-cc' => + 'select '. + 'b.user_id, '. + 'login '. + 'from '. + TBL_BUG_CC.' b '. + 'left join '.TBL_AUTH_USER.' a on a.user_id = b.user_id '. + 'where '. + 'bug_id = %s', + 'functions-project-js' => + 'select '. + 'p.project_id, '. + 'p.project_name '. + 'from '. + TBL_PROJECT.' p '. + 'left join '.TBL_PROJECT_GROUP.' on pg.project_id = p.project_id '. + 'where '. + 'active = 1 '. + 'and (pg.project_id is null or pg.group_id in (%s)) '. + 'group by '. + 'p.project_id, '. + 'p.project_name '. + 'order by '. + 'project_name', + 'include-template-owner' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s on s.status_id = b.status_id ". + "where ". + "assigned_to = %s", + 'include-template-reporter' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s on s.status_id = b.status_id ". + "where ". + "created_by = %s", + 'index-projsummary-1' => + 'select project_name as "Project", '. + 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', + 'index-projsummary-2' => + "select resolution_name, ", + 'index-projsummary-3' => + "', sum(case when resolution_id = '", + 'index-projsummary-4' => + "' then 1 else 0 end) as \"'", + 'index-projsummary-5' => + " from ".TBL_RESOLUTION, + 'index-projsummary-6' => + '%s, count(bug_id) as "Total" '. 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. - TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_SITE. ' site '. - 'where bug_id = %s and b.project_id not in (%s) '. - 'and b.site_id = site.site_id '. - 'and b.severity_id = sv.severity_id and b.status_id = st.status_id', - 'functions-bug-cc' => 'select b.user_id, login '. - 'from '.TBL_BUG_CC.' b left join '. TBL_AUTH_USER.' a on a.user_id = b.user_id '. - 'where bug_id = %s', - 'functions-project-js' => 'select p.project_id, p.project_name '. - 'from '.TBL_PROJECT. ' p '. - 'left join '.TBL_PROJECT_GROUP.' on pg.project_id = p.project_id '. - 'where active = 1 and (pg.project_id is null or pg.group_id in (%s)) '. - 'group by p.project_id, p.project_name '. + 'left join '.TBL_PROJECT.' p on b.project_id = p.project_id '. + 'where b.project_id not in (%s) '. + 'group by b.project_id, project_name '. 'order by project_name', - 'include-template-owner' => "SELECT sum(CASE WHEN s.status_id ". - "in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id ". - "not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s on s.status_id = b.status_id ". - "where assigned_to = %s", - 'include-template-reporter' => "SELECT sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s on s.status_id = b.status_id ". - "where created_by = %s", - 'index-projsummary-1' => 'select project_name as "Project", '. + 'join-where' => + 'where', + 'query-list-bugs' => + 'select '. + '%s '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. + 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. + 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. + 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. + TBL_SEVERITY.' severity, '. + TBL_STATUS.' status, '. + TBL_OS.' os, '. + TBL_SITE.' site, '. + TBL_VERSION.' version, '. + TBL_COMPONENT.' component, '. + TBL_PROJECT.' project '. + 'where '. + 'b.severity_id = severity.severity_id '. + 'and b.status_id = status.status_id '. + 'and b.os_id = os.os_id '. + 'and b.site_id = site.site_id '. + 'and b.version_id = version.version_id '. + 'and b.component_id = component.component_id '. + 'and b.project_id = project.project_id %s '. + 'order by '. + '%s %s, '. + 'bug_id asc', + 'query-list-bugs-count' => + 'select '. + 'count(*) '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id ', + 'query-list-bugs-count-join' => + 'where ', + 'report-resbyeng-1' => + 'select u.email as "Assigned To", '. 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', - 'index-projsummary-2' => "select resolution_name, ", - 'index-projsummary-3' => "', sum(case when resolution_id = '", - 'index-projsummary-4' => "' then 1 else 0 end) as \"'", - 'index-projsummary-5' => " from ".TBL_RESOLUTION, - 'index-projsummary-6' => '%s, count(bug_id) as "Total" '. - 'from '.TBL_BUG. ' b left join '.TBL_PROJECT.' p on b.project_id = p.project_id '. - 'where b.project_id not in (%s) group by b.project_id, project_name '. - 'order by project_name', - 'query-list-bugs-count' => 'select count(*) '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id ', - 'query-list-bugs-count-join' => 'where ', - 'query-list-bugs' => 'select %s '. + 'report-resbyeng-2' => + "select resolution_name, ", + 'report-resbyeng-3' => + "', sum(case when resolution_id = '", + 'report-resbyeng-4' => + "' then 1 else 0 end) as \"'", + 'report-resbyeng-5' => + " from ".TBL_RESOLUTION, + 'report-resbyeng-6' => + '%s, count(bug_id) as "Total" '. 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. - 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. - 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. - 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. - 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. - TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '.TBL_SITE.' site, '. - TBL_VERSION.' version, '.TBL_COMPONENT.' component, '.TBL_PROJECT.' project '. - 'where b.severity_id = severity.severity_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.site_id = site.site_id and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.project_id = project.project_id %s '. - 'order by %s %s, bug_id asc', - 'report-resbyeng-1' => 'select u.email as "Assigned To", '. - 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', - 'report-resbyeng-2' => "select resolution_name, ", - 'report-resbyeng-3' => "', sum(case when resolution_id = '", - 'report-resbyeng-4' => "' then 1 else 0 end) as \"'", - 'report-resbyeng-5' => " from ".TBL_RESOLUTION, - 'report-resbyeng-6' => '%s, count(bug_id) as "Total" '. - 'from '.TBL_BUG. ' b '. 'left join '.TBL_AUTH_USER.' u on assigned_to = user_id %s '. 'group by assigned_to, u.email', - 'join-where' => 'where', - 'admin-list-components' => 'select c.component_id, c.component_name, '. - 'c.created_date, c.active, count(bug_id) as bug_count '. - 'from '.TBL_COMPONENT.' c left join '.TBL_BUG.' b on b.component_id = c.component_id '. - 'where c.project_id = %s '. - 'group by c.component_id, c.component_name, c.created_date, c.active', - 'admin-list-versions' => 'select v.version_id, v.version_name, '. - 'v.created_date, v.active, count(bug_id) as bug_count '. - 'from '.TBL_VERSION.' v left join '.TBL_BUG.' b on b.version_id = v.version_id '. - 'where v.project_id = %s '. - 'group by v.version_id, v.version_name, v.created_date, v.active', ); ?> Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- mysql.php 22 Aug 2005 20:44:16 -0000 1.25 +++ mysql.php 23 Aug 2005 21:09:42 -0000 1.26 @@ -1,208 +1,471 @@ <?php + +// mysql.php - MySQL queries + $QUERY = array( - 'admin-list-groups' => 'select ag.group_id, group_name, locked, '. - 'count(ug.group_id) as count '. - 'from '.TBL_AUTH_GROUP.' ag '. - 'left join '.TBL_USER_GROUP.' ug using (group_id) '. - 'left join '.TBL_AUTH_USER.' using (user_id) '. - 'group by ag.group_id, group_name, locked '. - 'order by %s %s', - 'admin-list-oses' => 'select s.os_id, os_name, regex, sort_order, '. - 'count(bug_id) as bug_count '. - 'from '.TBL_OS.' s '. - 'left join '.TBL_BUG.' using (os_id) '. - 'group by s.os_id, os_name, regex, sort_order '. - 'order by %s %s', - 'admin-show-version' => 'select v.*, p.project_name as project_name '. - 'from '.TBL_VERSION.' v left join '.TBL_PROJECT.' p using(project_id) '. - 'where version_id = \'%s\'', - 'admin-show-component' => 'select c.*, p.project_name as project_name '. - 'from '.TBL_COMPONENT.' c left join '.TBL_PROJECT.' p using (project_id) '. - 'where component_id = \'%s\'', - 'admin-list-resolutions' => 'select s.resolution_id, resolution_name, '. - 'resolution_desc, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_RESOLUTION. ' s left join '.TBL_BUG.' using (resolution_id) '. - 'group by s.resolution_id, resolution_name, resolution_desc, sort_order '. - 'order by %s %s', - 'admin-list-severities' => 'select s.severity_id, severity_name, '. - 'severity_desc, severity_color, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_SEVERITY. ' s left join '.TBL_BUG.' using (severity_id) '. - 'group by s.severity_id, severity_name, severity_desc, severity_color, '. - 'sort_order '. - 'order by %s %s', - 'admin-list-priorities' => 'select p.priority_id, priority_name, '. - 'priority_desc, priority_color, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_PRIORITY. ' p left join '.TBL_BUG.' b on b.priority = p.priority_id '. - 'group by p.priority_id, priority_name, priority_desc, priority_color, '. - 'sort_order '. - 'order by %s %s', - 'admin-list-databases' => 'select d.database_id, database_name, '. - 'sort_order, count(bug_id) as bug_count '. - 'from '.TBL_DATABASE. ' d left join '.TBL_BUG.' using (database_id) '. - 'group by d.database_id, database_name, sort_order '. - 'order by %s %s', - 'admin-list-sites' => 'select s.site_id, site_name, sort_order, '. - 'count(bug_id) as bug_count from '.TBL_SITE. ' s left join '. - TBL_BUG.' using (site_id) group by s.site_id, site_name, sort_order '. - 'order by %s %s', - 'admin-list-statuses' => 'select s.status_id, status_name, status_desc, '. - 'sort_order, bug_open, count(bug_id) as bug_count '. - 'from '.TBL_STATUS.' s left join '. TBL_BUG.' using (status_id) '. - 'group by s.status_id, status_name, status_desc, sort_order '. - 'order by %s %s', - 'admin-user-groups' => 'select ug.group_id '. - 'from '.TBL_USER_GROUP.' ug left join '.TBL_AUTH_GROUP.' g using (group_id) '. - 'where user_id = %s and group_name <> \'User\'', - 'bug-history' => 'select bh.*, login '. - 'from '.TBL_BUG_HISTORY.' bh '. - 'left join '. TBL_AUTH_USER.' on bh.created_by = user_id '. - 'where bug_id = %s order by bh.created_date', - 'bug-cc-list' => 'select email '. - 'from '.TBL_BUG_CC.' left join '. TBL_AUTH_USER.' u using(user_id), '. - TBL_USER_PREF.' p '. - 'where bug_id = %s and u.user_id = p.user_id and email_notices = 1', - 'bug-printable' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, project_name, component_name, version_name, '. - 'severity_name, priority_name, os_name, status_name, resolution_name '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. - 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. - TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_OS.' os, '. TBL_VERSION.' v, '. - TBL_PRIORITY.' priority, '.TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. 'where b.bug_id = %s and b.project_id not in (%s) '. - 'and b.severity_id = sv.severity_id '. - 'and b.priority = priority.priority_id '. - 'and b.os_id = os.os_id and b.version_id = v.version_id '. - 'and b.component_id = c.component_id and b.project_id = p.project_id '. - 'and b.status_id = st.status_id', - 'bug-prev-next' => 'select b.bug_id, reporter.login as reporter, '. - 'owner.login as owner, '. - 'count(distinct comment.comment_id) as comments, '. - 'count(distinct attachment.attachment_id) as attachments, '. - 'count(distinct vote.user_id) as votes '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. - 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. - 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. - 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. - 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. - 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. - 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. - 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. - 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. - TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '. - TBL_PRIORITY.' priority, '.TBL_VERSION.' version, '.TBL_COMPONENT.' component, '. - TBL_PROJECT.' project, '.TBL_SITE.' site '. - 'where b.severity_id = severity.severity_id '. - 'and b.priority = priority.priority_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.project_id = project.project_id and %s '. - 'and b.site_id = site.site_id '. - 'and b.bug_id <> %s '. - 'GROUP BY b.bug_id '. - 'order by %s %s, b.bug_id asc', - 'bug-show-bug' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, status_name, resolution_name '. + 'admin-list-components' => + 'select '. + 'c.component_id, '. + 'component_name, '. + 'c.created_date, '. + 'active, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_COMPONENT.' c '. + 'left join '.TBL_BUG.' b using(component_id) '. + 'where '. + 'c.project_id = %s '. + 'group by '. + 'c.component_id, '. + 'c.component_name, '. + 'c.created_date, '. + 'c.active', + 'admin-list-databases' => + 'select '. + 'd.database_id, '. + 'database_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_DATABASE.' d '. + 'left join '.TBL_BUG.' using (database_id) '. + 'group by '. + 'd.database_id, '. + 'database_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-groups' => + 'select '. + 'ag.group_id, '. + 'group_name, '. + 'locked, '. + 'count(ug.group_id) as count '. + 'from '. + TBL_AUTH_GROUP.' ag '. + 'left join '.TBL_USER_GROUP.' ug using (group_id) '. + 'left join '.TBL_AUTH_USER.' using (user_id) '. + 'group by '. + 'ag.group_id, '. + 'group_name, '. + 'locked '. + 'order by '. + '%s %s', + 'admin-list-oses' => + 'select '. + 's.os_id, '. + 'os_name, '. + 'regex, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_OS.' s '. + 'left join '.TBL_BUG.' using (os_id) '. + 'group by '. + 's.os_id, '. + 'os_name, '. + 'regex, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-priorities' => + 'select '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_PRIORITY.' p '. + 'left join '.TBL_BUG.' b on b.priority = p.priority_id '. + 'group by '. + 'p.priority_id, '. + 'priority_name, '. + 'priority_desc, '. + 'priority_color, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-resolutions' => + 'select '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_RESOLUTION.' s '. + 'left join '.TBL_BUG.' using (resolution_id) '. + 'group by '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-severities' => + 'select '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SEVERITY.' s '. + 'left join '.TBL_BUG.' using (severity_id) '. + 'group by '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-sites' => + 'select '. + 's.site_id, '. + 'site_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SITE.' s '. + 'left join '.TBL_BUG.' using (site_id) '. + 'group by '. + 's.site_id, '. + 'site_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-statuses' => + 'select '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order, '. + 'bug_open, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_STATUS.' s '. + 'left join '.TBL_BUG.' using (status_id) '. + 'group by '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-versions' => + 'select '. + 'v.version_id, '. + 'version_name, '. + 'v.created_date, '. + 'active, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_VERSION.' v '. + 'left join '.TBL_BUG.' b using(version_id) '. + 'where '. + 'v.project_id = %s '. + 'group by '. + 'v.version_id, '. + 'v.version_name, '. + 'v.created_date, '. + 'v.active', + 'admin-show-component' => + 'select '. + 'c.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_COMPONENT.' c '. + 'left join '.TBL_PROJECT.' p using (project_id) '. + 'where '. + 'component_id = \'%s\'', + 'admin-show-version' => + 'select '. + 'v.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_VERSION.' v '. + 'left join '.TBL_PROJECT.' p using(project_id) '. + 'where '. + 'version_id = \'%s\'', + 'admin-user-groups' => + 'select '. + 'ug.group_id '. + 'from '. + TBL_USER_GROUP.' ug '. + 'left join '.TBL_AUTH_GROUP.' g using (group_id) '. + 'where '. + 'user_id = %s '. + 'and group_name <> \'User\'', + 'bug-cc-list' => + 'select '. + 'email '. + 'from '. + TBL_BUG_CC.' '. + 'left join '.TBL_AUTH_USER.' u using(user_id), '. + TBL_USER_PREF.' p '. + 'where '. + 'bug_id = %s '. + 'and u.user_id = p.user_id '. + 'and email_notices = 1', + 'bug-history' => + 'select '. + 'bh.*, '. + 'login '. + 'from '. + TBL_BUG_HISTORY.' bh '. + 'left join '.TBL_AUTH_USER.' on bh.created_by = user_id '. + 'where '. + 'bug_id = %s '. + 'order by '. + 'bh.created_date', + 'bug-prev-next' => + 'select '. + 'b.bug_id, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'count(distinct comment.comment_id) as comments, '. + 'count(distinct attachment.attachment_id) as attachments, '. + 'count(distinct vote.user_id) as votes '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. + 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. + 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. + 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. + TBL_SEVERITY.' severity, '. + TBL_STATUS.' status, '. + TBL_OS.' os, '. + TBL_PRIORITY.' priority, '. + TBL_VERSION.' version, '. + TBL_COMPONENT.' component, '. + TBL_PROJECT.' project, '. + TBL_SITE.' site '. + 'where '. + 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. + 'and b.status_id = status.status_id '. + 'and b.os_id = os.os_id '. + 'and b.version_id = version.version_id '. + 'and b.component_id = component.component_id '. + 'and b.project_id = project.project_id '. + 'and %s '. + 'and b.site_id = site.site_id '. + 'and b.bug_id <> %s '. + 'GROUP BY '. + 'b.bug_id '. + 'order by '. + '%s %s, '. + 'b.bug_id asc', + 'bug-printable' => + 'select '. + 'b.*, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'project_name, '. + 'component_name, '. + 'version_name, '. + 'severity_name, '. + 'priority_name, '. + 'os_name, '. + 'status_name, '. + 'resolution_name '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. + TBL_SEVERITY.' sv, '. + TBL_STATUS.' st, '. + TBL_OS.' os, '. + TBL_VERSION.' v, '. + TBL_PRIORITY.' priority, '. + TBL_COMPONENT.' c, '. + TBL_PROJECT.' p '. + 'where '. + 'b.bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id '. + 'and b.priority = priority.priority_id '. + 'and b.os_id = os.os_id '. + 'and b.version_id = v.version_id '. + 'and b.component_id = c.component_id '. + 'and b.project_id = p.project_id '. + 'and b.status_id = st.status_id', + 'bug-show-bug' => + 'select '. + 'b.*, '. + 'reporter.login as reporter, '. + 'owner.login as owner, '. + 'status_name, '. + 'resolution_name '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. + TBL_SEVERITY.' sv, '. + TBL_STATUS.' st, '. + TBL_SITE.' site, '. + TBL_PRIORITY.' prio '. + 'where '. + 'b.bug_id = %s '. + 'and b.project_id not in (%s) '. + 'and b.site_id = site.site_id '. + 'and b.severity_id = sv.severity_id '. + 'and b.status_id = st.status_id ', + 'and b.priority = prio.priority_id', + 'functions-bug-cc' => + 'select '. + 'b.user_id, '. + 'login '. + 'from '. + TBL_BUG_CC.' b '. + 'left join '.TBL_AUTH_USER.' using(user_id) '. + 'where '. + 'bug_id = %s', + 'functions-project-js' => + 'select '. + 'p.project_id, '. + 'project_name '. + 'from '. + TBL_PROJECT.' p '. + 'left join '.TBL_PROJECT_GROUP.' pg using(project_id) '. + 'where '. + 'active = 1 '. + 'and (pg.project_id is null or pg.group_id in (%s)) '. + 'group by '. + 'p.project_id, '. + 'p.project_name '. + 'order by '. + 'project_name', + 'include-template-bookmark' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id), ". + TBL_BOOKMARK." w ". + "where ". + "w.user_id=%s ". + "AND w.bug_id = b.bug_id", + 'include-template-owner' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id) ". + "where ". + "assigned_to = %s", + 'include-template-reporter' => + "SELECT ". + "sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ), ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ". + TBL_BUG." b ". + "left join ".TBL_STATUS." s using(status_id) ". + "where ". + "created_by = %s", + 'index-projsummary-1' => + 'select project_name as "Project", '. + 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', + 'index-projsummary-2' => + "select resolution_name, ", + 'index-projsummary-3' => + "', sum(case when resolution_id = '", + 'index-projsummary-4' => + "' then 1 else 0 end) as \"'", + 'index-projsummary-5' => + " from ".TBL_RESOLUTION, + 'index-projsummary-6' => + '%s, count(bug_id) as "Total" '. 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. - 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. - TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_SITE.' site, '. - TBL_PRIORITY.' prio '. - 'where b.bug_id = %s and b.project_id not in (%s) '. - 'and b.site_id = site.site_id '. - 'and b.severity_id = sv.severity_id and b.status_id = st.status_id ', - 'and b.priority = prio.priority_id', - 'functions-bug-cc' => 'select b.user_id, login '. - 'from '.TBL_BUG_CC.' b left join '. TBL_AUTH_USER.' using(user_id) '. - 'where bug_id = %s', - 'functions-project-js' => 'select p.project_id, project_name '. - 'from '.TBL_PROJECT. ' p '. - 'left join '.TBL_PROJECT_GROUP.' pg using(project_id) '. - 'where active = 1 and (pg.project_id is null or pg.group_id in (%s)) '. - 'group by p.project_id, p.project_name '. + 'left join '.TBL_PROJECT.' p using (project_id) '. + 'where b.project_id not in (%s) '. + 'group by b.project_id, project_name '. 'order by project_name', - 'include-template-bookmark' => "SELECT sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id), ". - TBL_BOOKMARK." w where w.user_id=%s AND w.bug_id = b.bug_id", - 'include-template-owner' => "SELECT sum(CASE WHEN s.status_id ". - "in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id ". - "not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) ". - "where assigned_to = %s", - 'include-template-reporter' => "SELECT sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". - "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". - "from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) ". - "where created_by = %s", - 'index-projsummary-1' => 'select project_name as "Project", '. + 'join-where' => + 'where', + 'query-list-bugs' => + 'select '. + '%s '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. + 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. + 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. + 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. + 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. + TBL_SEVERITY.' severity, '. + TBL_STATUS.' status, '. + TBL_OS.' os, '. + TBL_SITE.' site, '. + TBL_VERSION.' version, '. + TBL_COMPONENT.' component, '. + TBL_PROJECT.' project, '. + TBL_PRIORITY.' priority '. + 'where '. + 'b.severity_id = severity.severity_id '. + 'and b.priority = priority.priority_id '. + 'and b.status_id = status.status_id '. + 'and b.os_id = os.os_id '. + 'and b.site_id = site.site_id '. + 'and b.version_id = version.version_id '. + 'and b.component_id = component.component_id '. + 'and b.project_id = project.project_id %s '. + 'GROUP BY '. + 'b.bug_id '. + 'order by '. + '%s %s, '. + 'b.bug_id asc', + 'query-list-bugs-count' => + 'select '. + 'count(*) '. + 'from '. + TBL_BUG.' b '. + 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id ', + 'query-list-bugs-count-join' => + 'where ', + 'report-resbyeng-1' => + 'select email as "Assigned To", '. 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', - 'index-projsummary-2' => "select resolution_name, ", - 'index-projsummary-3' => "', sum(case when resolution_id = '", - 'index-projsummary-4' => "' then 1 else 0 end) as \"'", - 'index-projsummary-5' => " from ".TBL_RESOLUTION, - 'index-projsummary-6' => '%s, count(bug_id) as "Total" '. - 'from '.TBL_BUG. ' b left join '.TBL_PROJECT.' p using (project_id) '. - 'where b.project_id not in (%s) group by b.project_id, project_name '. - 'order by project_name', - 'query-list-bugs-count' => 'select count(*) '. + 'report-resbyeng-2' => + "select resolution_name, ", + 'report-resbyeng-3' => + "', sum(case when resolution_id = '", + 'report-resbyeng-4' => + "' then 1 else 0 end) as \"'", + 'report-resbyeng-5' => + " from ".TBL_RESOLUTION, + 'report-resbyeng-6' => + '%s, count(bug_id) as "Total" '. 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id ', - 'query-list-bugs-count-join' => 'where ', - 'query-list-bugs' => 'select %s '. - 'from '.TBL_BUG.' b '. - 'left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id '. - 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. - 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. - 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. - 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. - 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. - 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. - 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. - 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. - 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. - 'left join '.TBL_VERSION.' version3 on b.closed_in_version_id = version3.version_id, '. - TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '.TBL_SITE.' site, '. - TBL_VERSION.' version, '.TBL_COMPONENT.' component, '.TBL_PROJECT.' project, '. - TBL_PRIORITY.' priority '. - 'where b.severity_id = severity.severity_id '. - 'and b.priority = priority.priority_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.site_id = site.site_id and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.project_id = project.project_id %s '. - 'GROUP BY b.bug_id '. - 'order by %s %s, b.bug_id asc', - 'report-resbyeng-1' => 'select email as "Assigned To", '. - 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', - 'report-resbyeng-2' => "select resolution_name, ", - 'report-resbyeng-3' => "', sum(case when resolution_id = '", - 'report-resbyeng-4' => "' then 1 else 0 end) as \"'", - 'report-resbyeng-5' => " from ".TBL_RESOLUTION, - 'report-resbyeng-6' => '%s, count(bug_id) as "Total" '. - 'from '.TBL_BUG. ' b '. 'left join '.TBL_AUTH_USER.' u on assigned_to = user_id %s '. 'group by assigned_to, u.email', - 'join-where' => 'where', - 'admin-list-components' => 'select c.component_id, component_name, '. - 'c.created_date, active, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_COMPONENT.' c left join '.TBL_BUG.' b using(component_id) '. - 'where c.project_id = %s '. - 'group by c.component_id, c.component_name, c.created_date, c.active', - 'admin-list-versions' => 'select v.version_id, version_name, '. - 'v.created_date, active, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_VERSION.' v left join '.TBL_BUG.' b using(version_id) '. - 'where v.project_id = %s '. - 'group by v.version_id, v.version_name, v.created_date, v.active', ); ?> Index: oci8.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/oci8.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- oci8.php 30 May 2005 19:59:35 -0000 1.18 +++ oci8.php 23 Aug 2005 21:09:42 -0000 1.19 @@ -1,187 +1,457 @@ <?php +// oci8.php - Oracle queries + $QUERY = array( - 'admin-list-groups' => 'select ag.group_id, ag.group_name, ag.locked, '. - 'count(ug.group_id) as count, assignable '. - 'from '.TBL_AUTH_GROUP.' ag, '.TBL_USER_GROUP.' ug,'.TBL_AUTH_USER.' au '. - 'where ag.group_id = ug.group_id(+) and ug.user_id = au.user_id(+) '. - 'group by ag.group_id, ag.group_name, ag.locked, ag.assignable '. - 'order by %s %s', - 'admin-list-oses' => 'select s.os_id, s.os_name, s.regex, s.sort_order, '. - 'count(b.bug_id) as bug_count '. - 'from '.TBL_OS.' s, '.TBL_BUG.' b '. - 'where s.os_id = b.os_id(+) '. - 'group by s.os_id, s.os_name, s.regex, s.sort_order '. - 'order by s.%s %s', - 'admin-show-version' => 'select v.*, p.project_name as project_name '. - 'from '.TBL_VERSION.' v, '.TBL_PROJECT.' p '. - 'where p.project_id = v.project_id(+) and version_id = \'%s\'', - 'admin-show-component' => 'select c.*, p.project_name as project_name '. - 'from '.TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. - 'where p.project_id = c.project_id(+) and component_id = \'%s\'', - 'admin-list-resolutions' => 'select s.resolution_id, resolution_name, '. - 'resolution_desc, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_RESOLUTION.' s, '.TBL_BUG.' b '. - 'where s.resolution_id = b.resolution_id(+) '. + 'admin-list-components' => + 'select '. + 'c.component_id, '. + 'component_name, '. + 'c.created_date, '. + 'active, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_COMPONENT.' c, '. + TBL_BUG.' b '. + 'where '. + 'c.project_id = %s '. + 'and c.component_id = b.component_id(+) '. + 'group by '. + 'c.component_id, '. + 'c.component_name, '. + 'c.created_date, '. + 'c.active', + 'admin-list-databases' => + 'select '. + 'd.database_id, '. + 'database_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_DATABASE.' d, '. + TBL_BUG.' b '. + 'where '. + 'd.database_id = b.database_id(+) '. + 'group by '. + 'd.database_id, '. + 'database_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-groups' => + 'select '. + 'ag.group_id, '. + 'ag.group_name, '. + 'ag.locked, '. + 'count(ug.group_id) as count, '. + 'assignable '. + 'from '. + TBL_AUTH_GROUP.' ag, '. + TBL_USER_GROUP.' ug,'. + TBL_AUTH_USER.' au '. + 'where '. + 'ag.group_id = ug.group_id(+) '. + 'and ug.user_id = au.user_id(+) '. + 'group by '. + 'ag.group_id, '. + 'ag.group_name, '. + 'ag.locked, '. + 'ag.assignable '. + 'order by '. + '%s %s', + 'admin-list-oses' => + 'select '. + 's.os_id, '. + 's.os_name, '. + 's.regex, '. + 's.sort_order, '. + 'count(b.bug_id) as bug_count '. + 'from '. + TBL_OS.' s, '. + TBL_BUG.' b '. + 'where '. + 's.os_id = b.os_id(+) '. + 'group by '. + 's.os_id, '. + 's.os_name, '. + 's.regex, '. + 's.sort_order '. + 'order by '. + 's.%s %s', + 'admin-list-resolutions' => + 'select '. + 's.resolution_id, '. + 'resolution_name, '. + 'resolution_desc, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_RESOLUTION.' s, '. + TBL_BUG.' b '. + 'where '. + 's.resolution_id = b.resolution_id(+) '. 'group by s.resolution_id, resolution_name, resolution_desc, sort_order '. 'order by %s %s', - 'admin-list-severities' => 'select s.severity_id, severity_name, '. - 'severity_desc, severity_color, sort_order, count(bug_id) as bug_count '. - 'from '.TBL_SEVERITY.' s, '.TBL_BUG.' b '. - 'where s.severity_id = b.severity_id(+) '. - 'group by s.severity_id, severity_name, severity_desc, severity_color, '. - 'sort_order '. - 'order by %s %s', - 'admin-list-databases' => 'select d.database_id, database_name, '. - 'sort_order, count(bug_id) as bug_count '. - 'from '.TBL_DATABASE.' d, '.TBL_BUG.' b '. - 'where d.database_id = b.database_id(+) '. - 'group by d.database_id, database_name, sort_order '. - 'order by %s %s', - 'admin-list-sites' => 'select s.site_id, site_name, sort_order, '. - 'count(bug_id) as bug_count from '.TBL_SITE. ' s, '.TBL_BUG.' b '. - 'where s.site_id = b.site_id(+) group by s.site_id, site_name, '. - 'sort_order order by %s %s', - 'admin-list-statuses' => 'select s.status_id, status_name, status_desc, '. - 'sort_order, bug_open, count(bug_id) as bug_count '. - 'from '.TBL_STATUS.' s, '.TBL_BUG.' b '. - 'where s.status_id = b.status_id(+) '. - 'group by s.status_id, status_name, status_desc, sort_order '. - 'order by %s %s', - 'admin-user-groups' => 'select ug.group_id '. - 'from '.TBL_USER_GROUP.' ug, ' . TBL_AUTH_GROUP.' g '. - 'where g.group_id = ug.group_id(+) and user_id = %s '. - 'and group_name <> \'User\'', - 'bug-history' => 'select bh.*, login '. - 'from '.TBL_BUG_HISTORY.' bh, '.TBL_AUTH_USER . - ' where user_id = bh.created_by(+) and bug_id = %s order by bh.created_date', - 'bug-cc-list' => 'select email '. - 'from '.TBL_BUG_CC.' bc, ' . TBL_AUTH_USER.' u, ' . TBL_USER_PREF.' p '. - 'where u.user_id = bc.user_id(+) and u.user_id = p.user_id '. - 'and email_notices = 1 and bug_id = %s', - 'bug-printable' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, p.project_name, c.component_name, '. - 'v.version_name, s.severity_name, o.os_name, s.status_name, '. - 'r.resolution_name '. - 'from '.TBL_BUG.' b, '.TBL_AUTH_USER.' owner, '. - TBL_AUTH_USER.' reporter, '.TBL_RESOLUTION.' r, '.TBL_SEVERITY.' sv, '. - TBL_STATUS. ' st, ' . TBL_OS.' os, '.TBL_VERSION.' v, '. - TBL_COMPONENT.' c, ' . TBL_PROJECT.' p ', - 'where b.assigned_to = owner.user_id(+) '. - 'and b.created_by = reporter.user_id(+) '. - 'and b.resolution_id = r.resolution_id(+) and b.os_id = os.os_id '. - 'and b.version_id = v.version_id and b.component_id = c.component_id '. - 'and b.project_id = p.project_id and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id and bug_id = %s and b.project_id not in (%s)', - 'bug-prev-next' => 'select b.bug_id, reporter.login as reporter, '. - 'owner.login as owner '. - 'from '.TBL_BUG.' b, '.TBL_AUTH_USER.' owner, '.TBL_AUTH_USER.' reporter, '. - TBL_AUTH_USER.' lastmodifier, ' . TBL_RESOLUTION.' resolution, '. - TBL_DATABASE.' database, '.TBL_VERSION.' version2, '. - TBL_VERSION.' version3, '.TBL_SEVERITY.' severity, '. - TBL_STATUS.' status, '.TBL_OS.' os, '. - TBL_VERSION.' version, '.TBL_COMPONENT.' component, '. - TBL_PROJECT.' project, '.TBL_SITE.' site '. - 'where b.assigned_to = owner.user_id(+) '. - 'and b.created_by = reporter.user_id(+) '. - 'and b.last_modified_by = lastmodifier.user_id(+) '. - 'and b.resolution_id = resolution.resolution_id(+) '. - 'and b.database_id = database.database_id(+) '. - 'and b.to_be_closed_in_version_id = version2.version_id(+) '. - 'and b.closed_in_version_id = version3.version_id(+) '. - 'and b.severity_id = severity.severity_id '. - 'and b.status_id = status.status_id and b.os_id = os.os_id '. - 'and b.version_id = version.version_id '. - 'and b.component_id = component.component_id '. - 'and b.site_id = site.site_id '. - 'and b.project_id = project.project_id and %s and bug_id <> %s '. - 'order by %s %s, bug_id asc', - 'bug-show-bug' => 'select b.*, reporter.login as reporter, '. - 'owner.login as owner, r.resolution_name, st.status_name '. - 'from '.TBL_BUG.' b, '.TBL_AUTH_USER.' owner, '.TBL_AUTH_USER.' reporter, '. - TBL_RESOLUTION.' r, '.TBL_SEVERITY.' sv, '. - TBL_STATUS.' st, '.TBL_SITE.' site '. - 'where b.resolution_id = r.resolution_id(+) '. - 'and b.assigned_to = owner.user_id(+) '. - 'and b.created_by = reporter.user_id(+) '. - 'and b.severity_id = sv.severity_id and b.status_id = st.status_id '. - 'and b.site_id = site.site_id '. - 'and bug_id = %s and b.project_id not in (%s)', - 'functions-bug-cc' => 'select b.user_id, login '. - 'from '.TBL_BUG_CC.' b, '. TBL_AUTH_USER. - ' where phpbt_auth_user.user_id = b.user_id(+) and bug_id = %s', - 'functions-project-js' => 'select p.project_id, project_name '. - 'from ' . TBL_PROJECT . ' p, ' . TBL_PROJECT_GROUP . ' pg '. - 'where p.project_id = pg.project_id(+) and active = 1 '. - 'and (pg.project_id is null or pg.group_id in (%s)) '. - 'group by p.project_id, p.project_name order by project_name', - 'include-template-owner' => SELECT sum(decode( s.status_id in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )), ". - "sum(decode( s.status_id not in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )), ". - 'from '.TBL_BUG.' b, '.TBL_STATUS.' s '. - 'where b.status_id = s.status_id (+) and b.assigned_to = %s', - 'include-template-reporter' => SELECT sum(decode( s.status_id in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )) , ". - "sum(decode( s.status_id not in (".OPEN_BUG_STATUSES.") , 1, 1, 0 )) ". - 'from '.TBL_BUG.' b, ' . TBL_STATUS.' s '. - 'where b.status_id = s.status_id (+) and b.created_by = %s', - 'index-projsummary-1' => 'select b.project_id, p.project_name as "Project", '. + 'admin-list-severities' => + 'select '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SEVERITY.' s, '. + TBL_BUG.' b '. + 'where '. + 's.severity_id = b.severity_id(+) '. + 'group by '. + 's.severity_id, '. + 'severity_name, '. + 'severity_desc, '. + 'severity_color, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-sites' => + 'select '. + 's.site_id, '. + 'site_name, '. + 'sort_order, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_SITE.' s, '. + TBL_BUG.' b '. + 'where '. + 's.site_id = b.site_id(+) '. + 'group by '. + 's.site_id, '. + 'site_name, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-statuses' => + 'select '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order, '. + 'bug_open, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_STATUS.' s, '. + TBL_BUG.' b '. + 'where '. + 's.status_id = b.status_id(+) '. + 'group by '. + 's.status_id, '. + 'status_name, '. + 'status_desc, '. + 'sort_order '. + 'order by '. + '%s %s', + 'admin-list-versions' => + 'select '. + 'v.version_id, '. + 'version_name, '. + 'v.created_date, '. + 'active, '. + 'count(bug_id) as bug_count '. + 'from '. + TBL_VERSION.' v, '. + TBL_BUG.' b '. + 'where '. + 'v.project_id = %s '. + 'and v.version_id = b.version_id(+) '. + 'group by '. + 'v.version_id, '. + 'v.version_name, '. + 'v.created_date, '. + 'v.active', + 'admin-show-component' => + 'select '. + 'c.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_COMPONENT.' c, '. + TBL_PROJECT.' p '. + 'where '. + 'p.project_id = c.project_id(+) '. + 'and component_id = \'%s\'', + 'admin-show-version' => + 'select '. + 'v.*, '. + 'p.project_name as project_name '. + 'from '. + TBL_VERSION.' v, '. + TBL_PROJECT.' p '. + 'where '. + 'p.project_id = v.project_id(+) '. + 'and version_id = \'%s\'', + 'admin-user-groups' => + 'select '. + 'ug.group_id '. + 'from '. + TBL_USER_GROUP.' ug, '. + TBL_AUTH_GROUP.' g '. + 'where '. + 'g.group_id = ug.group_id(+) '. + 'and user_id = %s '. + 'and group_name <> \'User\'', + 'bug-cc-list' => + 'select '. + 'email '. + 'from '. + TBL_BUG_CC.' bc, '. + TBL_AUTH_USER.' u, '. + TBL_USER_PREF.' p '. + 'where '. + 'u.user_id = bc.user_id(+) '. + 'and u.user_id = p.user_id '. + 'and email_notices = 1 '. + 'and bug_id = %s', + 'bug-history' => + 'select '. + 'bh.*, '. + 'login '. + 'from '. + TBL_BUG_HISTORY.' bh, '. + TBL_AUTH_USER.' '. + 'where '. + 'user_id = bh.created_by(+) '. + 'and bug_id = %s '. + 'order by '. + 'bh.created_date', + 'bug-prev-next' => + 'select '. + 'b.bug_id, '. + 'reporter.login as reporter, '. + 'owner.login as owner '. + 'from '. + TBL_BUG.' b, '. + TBL_AUTH_USER.' owner, '. + TBL_AUTH_USER.' reporter, '. + TBL_AUTH_USER.' lastmodifier, '. + TBL_RESOLUTION.' resolution, '. + TBL_DATABASE.' database, '. + TBL_VERSION.' version2, '. + TBL_VERSION.' version3, '.... [truncated message content] |
|
From: Ulf E. <ulf...@us...> - 2005-08-23 21:06:11
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21310/phpbt/templates/default Modified Files: bugdisplay-printable.html Log Message: Missed a part of the priority table patch (if bugdisplay-printable is still in use..) Index: bugdisplay-printable.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay-printable.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- bugdisplay-printable.html 25 Oct 2004 12:07:04 -0000 1.12 +++ bugdisplay-printable.html 23 Aug 2005 21:06:03 -0000 1.13 @@ -35,7 +35,7 @@ </tr> <tr> <td> - <?php echo translate("Priority"); ?>: <?php echo $priority; ?> + <?php echo translate("Priority"); ?>: <?php echo $priority_name; ?> </td> <td colspan="2"> <?php echo translate("Operating System"); ?>: <?php echo $os_name; ?> |
|
From: Ulf E. <ulf...@fa...> - 2005-08-22 21:15:12
|
Hoi, I have just committed a set of feature patches! This is just a minor warning or heads up if someone wish to play with them: The update script is not ready yet not is support for Oracle or Postgres. Hopefully this will be added "soon". Have fun, /Ulf * Ulf Erikson [2005-08-22 23:04]: > Index: CHANGELOG > =================================================================== > RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v > retrieving revision 1.70 > retrieving revision 1.71 > diff -u -r1.70 -r1.71 > --- CHANGELOG 3 Aug 2005 12:32:31 -0000 1.70 > +++ CHANGELOG 22 Aug 2005 21:04:39 -0000 1.71 > @@ -1,3 +1,12 @@ > +-- 1.x -- > +: Moved priority levels into a table > +: Changed the 'Assignable' bit to a group permission > +: Added sort-order to components and versions > +: Added support to bookmark/monitor a set of bugs > +: Added a simple UI to edit group permissions > +: Added support to (re)edit a query > +: Added support for sending smtp mail > + > -- 1.0 -- 3 Aug 2005 > : Added links from project summary on home page (Phil Davis). > : Added display of the bug ids a bug blocks. |