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-10-18 18:43:25
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26483/inc Modified Files: functions.php Log Message: Bug #1329367 "PHP Version - misinformation!" Changed get_include_path() into ini_get('include_path') Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- functions.php 5 Oct 2005 20:28:53 -0000 1.69 +++ functions.php 18 Oct 2005 18:43:15 -0000 1.70 @@ -752,7 +752,7 @@ * @return bool */ function find_include($file) { - foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) { + foreach (explode(PATH_SEPARATOR, ini_get('include_path')) as $path) { if (file_exists("$path/$file")) return true; } return false; |
|
From: Ulf E. <ulf...@fa...> - 2005-10-13 19:42:32
|
Benjamin Curtis wrote: > Looks good. :) Thanks:) Here is a first draft of my patch. It's very very untested still.. that's why I am sending a patch instead of committing it all to CVS (that and that i am missing pgsql/oci8 support and an upgrade script). Please try it anyway. Pull a new version from CVS and apply this patch. Don't try to upgrade! Just play with some new projects, bugs and users. I'd like to get some feedback on this such that it can be finished on time for 1.1.. I will not have time to look at it for next week myself > On Oct 13, 2005, at 2:45 AM, Ulf Erikson wrote: >> * Ulf Erikson [2005-09-16, 23:40:10 +0200]: >> >>> I'm planning to introduce a set of new permissions. There are currently >>> only four permissions in phpBugTracker: Admin, Editbug, EditAssignment, >>> Assignable. I wish to extend this such that it is possible to decide >>> what fields users of the different groups may enter/change/delete as >>> either the report, owner or neither. >> >> I plan to add: AddBug, EditProject, EditComponent, EditStatus, CloseBug, >> EditResolution, EditPriority, EditSeverity, and AddComment. >> >>> The discussion half a year ago >>> http://sourceforge.net/mailarchive/message.php?msg_id=10850283 >>> quikly grow into something real big and ambitious. I'll try to keep >>> it a >>> bit simpler this time. It will be configurable, but [NOT] as extreme as >>> suggested earlier.. I need your help to find a good balance. >> >> As discussed with Benjamin I plan to introduce roles as a complement to >> the current groups. I'm thinking of: AnonymousGuest, AuthenticatedUser, >> BugReporter, BugAssignee, ComponentOwner, ProjectAdmin, and >> BugTrackerAdmin. (The last two will not be configurable) >> >> Having a role can only give you more permissions. (logical OR with your >> current permissions) >> >> I think some hierarchie can be good here: A user should also be a guest, >> and a reporter or assignee should also be a user (and thus also a >> guest). >> >> Comments? |
|
From: Benjamin C. <php...@be...> - 2005-10-13 13:41:22
|
Looks good. :) On Oct 13, 2005, at 2:45 AM, Ulf Erikson wrote: > * Ulf Erikson [2005-09-16, 23:40:10 +0200]: > >> I'm planning to introduce a set of new permissions. There are >> currently >> only four permissions in phpBugTracker: Admin, Editbug, >> EditAssignment, >> Assignable. I wish to extend this such that it is possible to decide >> what fields users of the different groups may enter/change/delete as >> either the report, owner or neither. >> > > I plan to add: AddBug, EditProject, EditComponent, EditStatus, > CloseBug, > EditResolution, EditPriority, EditSeverity, and AddComment. > > >> The discussion half a year ago >> http://sourceforge.net/mailarchive/message.php?msg_id=10850283 >> quikly grow into something real big and ambitious. I'll try to >> keep it a >> bit simpler this time. It will be configurable, but [NOT] as >> extreme as >> suggested earlier.. I need your help to find a good balance. >> > > As discussed with Benjamin I plan to introduce roles as a > complement to > the current groups. I'm thinking of: AnonymousGuest, > AuthenticatedUser, > BugReporter, BugAssignee, ComponentOwner, ProjectAdmin, and > BugTrackerAdmin. (The last two will not be configurable) > > Having a role can only give you more permissions. (logical OR with > your > current permissions) > > I think some hierarchie can be good here: A user should also be a > guest, > and a reporter or assignee should also be a user (and thus also a > guest). > > Comments? > > -- > Ulf > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, > discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev > |
|
From: Ulf E. <ulf...@fa...> - 2005-10-13 09:45:42
|
* Ulf Erikson [2005-09-16, 23:40:10 +0200]: > I'm planning to introduce a set of new permissions. There are currently > only four permissions in phpBugTracker: Admin, Editbug, EditAssignment, > Assignable. I wish to extend this such that it is possible to decide > what fields users of the different groups may enter/change/delete as > either the report, owner or neither. I plan to add: AddBug, EditProject, EditComponent, EditStatus, CloseBug, EditResolution, EditPriority, EditSeverity, and AddComment. > The discussion half a year ago > http://sourceforge.net/mailarchive/message.php?msg_id=10850283 > quikly grow into something real big and ambitious. I'll try to keep it a > bit simpler this time. It will be configurable, but [NOT] as extreme as > suggested earlier.. I need your help to find a good balance. As discussed with Benjamin I plan to introduce roles as a complement to the current groups. I'm thinking of: AnonymousGuest, AuthenticatedUser, BugReporter, BugAssignee, ComponentOwner, ProjectAdmin, and BugTrackerAdmin. (The last two will not be configurable) Having a role can only give you more permissions. (logical OR with your current permissions) I think some hierarchie can be good here: A user should also be a guest, and a reporter or assignee should also be a user (and thus also a guest). Comments? -- Ulf |
|
From: Ulf E. <ulf...@us...> - 2005-10-10 19:32:29
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26827 Modified Files: bug.php Log Message: Fix for bug #1322917 - auto add of html link to "bug ..." don't work Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.155 retrieving revision 1.156 diff -u -r1.155 -r1.156 --- bug.php 5 Oct 2005 20:36:02 -0000 1.155 +++ bug.php 10 Oct 2005 19:31:53 -0000 1.156 @@ -115,16 +115,16 @@ // Set up the regex replacements $patterns = array( - '/(bug)[[:space:]]*(#?)([0-9]+)/i', // matches bug #nn - '/cvs:([^\.\s:,\?!]+(\.[^\.\s:,\?!]+)*)(:)?(\d\.[\d\.]+)?([\W\s])?/i', // matches cvs:filename.php or cvs:filename.php:n.nn '/</', '/>/', + '/(bug)[[:space:]]*(#?)([0-9]+)/i', // matches bug #nn + '/cvs:([^\.\s:,\?!]+(\.[^\.\s:#,\?!]+)*)([:#](rev|r)?)?(\d\.[\d\.]+)?([\W\s])?/i', // matches cvs:filename.php, cvs:filename.php:n.nn or cvs:filename.php#revn.nn ); $replacements = array( - "\\1 <a href='$me?op=show&bugid=\\3'>\\2\\3</a>", // internal link to bug - '<a href="'.CVS_WEB.'\\1#rev\\4" target="_new">\\1</a>\\5', // external link to cvs web interface '<', '>', + "<a href='$me?op=show&bugid=\\3'>\\1 \\2\\3</a>", // internal link to bug + '<a href="'.CVS_WEB.'\\1#rev\\5" target="_new">\\1</a>\\6', // external link to cvs web interface ); return nl2br(preg_replace($patterns, $replacements, stripslashes($comments))); |
|
From: Ulf E. <ulf...@fa...> - 2005-10-07 14:01:56
|
On Thu, 6 Oct 2005 20:28:49 -0700, "Benjamin Curtis" said: > Agreed I hope you two are not judging these requests based on my interpretation of them only ;-) > On Oct 6, 2005, at 8:30 AM, Mufasa wrote: > > I would close these: > > RFE #622590 - nothing wrong with this one really, but it isn't that > > necessary. You can always just make a generic component and version > > if you > > don't want them assigned to a specific one I think things have changed since this request was written. You cannot can create a project without also creating a first component and version. > > I would leave these open: > > > > RFE #595189 - Eventually, when reporting gets fuller featured, it > > would be > > nice to see how many versions a bug spanned, etc. It is not a high > > priority > > bug probably, but I'd leave this one open. Okay. But then there are more fields, such as os_id, site_id, and database_id, that would benefit from a many-to-many relation. > > REF #975055 - Where copying and modifying might not be a big deal, > > I think > > referencing old bugs formally (automatic linkage) for abstract reasons > > (followups, reference to similar problems, tracking of repeated > > problems > > with a system/user, and many others I'm sure...) is a good idea. I read the RFE as to be about creating a new bug by cloning an old and modifying it. (that is, using an old bug as a template) What you suggest, referencing old bugs for followups or tracking, sounds like something comletely different.. When and how would you like to set such links? |
|
From: Benjamin C. <php...@be...> - 2005-10-07 03:28:53
|
Agreed On Oct 6, 2005, at 8:30 AM, Mufasa wrote: > IMHO.... > > I would close these: > > RFE #486191 - can't see a need for this--already has an ID > RFE #529972 - can't see a need for this either; bug numbers do not > need to > be natural (aka mean something other than an identifier) > RFE #536452 - already has a 'number' aka ID, even though it is not > editable. > If someone wants to track it with a number they can always put it > in the > name > RFE #622590 - nothing wrong with this one really, but it isn't that > necessary. You can always just make a generic component and version > if you > don't want them assigned to a specific one > > > I would leave these open: > > RFE #595189 - Eventually, when reporting gets fuller featured, it > would be > nice to see how many versions a bug spanned, etc. It is not a high > priority > bug probably, but I'd leave this one open. > REF #975055 - Where copying and modifying might not be a big deal, > I think > referencing old bugs formally (automatic linkage) for abstract reasons > (followups, reference to similar problems, tracking of repeated > problems > with a system/user, and many others I'm sure...) is a good idea. > > > > Jon Adams > FireTiger.net (http://www.firetiger.net) > > > > > -----Original Message----- > From: php...@li... > [mailto:php...@li...] On Behalf Of Ulf > Erikson > Sent: Thursday, October 06, 2005 10:35 AM > To: php...@li... > Subject: [phpBT-dev] Questionable Feature Requests > > Hoi, > > I have found some Feature Requests where I am wondering whether anyone > but the reporter would find it useful.. Would it be okay to close > any or > these? > > * RFE #486191 - unique bug ID (serial #) > Each bug should have a unique serial number (which is really a > counter). I think that is what we have? but maybe the request is > that it should be editable? > > * RFE #529972 - Optional per-project numbering > Each project should start counting from bug #1. But what will > happen when you move bugs from one project to another? > > * RFE #536452 - Project number > Each project should have an editable number besides a name. > > * RFE #595189 - Bug with multiple versions > Ability to mark a bug as existing in several versions without > filing multiple bug reports. > > * RFE #622590 - Can not add new bug > Request to be able to work without component and version. > > * REF #975055 - Feature Req: Duplicate Bug > Request to be able to create new bugs by cloning and modifying > old > bugs. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, > discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, > discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev > |
|
From: Mufasa <mu...@co...> - 2005-10-06 15:30:36
|
IMHO.... I would close these: RFE #486191 - can't see a need for this--already has an ID RFE #529972 - can't see a need for this either; bug numbers do not need to be natural (aka mean something other than an identifier) RFE #536452 - already has a 'number' aka ID, even though it is not editable. If someone wants to track it with a number they can always put it in the name RFE #622590 - nothing wrong with this one really, but it isn't that necessary. You can always just make a generic component and version if you don't want them assigned to a specific one I would leave these open: RFE #595189 - Eventually, when reporting gets fuller featured, it would be nice to see how many versions a bug spanned, etc. It is not a high priority bug probably, but I'd leave this one open. REF #975055 - Where copying and modifying might not be a big deal, I think referencing old bugs formally (automatic linkage) for abstract reasons (followups, reference to similar problems, tracking of repeated problems with a system/user, and many others I'm sure...) is a good idea. Jon Adams FireTiger.net (http://www.firetiger.net) -----Original Message----- From: php...@li... [mailto:php...@li...] On Behalf Of Ulf Erikson Sent: Thursday, October 06, 2005 10:35 AM To: php...@li... Subject: [phpBT-dev] Questionable Feature Requests Hoi, I have found some Feature Requests where I am wondering whether anyone but the reporter would find it useful.. Would it be okay to close any or these? * RFE #486191 - unique bug ID (serial #) Each bug should have a unique serial number (which is really a counter). I think that is what we have? but maybe the request is that it should be editable? * RFE #529972 - Optional per-project numbering Each project should start counting from bug #1. But what will happen when you move bugs from one project to another? * RFE #536452 - Project number Each project should have an editable number besides a name. * RFE #595189 - Bug with multiple versions Ability to mark a bug as existing in several versions without filing multiple bug reports. * RFE #622590 - Can not add new bug Request to be able to work without component and version. * REF #975055 - Feature Req: Duplicate Bug Request to be able to create new bugs by cloning and modifying old bugs. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ phpbt-dev mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Ulf E. <ulf...@fa...> - 2005-10-06 14:34:47
|
Hoi,
I have found some Feature Requests where I am wondering whether anyone
but the reporter would find it useful.. Would it be okay to close any or
these?
* RFE #486191 - unique bug ID (serial #)
Each bug should have a unique serial number (which is really a
counter). I think that is what we have? but maybe the request is
that it should be editable?
* RFE #529972 - Optional per-project numbering
Each project should start counting from bug #1. But what will
happen when you move bugs from one project to another?
* RFE #536452 - Project number
Each project should have an editable number besides a name.
* RFE #595189 - Bug with multiple versions
Ability to mark a bug as existing in several versions without
filing multiple bug reports.
* RFE #622590 - Can not add new bug
Request to be able to work without component and version.
* REF #975055 - Feature Req: Duplicate Bug
Request to be able to create new bugs by cloning and modifying old
bugs.
|
|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:36:15
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3097 Modified Files: bug.php CHANGELOG Log Message: Added support to mark bugs as duplicates of each other Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.154 retrieving revision 1.155 diff -u -r1.154 -r1.155 --- bug.php 5 Oct 2005 20:28:53 -0000 1.154 +++ bug.php 5 Oct 2005 20:36:02 -0000 1.155 @@ -459,8 +459,10 @@ $remove_cc = null; } } - $add_dependency = isset($add_dependency) && $may_edit ? $add_dependency : null; - $remove_dependency = isset($remove_dependency) && $may_edit ? $remove_dependency : null; + $add_dependency = isset($add_dependency) && $may_edit ? (int) $add_dependency : null; + $remove_dependency = isset($remove_dependency) && $may_edit ? (int) $remove_dependency : null; + $add_duplicate = isset($add_duplicate) && $may_edit ? (int) $add_duplicate : null; + $del_duplicate = isset($del_duplicate) && $may_edit ? (int) $del_duplicate : null; if (isset($_POST)) { foreach ($_POST as $k => $v) { @@ -490,8 +492,13 @@ $db->query('delete from '.TBL_BUG_CC." where bug_id = $bugid and user_id in (".@join(',', $remove_cc).')'); } + + $old_duplicates = $db->getCol("select b.bug_id from ".TBL_BUG_DEPENDENCY." d1, ".TBL_BUG_DEPENDENCY." d2, ".TBL_BUG." b, ".TBL_STATUS." s where d1.bug_id = $bugid and d2.bug_id = b.bug_id and d2.bug_id = d1.depends_on and d2.depends_on = d1.bug_id group by b.bug_id"); + + $no_dupes = !empty($old_duplicates) ? ' and depends_on <> '.join(' and depends_on <> ', $old_duplicates) : ''; + // Add dependency if requested - if (!empty($add_dependency)) { + if (!empty($add_dependency) && $add_dependency != $bugid && !in_array($add_dependency, $old_duplicates)) { $add_dependency = preg_replace('/\D/', '', $add_dependency); // Validate the bug number @@ -507,25 +514,72 @@ return (array('add_dep' => translate("That bug dependency has already been added"))); } - $old_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid")); + $old_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid $no_dupes")); // Add it $db->query("insert into ".TBL_BUG_DEPENDENCY." (bug_id, depends_on) values($bugid, $add_dependency)"); - $new_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid")); + $new_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid $no_dupes")); $db->query('insert into '.TBL_BUG_HISTORY.' (bug_id, changed_field, old_value, new_value, created_by, created_date) values('. join(', ', array($bugid, $db->quote(translate("dependency")), $db->quote($old_dependencies), $db->quote($new_dependencies), $u, $now)).")"); } // Remove dependency if requested - if (!empty($del_dependency)) { + if (!empty($del_dependency) && !in_array($del_dependency, $old_duplicates)) { $del_dependency = preg_replace('/\D/', '', $del_dependency); if (is_numeric($del_dependency)) { // Check if the dependency has already been added if ($db->getOne('select count(*) from '.TBL_BUG_DEPENDENCY." where bug_id = $bugid and depends_on = $del_dependency")) { - $old_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid")); + $old_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid $no_dupes")); $db->query("delete from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid and depends_on = $del_dependency"); - $new_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid")); + $new_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid $no_dupes")); + + $db->query('insert into '.TBL_BUG_HISTORY.' (bug_id, changed_field, old_value, new_value, created_by, created_date) values('. join(', ', array($bugid, $db->quote(translate("dependency")), $db->quote($old_dependencies), $db->quote($new_dependencies), $u, $now)).")"); + } + } + } + + // Add duplicate if requested + if (!empty($add_duplicate) && $add_duplicate != $bugid) { + $add_duplicate = preg_replace('/\D/', '', $add_duplicate); + + // Validate the bug number + if (!is_numeric($add_duplicate)) { + return (array('add_dep' => translate("That bug does not exist"))); + } + if (!$db->getOne('select count(*) from '.TBL_BUG." where bug_id = $add_duplicate")) { + return (array('add_dep' => translate("That bug does not exist"))); + } + + // Check if the dependency has already been added + if ($db->getOne('select count(*) from '.TBL_BUG_DEPENDENCY." where bug_id = $bugid and depends_on = $add_duplicate") || $db->getOne('select count(*) from '.TBL_BUG_DEPENDENCY." where bug_id = $add_duplicate and depends_on = $bugid") || $bugid == $add_duplicate) { + return (array('add_dep' => translate("That bug dependency has already been added"))); + } + + $db->query("insert into ".TBL_BUG_DEPENDENCY." (bug_id, depends_on) values($bugid, $add_duplicate)"); + $db->query("insert into ".TBL_BUG_DEPENDENCY." (bug_id, depends_on) values($add_duplicate, $bugid)"); + $new_duplicates = $db->getCol("select b.bug_id from ".TBL_BUG_DEPENDENCY." d1, ".TBL_BUG_DEPENDENCY." d2, ".TBL_BUG." b, ".TBL_STATUS." s where d1.bug_id = $bugid and d2.bug_id = b.bug_id and d2.bug_id = d1.depends_on and d2.depends_on = d1.bug_id group by b.bug_id"); + $old_dupes = delimit_list(', ', $old_duplicates); + $new_dupes = delimit_list(', ', $new_duplicates); + + $db->query('insert into '.TBL_BUG_HISTORY.' (bug_id, changed_field, old_value, new_value, created_by, created_date) values('. join(', ', array($bugid, $db->quote(translate("duplicates")), $db->quote($old_dupes), $db->quote($new_dupes), $u, $now)).")"); + } + + // Remove duplicate if requested + if (!empty($del_duplicate)) { + $del_duplicate = preg_replace('/\D/', '', $del_duplicate); + if (is_numeric($del_duplicate)) { + // Check if the dependency has already been added + if ($db->getOne('select count(*) from '.TBL_BUG_DEPENDENCY." where bug_id = $bugid and depends_on = $del_duplicate")) { + // both ways + if ($db->getOne('select count(*) from '.TBL_BUG_DEPENDENCY." where bug_id = $del_duplicate and depends_on = $bugid")) { + $old_dependencies = delimit_list(', ', $db->getCol("select depends_on from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid")); + $db->query("delete from ".TBL_BUG_DEPENDENCY." where bug_id = $bugid and depends_on = $del_duplicate"); + $db->query("delete from ".TBL_BUG_DEPENDENCY." where bug_id = $del_duplicate and depends_on = $bugid"); + $new_duplicates = $db->getCol("select b.bug_id from ".TBL_BUG_DEPENDENCY." d1, ".TBL_BUG_DEPENDENCY." d2, ".TBL_BUG." b, ".TBL_STATUS." s where d1.bug_id = $bugid and d2.bug_id = b.bug_id and d2.bug_id = d1.depends_on and d2.depends_on = d1.bug_id group by b.bug_id"); + $old_dupes = delimit_list(', ', $old_duplicates); + $new_dupes = delimit_list(', ', $new_duplicates); - $db->query('insert into '.TBL_BUG_HISTORY.' (bug_id, changed_field, old_value, new_value, created_by, created_date) values('. join(', ', array($bugid, $db->quote(translate("dependency")), $db->quote($old_dependencies), $db->quote($new_dependencies), $u, $now)).")"); + $db->query('insert into '.TBL_BUG_HISTORY.' (bug_id, changed_field, old_value, new_value, created_by, created_date) values('. join(', ', array($bugid, $db->quote(translate("duplicates")), $db->quote($old_dupes), $db->quote($new_dupes), $u, $now)).")"); + } } } } @@ -712,13 +766,21 @@ $t->assign($row); - $bug_dependencies = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.bug_id = $bugid and d.depends_on = b.bug_id and b.status_id = s.status_id"); + $bug_duplicates = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d1, ".TBL_BUG_DEPENDENCY." d2, ".TBL_BUG." b, ".TBL_STATUS." s where d1.bug_id = $bugid and d2.bug_id = b.bug_id and d2.bug_id = d1.depends_on and d2.depends_on = d1.bug_id and b.status_id = s.status_id"); - $bug_blocks = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.depends_on = $bugid and d.bug_id = b.bug_id and b.status_id = s.status_id"); + $no_dupes = ""; + for ($i = 0, $count = count($bug_duplicates); $i < $count; $i++) { + $no_dupes .= " and b.bug_id <> ".$bug_duplicates[$i]['bug_id']; + } + + $bug_dependencies = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.bug_id = $bugid and d.depends_on = b.bug_id and b.status_id = s.status_id $no_dupes"); + + $bug_blocks = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.depends_on = $bugid and d.bug_id = b.bug_id and b.status_id = s.status_id $no_dupes"); $t->assign(array( 'bug_dependencies' => $bug_dependencies, - 'bug_blocks' => $bug_blocks + 'bug_blocks' => $bug_blocks, + 'bug_duplicates' => $bug_duplicates )); // Show the comments @@ -787,9 +849,16 @@ // Override the database values with posted values if there were errors if (count($error)) $t->assign($_POST); - $bug_dependencies = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.bug_id = $bugid and d.depends_on = b.bug_id and b.status_id = s.status_id"); + $bug_duplicates = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d1, ".TBL_BUG_DEPENDENCY." d2, ".TBL_BUG." b, ".TBL_STATUS." s where d1.bug_id = $bugid and d2.bug_id = b.bug_id and d2.bug_id = d1.depends_on and d2.depends_on = d1.bug_id and b.status_id = s.status_id"); + + $no_dupes = ""; + for ($i = 0, $count = count($bug_duplicates); $i < $count; $i++) { + $no_dupes .= " and b.bug_id <> ".$bug_duplicates[$i]['bug_id']; + } + + $bug_dependencies = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.bug_id = $bugid and d.depends_on = b.bug_id and b.status_id = s.status_id $no_dupes"); - $bug_blocks = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.depends_on = $bugid and d.bug_id = b.bug_id and b.status_id = s.status_id"); + $bug_blocks = $db->getAll("select b.bug_id, s.bug_open from ".TBL_BUG_DEPENDENCY." d, ".TBL_BUG." b, ".TBL_STATUS." s where d.depends_on = $bugid and d.bug_id = b.bug_id and b.status_id = s.status_id $no_dupes"); $t->assign(array( 'error' => $error, @@ -797,7 +866,8 @@ 'already_bookmarked' => $db->getOne("select count(*) from ".TBL_BOOKMARK." where bug_id = $bugid and user_id = $u"), 'num_votes' => $db->getOne("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bugid"), 'bug_dependencies' => $bug_dependencies, - 'bug_blocks' => $bug_blocks + 'bug_blocks' => $bug_blocks, + 'bug_duplicates' => $bug_duplicates, )); // Show the attachments Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- CHANGELOG 2 Oct 2005 21:09:14 -0000 1.74 +++ CHANGELOG 5 Oct 2005 20:36:02 -0000 1.75 @@ -12,7 +12,8 @@ : Added the ability to update several bugs at once : Allow admins and project admins to delete bugs : Allow admins and project admins to change reporter -: Adding two new permissions (AddBug, CloseBug) and one new group (Manager) +: Added two new permissions (AddBug, CloseBug) and one new group (Manager) +: Added support to mark bugs as duplicates of each other -- 1.0 -- 3 Aug 2005 : Added links from project summary on home page (Phil Davis). |
|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:36:14
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3097/templates/default Modified Files: bugdisplay.html Log Message: Added support to mark bugs as duplicates of each other Index: bugdisplay.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- bugdisplay.html 5 Oct 2005 20:28:53 -0000 1.56 +++ bugdisplay.html 5 Oct 2005 20:36:02 -0000 1.57 @@ -198,6 +198,7 @@ <?php } ?> </tr><tr> <td colspan="2" valign="top"> + <br> <?php if (!empty($error['add_dep'])) echo "<div class=\"error\">{$error['add_dep']}</div>"; ?> <?php echo translate("Depends on bugs"); ?>: <?php for ($i = 0, $count = count($bug_dependencies); $i < $count; $i++) { @@ -217,9 +218,23 @@ ($i < $count - 1 ? ', ' : '')); } ?> <br> + <?php echo translate("Duplicates"); ?>: + <?php for ($i = 0, $count = count($bug_duplicates); $i < $count; $i++) { + if (isset($bug_duplicates[$i])) { + printf('<a href="bug.php?op=show&bugid=%d" class="%s">#%d</a>%s', + $bug_duplicates[$i]['bug_id'], + ($bug_duplicates[$i]['bug_open'] ? 'open_bug_number' : 'closed_bug_number'), + $bug_duplicates[$i]['bug_id'], + ($i < $count - 1 ? ', ' : '')); + } + } ?> + <br> <?php if ($may_edit) { ?> + <br> <?php echo translate("Add dependency"); ?>: <input type="text" name="add_dependency" size="5"><br> - <?php echo translate("Remove dependency"); ?>: <input type="text" name="del_dependency" size="5"><br><br> + <?php echo translate("Remove dependency"); ?>: <input type="text" name="del_dependency" size="5"><br> + <?php echo translate("Add duplicate"); ?>: <input type="text" name="add_duplicate" size="5"><br> + <?php echo translate("Remove duplicate"); ?>: <input type="text" name="del_duplicate" size="5"><br><br> <?php } else { ?> <input type="hidden" name="add_dependency" value=""> <input type="hidden" name="del_dependency" value=""> |
|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:29:31
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1150/inc Modified Files: functions.php Log Message: Changes to the CloseBug permission Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- functions.php 4 Oct 2005 20:10:04 -0000 1.68 +++ functions.php 5 Oct 2005 20:28:53 -0000 1.69 @@ -51,7 +51,7 @@ /// /// Build a select box with the item matching $value selected -function build_select($box, $selected = '', $project = 0) { +function build_select($box, $selected = '', $project = 0, $limit = false) { global $db, $select, $perm, $restricted_projects, $QUERY, $u; // create hash to map tablenames @@ -78,7 +78,9 @@ 'severity' => $querystart.$querymid, 'priority' => $querystart.$querymid, 'site' => $querystart.$querymid, - 'status' => $querystart.$querymid, + 'status' => (!$limit || $perm->have_perm('CloseBug', $project) + ? $querystart.$querymid + : $querystart." where sort_order > 0 and (bug_open = 1 or status_id = ".(!empty($selected)?$selected:0).") order by sort_order"), 'resolution' => $querystart.$querymid, 'project' => $perm->have_perm('Admin') ? $querystart." where ". |
|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:29:02
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1150 Modified Files: bug.php Log Message: Changes to the CloseBug permission Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.153 retrieving revision 1.154 diff -u -r1.153 -r1.154 --- bug.php 2 Oct 2005 21:04:50 -0000 1.153 +++ bug.php 5 Oct 2005 20:28:53 -0000 1.154 @@ -424,15 +424,21 @@ $url = isset($url) && $may_edit ? $url : $buginfo['url']; $severity_id = isset($severity_id) && $may_edit ? (int) $severity_id : $buginfo['severity_id']; $priority = isset($priority) && $may_edit ? (int) $priority : $buginfo['priority']; + $resolution_id = isset($resolution_id) && $may_close ? (int) $resolution_id : $buginfo['resolution_id']; $status_id = isset($status_id) && $may_edit ? (int) $status_id : $buginfo['status_id']; - if (is_closed($status_id) && !$may_close) { - $status_id = $buginfo['status_id']; + if (!$may_close) { + if (is_closed($status_id)) { + $status_id = $buginfo['status_id']; + } + else if (is_closed($buginfo['status_id'])) { + $resolution_id = 0; + $changedfields['resolution_id'] = 0; + } } $database_id = isset($database_id) && $may_edit ? (int) $database_id : $buginfo['database_id']; $to_be_closed_in_version_id = isset($to_be_closed_in_version_id) && $may_close ? (int) $to_be_closed_in_version_id : $buginfo['to_be_closed_in_version_id']; $closed_in_version_id = isset($closed_in_version_id) && $may_close ? (int) $closed_in_version_id : $buginfo['closed_in_version_id']; $site_id = isset($site_id) && $may_edit ? (int) $site_id : $buginfo['site_id']; - $resolution_id = isset($resolution_id) && $may_close ? (int) $resolution_id : $buginfo['resolution_id']; $assigned_to = isset($assigned_to) && $may_edit ? (int) $assigned_to : $buginfo['assigned_to']; if (isset($perm) and $perm->have_perm_proj($project_id) and isset($created_by) && is_numeric($created_by)) { $created_by = (int) $created_by; |
|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:29:02
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1150/templates/default Modified Files: bugdisplay.html Log Message: Changes to the CloseBug permission Index: bugdisplay.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- bugdisplay.html 2 Oct 2005 21:04:50 -0000 1.55 +++ bugdisplay.html 5 Oct 2005 20:28:53 -0000 1.56 @@ -165,7 +165,7 @@ <?php } ?> <td><?php echo translate("Status"); ?>:</td> <?php if ($may_edit) { ?> - <td><select name="status_id"><?php build_select('status', $status_id) ?></select></td> + <td><select name="status_id"><?php build_select('status', $status_id, $project_id, true); ?></select></td> <?php } else { ?> <td><?php echo lookup('status', $status_id); ?></td> <?php } ?> |
|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:26:05
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv714 Modified Files: query.php Log Message: Fix for 'unassigned' search and Edit Query Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.109 retrieving revision 1.110 diff -u -r1.109 -r1.110 --- query.php 4 Oct 2005 20:12:12 -0000 1.109 +++ query.php 5 Oct 2005 20:25:57 -0000 1.110 @@ -59,6 +59,7 @@ $t->assign('severity', isset($severity) ? $severity : null); $t->assign('database', isset($database) ? $database : null); $t->assign('site', isset($site) ? $site : null); + $t->assign('unassigned', isset($unassigned) ? $unassigned : null); $t->assign('emailsearch1', isset($emailsearch1) ? $emailsearch1 : null); $t->assign('closedinversion', isset($closedinversion) ? $closedinversion : null); $t->assign('tobeclosedinversion', isset($tobeclosedinversion) ? $tobeclosedinversion : null); |
|
From: Ulf E. <ulf...@us...> - 2005-10-04 20:12:25
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18907/templates/default Modified Files: queryform.html Log Message: RFE #781511 - Allow search for "None" in Assigned-to Field Index: queryform.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/queryform.html,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- queryform.html 4 Oct 2005 20:10:04 -0000 1.25 +++ queryform.html 4 Oct 2005 20:12:12 -0000 1.26 @@ -128,6 +128,11 @@ </tr> </table></td> </tr> + <tr> + <td><input type="checkbox" name="unassigned" value="1" + <?php if (!empty($unassigned)) echo "checked"; ?>> + <?php echo translate("Unassigned"); ?></td> + </tr> </table></td> </tr> </table> |
|
From: Ulf E. <ulf...@us...> - 2005-10-04 20:12:25
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18907 Modified Files: query.php Log Message: RFE #781511 - Allow search for "None" in Assigned-to Field Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.108 retrieving revision 1.109 diff -u -r1.108 -r1.109 --- query.php 4 Oct 2005 20:10:04 -0000 1.108 +++ query.php 4 Oct 2005 20:12:12 -0000 1.109 @@ -160,6 +160,9 @@ if (!empty($closed_end_date)) { $query[] = 'b.close_date < '.strtotime($closed_end_date); } + if (!empty($unassigned)) { + $query[] = 'b.assigned_to = 0'; + } // Email field(s) if (!empty($email1) && !empty($emailfield1)) { |
|
From: Ulf E. <ulf...@us...> - 2005-10-04 20:10:23
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18467/inc Modified Files: functions.php Log Message: RFE #811153 - ability to query version_id = 0 Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- functions.php 2 Oct 2005 21:04:50 -0000 1.67 +++ functions.php 4 Oct 2005 20:10:04 -0000 1.68 @@ -482,13 +482,14 @@ $rs = $db->query(sprintf($QUERY['functions-project-js'], $db->quote(@join(',', $_SESSION['group_ids'])))); } + $js = "closedversions['All'] = new Array(new Array('','All'),new Array('0','Not Set'));\n"; while (list($pid, $pname) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) { $pname = addslashes($pname); // Version arrays $js .= "versions['$pname'] = new Array(". ((!isset($no_all) or !$no_all) ? "new Array('','All')," : ''); $js2 = "closedversions['$pname'] = new Array(". - ((!isset($no_all) or !$no_all) ? "new Array('','All')," + ((!isset($no_all) or !$no_all) ? "new Array('','All'),new Array('0','Not Set')," : "new Array(0, 'Choose One'),"); $rs2 = $db->query("select version_name, version_id from ".TBL_VERSION." where project_id = ".$db->quote($pid)." and active = 1"); while (list($version,$vid) = $rs2->fetchRow(DB_FETCHMODE_ORDERED)) { |
|
From: Ulf E. <ulf...@us...> - 2005-10-04 20:10:14
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18467 Modified Files: query.php Log Message: RFE #811153 - ability to query version_id = 0 Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.107 retrieving revision 1.108 diff -u -r1.107 -r1.108 --- query.php 2 Oct 2005 20:44:19 -0000 1.107 +++ query.php 4 Oct 2005 20:10:04 -0000 1.108 @@ -202,8 +202,8 @@ if (!empty($projects)) { $proj[] = "b.project_id = '$projects'"; if (!empty($versions) and $versions != 'All') $proj[] = "b.version_id = '$versions'"; - if (!empty($closedinversion) and $closedinversion != 'All') $proj[] = "b.closed_in_version_id = '$closedinversion'"; - if (!empty($tobeclosedinversion) and $tobeclosedinversion != 'All') $proj[] = "b.to_be_closed_in_version_id = '$tobeclosedinversion'"; + if (isset($closedinversion) and $closedinversion != '' and $closedinversion != 'All') $proj[] = "b.closed_in_version_id = '$closedinversion'"; + if (isset($tobeclosedinversion) and $tobeclosedinversion != '' and $tobeclosedinversion != 'All') $proj[] = "b.to_be_closed_in_version_id = '$tobeclosedinversion'"; if (!empty($components) and $components != 'All') $proj[] = "b.component_id = '$components'"; $query[] = '('.@join(' and ',$proj).')'; } elseif (!$perm->have_perm('Admin')) { // Filter results from hidden projects |
|
From: Ulf E. <ulf...@us...> - 2005-10-04 20:10:13
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18467/templates/default Modified Files: queryform.html Log Message: RFE #811153 - ability to query version_id = 0 Index: queryform.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/queryform.html,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- queryform.html 22 Aug 2005 20:40:08 -0000 1.24 +++ queryform.html 4 Oct 2005 20:10:04 -0000 1.25 @@ -19,15 +19,15 @@ f.versions.options[x].value = versions[sel][x][0]; f.versions.options[x].text = versions[sel][x][1]; } - f.closedinversion.length = versions[sel].length; - for (var x = 0; x < versions[sel].length; x++) { - f.closedinversion.options[x].value = versions[sel][x][0]; - f.closedinversion.options[x].text = versions[sel][x][1]; + f.closedinversion.length = closedversions[sel].length; + for (var x = 0; x < closedversions[sel].length; x++) { + f.closedinversion.options[x].value = closedversions[sel][x][0]; + f.closedinversion.options[x].text = closedversions[sel][x][1]; } - f.tobeclosedinversion.length = versions[sel].length; - for (var x = 0; x < versions[sel].length; x++) { - f.tobeclosedinversion.options[x].value = versions[sel][x][0]; - f.tobeclosedinversion.options[x].text = versions[sel][x][1]; + f.tobeclosedinversion.length = closedversions[sel].length; + for (var x = 0; x < closedversions[sel].length; x++) { + f.tobeclosedinversion.options[x].value = closedversions[sel][x][0]; + f.tobeclosedinversion.options[x].text = closedversions[sel][x][1]; } f.components.length = components[sel].length; for (var x = 0; x < components[sel].length; x++) { @@ -196,6 +196,7 @@ <td><b><?php echo translate("Closed in Version"); ?>:</b></td> <td><select name="closedinversion"> <option value=''><?php echo translate("All"); ?></option> + <option value='0' <?php echo isset($closedinversion) && $closedinversion!='' && $closedinversion==0 ? 'selected': ''; ?>><?php echo translate("Not Set"); ?></option> <?php if ($project) build_select('version', $closedinversion, $project); ?> </select> </td> @@ -203,6 +204,7 @@ <td><b><?php echo translate("To be Closed in Version"); ?>:</b></td> <td><select name="tobeclosedinversion"> <option value=''><?php echo translate("All"); ?></option> + <option value='0' <?php echo isset($tobeclosedinversion) && $tobeclosedinversion!='' && $tobeclosedinversion==0 ? 'selected': ''; ?>><?php echo translate("Not Set"); ?></option> <?php if ($project) build_select('version', $tobeclosedinversion, $project); ?> </select> </td> |
|
From: Ulf E. <ulf...@us...> - 2005-10-02 23:42:52
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18864/templates/default Modified Files: buglist.html Log Message: Fixed a bug with mass updates Index: buglist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/buglist.html,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- buglist.html 27 Sep 2005 19:49:42 -0000 1.18 +++ buglist.html 1 Oct 2005 15:23:39 -0000 1.19 @@ -65,9 +65,9 @@ <tr> <?php if ($project_id > 0) { ?> <td><?php echo translate("Component"); ?>: - <select name="component_id"><option value="-1" selected>No Change</option><?php build_select('component', -1, $projects) ?></select></td> + <select name="component_id"><option value="-1" selected>No Change</option><?php build_select('component', -1, $project_id) ?></select></td> <td><?php echo translate("Version"); ?>: - <select name="version_id"><option value="-1" selected>No Change</option><?php build_select('version', -1, $projects) ?></select></td> + <select name="version_id"><option value="-1" selected>No Change</option><?php build_select('version', -1, $project_id) ?></select></td> </tr><tr> <?php } ?> <td><?php echo translate("Priority"); ?>: @@ -81,7 +81,7 @@ <select name="resolution_id"><option value="-1" selected>No Change</option><option value="0"><?php echo translate("None"); ?></option><?php build_select('resolution', -1) ?></select></td> </tr><tr> <td><?php echo translate("Assigned to"); ?>: - <?php if (isset($perm) && ($perm->have_perm('EditAssignment') or $perm->have_perm_proj($projects))) { ?> + <?php if (isset($perm) && ($perm->have_perm('EditAssignment') or $perm->have_perm_proj($project_id))) { ?> <select name="assigned_to"><option value="-1" selected>No Change</option><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', -1) ?></select></td> <?php } else { ?> |
|
From: Ulf E. <ulf...@us...> - 2005-10-02 21:33:26
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17927/inc Modified Files: functions.php auth.php Log Message: Allow admins and project admins to delete bugs Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- functions.php 8 Sep 2005 20:05:42 -0000 1.65 +++ functions.php 1 Oct 2005 15:19:55 -0000 1.66 @@ -676,8 +676,14 @@ // Delete a bug and all associated records from the database function delete_bug($bug_id) { - global $db; + global $db, $perm; + // Permissions + $projectid = $db->getOne("select project_id". + " from ".TBL_BUG." b". + " where b.bug_id = ".$db->quote($bug_id)); + $perm->check_proj($projectid); + // Attachments $attary = $db->getAll("select file_name, project_id". " from ".TBL_ATTACHMENT." a, ".TBL_BUG." b". Index: auth.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- auth.php 2 Sep 2005 19:17:24 -0000 1.23 +++ auth.php 1 Oct 2005 15:19:55 -0000 1.24 @@ -115,7 +115,7 @@ } } - function check_proj($project_id) { + function check_proj($project_id = -1) { global $db; if ($this->have_perm_proj($project_id)) { |
|
From: Ulf E. <ulf...@us...> - 2005-10-02 21:09:22
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1336 Modified Files: CHANGELOG Log Message: Updated the CHANGELOG Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- CHANGELOG 1 Oct 2005 15:19:56 -0000 1.73 +++ CHANGELOG 2 Oct 2005 21:09:14 -0000 1.74 @@ -11,6 +11,8 @@ : Added "priority" and "dependency" to the bug history : Added the ability to update several bugs at once : Allow admins and project admins to delete bugs +: Allow admins and project admins to change reporter +: Adding two new permissions (AddBug, CloseBug) and one new group (Manager) -- 1.0 -- 3 Aug 2005 : Added links from project summary on home page (Phil Davis). |
|
From: Ulf E. <ulf...@us...> - 2005-10-02 21:04:59
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv485/templates/default Modified Files: bugdisplay.html Log Message: RFE #618641 - Stricter editing RFE #579407 - Guest login Index: bugdisplay.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- bugdisplay.html 1 Oct 2005 15:19:56 -0000 1.54 +++ bugdisplay.html 2 Oct 2005 21:04:50 -0000 1.55 @@ -1,4 +1,3 @@ -<?php $disabled = empty($_SESSION['uid']) ? 'onClick="alertNoChange();"' : ''; ?> <script type="text/JavaScript"> <!-- warningString = '<?php echo translate("You must login to modify this bug"); ?>'; @@ -47,15 +46,12 @@ window.open('attachment.php?use_js=1&bugid='+id, 'ewin', 'dependent=yes,width=350,height=200,scrollbars=1'); return false; } - - function alertNoChange() { - if (!warnedAlready) { - alert(warningString); - warnedAlready = true; - } - } //--> </script> +<?php + $may_edit = (isset($perm) && $perm->have_perm('EditBug', $project_id)); + $may_close = (isset($perm) && $perm->have_perm('CloseBug', $project_id)); +?> <form action="bug.php" method="post"> <input type="hidden" name="op" value="update"> <input type="hidden" name="bugid" value="<?php echo $bug_id ?>"> @@ -82,62 +78,124 @@ <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo translate("Reporter"); ?>:</td> - <td><b><?php echo maskemail($reporter) ?></b></td> + <?php if (isset($perm) and $perm->have_perm_proj($project_id)) { ?> + <td><select name="created_by"><?php build_select('reporter', $created_by) ?></select></td> + <?php } else { ?> + <td><b><?php echo maskemail($reporter); ?></b></td> + <?php } ?> <td><?php echo translate("Created"); ?>:</td> <td><b><?php echo date(DATE_FORMAT, $created_date) ?></b></td> </tr><tr> <td><?php echo translate("Project"); ?>:</td> - <td><select name="project_id" onChange="updateMenus(this.form)" <?php echo $disabled ?>><?php build_select('project', $project_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="project_id" onChange="updateMenus(this.form)"><?php build_select('project', $project_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('project', $project_id); ?></td> + <?php } ?> <td><?php echo translate("Priority"); ?>:</td> - <td><select name="priority" <?php echo $disabled ?>><?php build_select('priority', $priority) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="priority"><?php build_select('priority', $priority) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('priority', $priority); ?></td> + <?php } ?> </tr><tr> <td><?php echo translate("Component"); ?>:</td> - <td><select name="component_id" <?php echo $disabled ?>><?php build_select('component', $component_id, $project_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="component_id"><?php build_select('component', $component_id, $project_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('component', $component_id); ?></td> + <?php } ?> <td><?php echo translate("Severity"); ?>:</td> - <td><select name="severity_id" <?php echo $disabled ?>><?php build_select('severity', $severity_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="severity_id"><?php build_select('severity', $severity_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('severity', $severity_id); ?></td> + <?php } ?> </tr><tr> <td><?php echo translate("Version"); ?>:</td> - <td><select name="version_id" <?php echo $disabled ?>><?php build_select('version', $version_id, $project_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="version_id"><?php build_select('version', $version_id, $project_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('version', $version_id); ?></td> + <?php } ?> <td><?php echo translate("Operating System"); ?>:</td> - <td><select name="os_id" <?php echo $disabled ?>><?php build_select('os', $os_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="os_id"><?php build_select('os', $os_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('os', $os_id); ?></td> + <?php } ?> </tr><tr> <td><?php echo translate("To be closed in version"); ?></td> - <td><select name="to_be_closed_in_version_id" <?php echo $disabled ?>> - <option value="0"><?php echo translate("Choose one"); ?></option> - <?php build_select('version', $to_be_closed_in_version_id, $project_id) ?> - </select></td> + <?php if ($may_close) { ?> + <td><select name="to_be_closed_in_version_id"> + <option value="0"><?php echo translate("Choose one"); ?></option> + <?php build_select('version', $to_be_closed_in_version_id, $project_id) ?> + </select></td> + <?php } else { ?> + <td><?php echo lookup('version', $to_be_closed_in_version_id, $project_id); ?></td> + <?php } ?> <td><?php echo translate("Database"); ?>:</td> - <td><select name="database_id" <?php echo $disabled ?>><?php build_select('database', $database_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="database_id"><?php build_select('database', $database_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('database', $database_id); ?></td> + <?php } ?> </tr><tr> <td><?php echo translate("Closed in version"); ?></td> - <td><select name="closed_in_version_id" <?php echo $disabled ?>> - <option value="0"><?php echo translate("Choose one"); ?></option> - <?php build_select('version', $closed_in_version_id, $project_id) ?> - </select></td> + <?php if ($may_close) { ?> + <td><select name="closed_in_version_id"> + <option value="0"><?php echo translate("Choose one"); ?></option> + <?php build_select('version', $closed_in_version_id, $project_id) ?> + </select></td> + <?php } else { ?> + <td><?php echo lookup('version', $closed_in_version_id, $project_id); ?></td> + <?php } ?> <td><?php echo translate("Site"); ?></td> - <td><select name="site_id" <?php echo $disabled ?>><?php build_select('site', $site_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="site_id"><?php build_select('site', $site_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('site', $site_id); ?></td> + <?php } ?> </tr><tr> <td><?php echo translate("Summary"); ?>:</td> - <td><input type="text" size="30" maxlength="100" name="title" value="<?php echo stripslashes(htmlspecialchars($title)) ?>" <?php echo $disabled ?>></td> + <?php if ($may_edit) { ?> + <td><input type="text" size="30" maxlength="100" name="title" value="<?php echo stripslashes(htmlspecialchars($title)) ?>"></td> + <?php } else { ?> + <td><?php echo stripslashes(htmlspecialchars($title)); ?></td> + <?php } ?> <td><?php echo translate("Status"); ?>:</td> - <td><select name="status_id" <?php echo $disabled ?>><?php build_select('status', $status_id) ?></select></td> + <?php if ($may_edit) { ?> + <td><select name="status_id"><?php build_select('status', $status_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('status', $status_id); ?></td> + <?php } ?> </tr><tr> <td><?php if($url) echo "<a href=\"$url\">URL</a>"; else echo 'URL'; ?>:</td> - <td><input type="text" size="30" maxlength="255" name="url" value="<?php echo $url ?>" <?php echo $disabled ?>></td> + <?php if ($may_edit) { ?> + <td><input type="text" size="30" maxlength="255" name="url" value="<?php echo $url ?>"></td> + <?php } else { ?> + <td><?php echo $url; ?></td> + <?php } ?> <td><?php echo translate("Resolution"); ?>:</td> - <td><select name="resolution_id" <?php echo $disabled ?>><option value="0"><?php echo translate("None"); ?></option><?php build_select('resolution', $resolution_id) ?></select></td> + <?php if ($may_close) { ?> + <td><select name="resolution_id"><option value="0"><?php echo translate("None"); ?></option><?php build_select('resolution', $resolution_id) ?></select></td> + <?php } else { ?> + <td><?php echo lookup('resolution', $resolution_id); ?></td> + <?php } ?> </tr><tr> <td><?php echo translate("Assigned to"); ?>:</td> <?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> + <td><select name="assigned_to"><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', $assigned_to) ?></select></td> <?php } else { ?> <td> <?php echo lookup('assigned_to', $assigned_to); ?> <input type="hidden" name="assigned_to" value="<?php echo $assigned_to ?>"> </td> <?php } ?> - <td><?php echo translate("Add CC"); ?>:</td> - <td><input type="text" name="add_cc" <?php echo $disabled ?>></td> + <?php if (isset($perm)) { ?> + <td><?php echo translate("Add CC"); ?>:</td> + <td><input type="text" name="add_cc"></td> + <?php } ?> </tr><tr> <td colspan="2" valign="top"> <?php if (!empty($error['add_dep'])) echo "<div class=\"error\">{$error['add_dep']}</div>"; ?> @@ -159,17 +217,27 @@ ($i < $count - 1 ? ', ' : '')); } ?> <br> - <?php echo translate("Add dependency"); ?>: <input type="text" name="add_dependency" size="5" <?php echo $disabled ?>><br> - <?php echo translate("Remove dependency"); ?>: <input type="text" name="del_dependency" size="5" <?php echo $disabled ?>><br><br></td> + <?php if ($may_edit) { ?> + <?php echo translate("Add dependency"); ?>: <input type="text" name="add_dependency" size="5"><br> + <?php echo translate("Remove dependency"); ?>: <input type="text" name="del_dependency" size="5"><br><br> + <?php } else { ?> + <input type="hidden" name="add_dependency" value=""> + <input type="hidden" name="del_dependency" value=""> + <?php } ?> + </td> <td colspan="2" valign="top"> - <?php echo translate("Remove selected CCs"); ?>:<br> - <select name="remove_cc[]" size="5" style="width: 15em" multiple <?php echo $disabled ?>><?php build_select('bug_cc', $bug_id) ?></select></td> + <?php if (isset($perm)) { ?> + <?php echo translate("Remove selected CCs"); ?>:<br> + <select name="remove_cc[]" size="5" style="width: 15em" multiple><?php build_select('bug_cc', $bug_id, $project_id) ?></select> + <?php } ?> + </td> </tr> </table> <table border="0" cellpadding="2" cellspacing="0" width="100%"> + <?php if (isset($perm)) { ?> <tr class="noprint"> - <td valign="top"><?php echo translate("Additional comments"); ?>:<br><br> - <textarea name="comments" rows="6" cols="55" wrap="virtual" <?php echo $disabled ?>><?php echo isset($_POST['comments']) ? $_POST['comments'] : ''; ?></textarea> + <td valign="top"><br><?php echo translate("Additional comments"); ?>:<br> + <textarea name="comments" rows="6" cols="55" wrap="virtual"><?php echo isset($_POST['comments']) ? $_POST['comments'] : ''; ?></textarea> <br><br> <div align="right"> <?php if (!empty($_SESSION['uid'])) { ?> @@ -177,11 +245,17 @@ <input type="submit" value="Submit"> <?php } else echo translate("You must login to modify this bug"); ?> </div></td> - </tr><tr> + </tr> + <?php } ?> + <tr> <td><table border="0" cellpadding="0" width="100%"> <tr> <td colspan="2"><?php echo translate("Attachments"); ?>:</td> - <td colspan="3" align="right"><a href="attachment.php?bugid=<?php echo $bug_id; ?>" onClick="return popupAtt(<?php echo $bug_id; ?>)"><?php echo translate("Create new attachment"); ?></a></td> + <td colspan="3" align="right"> + <?php if ($may_edit) { ?> + <a href="attachment.php?bugid=<?php echo $bug_id; ?>" onClick="return popupAtt(<?php echo $bug_id; ?>)"><?php echo translate("Create new attachment"); ?></a> + <?php } ?> + </td> </tr><tr> <td colspan="5" height="2" bgcolor="#ffffff"><spacer type="block" height="2" width="2"></td> </tr><tr> |
|
From: Ulf E. <ulf...@us...> - 2005-10-02 21:04:58
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv485 Modified Files: bug.php Log Message: RFE #618641 - Stricter editing RFE #579407 - Guest login Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.152 retrieving revision 1.153 diff -u -r1.152 -r1.153 --- bug.php 2 Oct 2005 20:52:09 -0000 1.152 +++ bug.php 2 Oct 2005 21:04:50 -0000 1.153 @@ -402,18 +402,12 @@ } $url = $v; } - - if (isset($buginfo[$k]) && stripslashes($buginfo[$k]) != stripslashes($v)) { - $changedfields[$k] = $v; - } } } - $project_id = isset($project_id) ? $project_id : $buginfo['project_id']; - // 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_proj($project_id))) { + $u == $buginfo['created_by'] or $perm->have_perm_proj($buginfo['project_id']))) { return (array('status' => translate("You can not change this bug"))); } @@ -422,36 +416,61 @@ return (array('status' => translate("Someone has updated this bug since you viewed it. The bug info has been reloaded with the latest changes."))); } - $project_id = isset($project_id) ? $project_id : $buginfo['project_id']; - $title = isset($title) ? $title : $buginfo['title']; - $url = isset($url) ? $url : $buginfo['url']; - $severity_id = isset($severity_id) ? $severity_id : $buginfo['severity_id']; - $priority = isset($priority) ? $priority : $buginfo['priority']; - $status_id = isset($status_id) ? $status_id : $buginfo['status_id']; - $database_id = isset($database_id) ? $database_id : $buginfo['database_id']; - $to_be_closed_in_version_id = isset($to_be_closed_in_version_id) ? $to_be_closed_in_version_id : $buginfo['to_be_closed_in_version_id']; - $closed_in_version_id = isset($closed_in_version_id) ? $closed_in_version_id : $buginfo['closed_in_version_id']; - $site_id = isset($site_id) ? $site_id : $buginfo['site_id']; - $resolution_id = isset($resolution_id) ? $resolution_id : $buginfo['resolution_id']; - $assigned_to = isset($assigned_to) ? $assigned_to : $buginfo['assigned_to']; - $project_id = isset($project_id) ? $project_id : $buginfo['project_id']; + $may_edit = $perm->have_perm('EditBug', $buginfo['project_id']); + $may_close = $perm->have_perm('CloseBug', $buginfo['project_id']); + + $project_id = isset($project_id) && $may_edit ? (int) $project_id : $buginfo['project_id']; + $title = isset($title) && $may_edit ? $title : $buginfo['title']; + $url = isset($url) && $may_edit ? $url : $buginfo['url']; + $severity_id = isset($severity_id) && $may_edit ? (int) $severity_id : $buginfo['severity_id']; + $priority = isset($priority) && $may_edit ? (int) $priority : $buginfo['priority']; + $status_id = isset($status_id) && $may_edit ? (int) $status_id : $buginfo['status_id']; + if (is_closed($status_id) && !$may_close) { + $status_id = $buginfo['status_id']; + } + $database_id = isset($database_id) && $may_edit ? (int) $database_id : $buginfo['database_id']; + $to_be_closed_in_version_id = isset($to_be_closed_in_version_id) && $may_close ? (int) $to_be_closed_in_version_id : $buginfo['to_be_closed_in_version_id']; + $closed_in_version_id = isset($closed_in_version_id) && $may_close ? (int) $closed_in_version_id : $buginfo['closed_in_version_id']; + $site_id = isset($site_id) && $may_edit ? (int) $site_id : $buginfo['site_id']; + $resolution_id = isset($resolution_id) && $may_close ? (int) $resolution_id : $buginfo['resolution_id']; + $assigned_to = isset($assigned_to) && $may_edit ? (int) $assigned_to : $buginfo['assigned_to']; if (isset($perm) and $perm->have_perm_proj($project_id) and isset($created_by) && is_numeric($created_by)) { $created_by = (int) $created_by; } else { $created_by = $buginfo['created_by']; } - $version_id = isset($version_id) ? $version_id : $buginfo['version_id']; - $component_id = isset($component_id) ? $component_id : $buginfo['component_id']; - $os_id = isset($os_id) ? $os_id : $buginfo['os_id']; + $version_id = isset($version_id) && $may_edit ? (int) $version_id : $buginfo['version_id']; + $component_id = isset($component_id) && $may_edit ? (int) $component_id : $buginfo['component_id']; + $os_id = isset($os_id) && $may_edit ? (int) $os_id : $buginfo['os_id']; $comments = isset($comments) ? $comments : null; $add_cc = isset($add_cc) ? $add_cc : null; $remove_cc = isset($remove_cc) ? $remove_cc : null; - $add_dependency = isset($add_dependency) ? $add_dependency : null; - $remove_dependency = isset($remove_dependency) ? $remove_dependency : null; + if (isset($remove_cc) && !$may_edit) { + if (in_array($u, $remove_cc)) { + $remove_cc = array($u); + } + else { + $remove_cc = null; + } + } + $add_dependency = isset($add_dependency) && $may_edit ? $add_dependency : null; + $remove_dependency = isset($remove_dependency) && $may_edit ? $remove_dependency : null; + + if (isset($_POST)) { + foreach ($_POST as $k => $v) { + if (isset($buginfo[$k]) && stripslashes($buginfo[$k]) != stripslashes($$k)) { + $changedfields[$k] = $v; + } + } + } // Add CC if specified - if ($add_cc) { - if (!$cc_uid = $db->getOne("select user_id from ".TBL_AUTH_USER." where login = ".$db->quote(stripslashes($add_cc)))) { + if (isset($add_cc) and $add_cc) { + $cc_uid = $db->getOne("select user_id from ".TBL_AUTH_USER." where login = ".$db->quote(stripslashes($add_cc))); + if ($cc_uid != $u and !$may_edit) { + return (array('status' => translate("You may only add yourself to the CC list"))); + } + if (!$cc_uid) { return (array('status' => translate("That user does not exist"))); } $cc_already = $db->getOne('select user_id from '.TBL_BUG_CC." where bug_id = $bugid and user_id = $cc_uid"); @@ -747,7 +766,7 @@ } function show_bug($bugid = 0, $error = array()) { - global $db, $me, $t, $u, $QUERY, $restricted_projects; + global $db, $me, $t, $u, $QUERY, $restricted_projects, $auth; if (!ereg('^[0-9]+$',$bugid) or !$row = $db->getRow(sprintf($QUERY['bug-show-bug'], $bugid, @@ -834,7 +853,7 @@ show_history(check_id($_GET['bugid'])); break; case 'add': - $perm->check('Editbug'); + $perm->check('AddBug'); if (isset($_GET['project'])) { show_form(); } else { |