Bug#497512: gforge: The assigned to list is empty in tasks management

2008-09-03 Thread Roland Mas
Jean-Pierre Fortune, 2008-09-02 11:09:22 +0200 :

 When adding a new task or when doing a mass update, the user list
 below assigned to is empty.

This is due to PostgreSQL 8.3 being stricter when enforcing types, and
not casting strings to integers automagically.  I prepared a fix, will
upload as soon as I get permission from the release team.  In the
meantime, fix is attached.

=== modified file 'gforge/ChangeLog'
--- gforge/ChangeLog	2008-07-20 16:41:30 +
+++ gforge/ChangeLog	2008-09-03 18:52:31 +
@@ -1,3 +1,15 @@
+2008-09-03  Roland Mas  [EMAIL PROTECTED]
+
+
+	* common/tracker/ArtifactType.class.php: Fixed PostgreSQL 8.3
+	compatibility by explicitly converting role_setting.value to an
+	integer.
+	* common/tracker/ArtifactTypeFactory.class.php: Ditto.
+	* common/pm/ProjectGroup.class.php: Ditto.
+	* common/pm/ProjectGroupFactory.class.php: Ditto.
+	* common/forum/Forum.class.php: Ditto.
+	* common/forum/ForumFactory.class.php: Ditto.
+
 2008-07-20  Roland Mas  [EMAIL PROTECTED]
 
 	* common/reporting/report_utils.php: Search user by the initial

=== modified file 'gforge/common/forum/Forum.class.php'
--- gforge/common/forum/Forum.class.php	2008-05-27 20:56:57 +
+++ gforge/common/forum/Forum.class.php	2008-09-03 18:47:54 +
@@ -421,7 +421,7 @@
 FROM user_group, role_setting
 WHERE role_setting.section_name='forum'
   AND role_setting.ref_id='.$this-getID().'
-  AND role_setting.value  1
+  AND role_setting.value::integer  1
   AND user_group.role_id = role_setting.role_id;
 		$result = db_query($sql);
 		return util_result_column_to_array($result);

=== modified file 'gforge/common/forum/ForumFactory.class.php'
--- gforge/common/forum/ForumFactory.class.php	2008-05-27 20:56:57 +
+++ gforge/common/forum/ForumFactory.class.php	2008-09-03 18:48:12 +
@@ -106,7 +106,7 @@
 } else {
 	$exists= AND group_forum_id IN (SELECT role_setting.ref_id
 	FROM role_setting, user_group
-	WHERE role_setting.value = 0
+	WHERE role_setting.value::integer = 0
   AND role_setting.section_name = 'forum'
   AND role_setting.ref_id=forum_group_list_vw.group_forum_id
   

=== modified file 'gforge/common/pm/ProjectGroup.class.php'
--- gforge/common/pm/ProjectGroup.class.php	2008-05-27 20:56:57 +
+++ gforge/common/pm/ProjectGroup.class.php	2008-09-03 18:43:59 +
@@ -323,7 +323,7 @@
 WHERE users.user_id=user_group.user_id
 AND role_setting.role_id=user_group.role_id
 AND role_setting.ref_id='. $this-getID() .' 
-AND role_setting.value IN (1,2) 
+AND role_setting.value::integer IN (1,2) 
 AND role_setting.section_name='pm'
 ORDER BY users.realname;
 			$this-technicians=db_query($sql);

=== modified file 'gforge/common/pm/ProjectGroupFactory.class.php'
--- gforge/common/pm/ProjectGroupFactory.class.php	2008-05-27 20:56:57 +
+++ gforge/common/pm/ProjectGroupFactory.class.php	2008-09-03 18:46:33 +
@@ -102,7 +102,7 @@
 } else {
 	$exists= AND group_project_id IN (SELECT role_setting.ref_id
 	FROM role_setting, user_group
-	WHERE role_setting.value = 0
+	WHERE role_setting.value::integer = 0
   AND role_setting.section_name = 'pm'
   AND role_setting.ref_id=project_group_list_vw.group_project_id
   

=== modified file 'gforge/common/tracker/ArtifactType.class.php'
--- gforge/common/tracker/ArtifactType.class.php	2008-05-27 20:56:57 +
+++ gforge/common/tracker/ArtifactType.class.php	2008-09-03 18:47:06 +
@@ -1015,7 +1015,7 @@
 			return 0;
 		} else {
 			if (!isset($this-current_user_perm)) {
-$sql=SELECT role_setting.value
+$sql=SELECT role_setting.value::integer
 FROM role_setting, user_group
 WHERE role_setting.ref_id='. $this-getID() .'
 AND user_group.role_id = role_setting.role_id

=== modified file 'gforge/common/tracker/ArtifactTypeFactory.class.php'
--- gforge/common/tracker/ArtifactTypeFactory.class.php	2008-05-31 14:03:38 +
+++ gforge/common/tracker/ArtifactTypeFactory.class.php	2008-09-03 18:43:18 +
@@ -101,7 +101,7 @@
 } else {
 	$exists= AND group_artifact_id IN (SELECT role_setting.ref_id
 	FROM role_setting, user_group
-	WHERE role_setting.value = 0
+	WHERE role_setting.value::integer = 0
   AND role_setting.section_name = 'tracker'
   AND role_setting.ref_id=artifact_group_list_vw.group_artifact_id
   

=== modified file 'gforge/debian/changelog'
--- gforge/debian/changelog	

Bug#497512: gforge: The assigned to list is empty in tasks management

2008-09-03 Thread Roland Mas
Roland Mas, 2008-09-03 21:01:56 +0200 :

 In the meantime, fix is attached.

Updated fix, for a few instances I had missed earlier.

=== modified file 'gforge/ChangeLog'
--- gforge/ChangeLog	2008-07-20 16:41:30 +
+++ gforge/ChangeLog	2008-09-03 19:29:51 +
@@ -1,3 +1,19 @@
+2008-09-03  Roland Mas  [EMAIL PROTECTED]
+
+
+	* common/tracker/ArtifactType.class.php: Fixed PostgreSQL 8.3
+	compatibility by explicitly converting role_setting.value to an
+	integer.
+	* common/tracker/ArtifactTypeFactory.class.php: Ditto.
+	* common/pm/ProjectGroup.class.php: Ditto.
+	* common/pm/ProjectGroupFactory.class.php: Ditto.
+	* common/forum/Forum.class.php: Ditto.
+	* common/forum/ForumFactory.class.php: Ditto.
+	* plugins/webcalendar/www/index2.php: Ditto.
+	* www/pm/msproject/msp.php: Ditto.
+	* www/tracker/admin/form-extrafieldcopy.php: Ditto.
+	* www/tracker/mod.php: Ditto.
+
 2008-07-20  Roland Mas  [EMAIL PROTECTED]
 
 	* common/reporting/report_utils.php: Search user by the initial

=== modified file 'gforge/common/forum/Forum.class.php'
--- gforge/common/forum/Forum.class.php	2008-05-27 20:56:57 +
+++ gforge/common/forum/Forum.class.php	2008-09-03 19:22:52 +
@@ -421,7 +421,7 @@
 FROM user_group, role_setting
 WHERE role_setting.section_name='forum'
   AND role_setting.ref_id='.$this-getID().'
-  AND role_setting.value  1
+  AND role_setting.value::integer  1
   AND user_group.role_id = role_setting.role_id;
 		$result = db_query($sql);
 		return util_result_column_to_array($result);
@@ -771,7 +771,7 @@
 			return -1;
 		} else {
 			if (!isset($this-current_user_perm)) {
-$sql=SELECT role_setting.value
+$sql=SELECT role_setting.value::integer
 FROM role_setting, user_group
 WHERE role_setting.ref_id='. $this-getID() .'
 AND user_group.role_id = role_setting.role_id

=== modified file 'gforge/common/forum/ForumFactory.class.php'
--- gforge/common/forum/ForumFactory.class.php	2008-05-27 20:56:57 +
+++ gforge/common/forum/ForumFactory.class.php	2008-09-03 18:48:12 +
@@ -106,7 +106,7 @@
 } else {
 	$exists= AND group_forum_id IN (SELECT role_setting.ref_id
 	FROM role_setting, user_group
-	WHERE role_setting.value = 0
+	WHERE role_setting.value::integer = 0
   AND role_setting.section_name = 'forum'
   AND role_setting.ref_id=forum_group_list_vw.group_forum_id
   

=== modified file 'gforge/common/pm/ProjectGroup.class.php'
--- gforge/common/pm/ProjectGroup.class.php	2008-05-27 20:56:57 +
+++ gforge/common/pm/ProjectGroup.class.php	2008-09-03 19:22:32 +
@@ -323,7 +323,7 @@
 WHERE users.user_id=user_group.user_id
 AND role_setting.role_id=user_group.role_id
 AND role_setting.ref_id='. $this-getID() .' 
-AND role_setting.value IN (1,2) 
+AND role_setting.value::integer IN (1,2) 
 AND role_setting.section_name='pm'
 ORDER BY users.realname;
 			$this-technicians=db_query($sql);
@@ -602,7 +602,7 @@
 			return -1;
 		} else {
 			if (!isset($this-current_user_perm)) {
-$sql=SELECT role_setting.value
+$sql=SELECT role_setting.value::integer
 FROM role_setting, user_group
 WHERE role_setting.ref_id='. $this-getID() .'
 AND user_group.role_id = role_setting.role_id

=== modified file 'gforge/common/pm/ProjectGroupFactory.class.php'
--- gforge/common/pm/ProjectGroupFactory.class.php	2008-05-27 20:56:57 +
+++ gforge/common/pm/ProjectGroupFactory.class.php	2008-09-03 18:46:33 +
@@ -102,7 +102,7 @@
 } else {
 	$exists= AND group_project_id IN (SELECT role_setting.ref_id
 	FROM role_setting, user_group
-	WHERE role_setting.value = 0
+	WHERE role_setting.value::integer = 0
   AND role_setting.section_name = 'pm'
   AND role_setting.ref_id=project_group_list_vw.group_project_id
   

=== modified file 'gforge/common/tracker/ArtifactType.class.php'
--- gforge/common/tracker/ArtifactType.class.php	2008-05-27 20:56:57 +
+++ gforge/common/tracker/ArtifactType.class.php	2008-09-03 18:47:06 +
@@ -1015,7 +1015,7 @@
 			return 0;
 		} else {
 			if (!isset($this-current_user_perm)) {
-$sql=SELECT role_setting.value
+$sql=SELECT role_setting.value::integer
 FROM role_setting, user_group
 WHERE role_setting.ref_id='. $this-getID() .'
 AND user_group.role_id = role_setting.role_id

=== modified file 'gforge/common/tracker/ArtifactTypeFactory.class.php'
--- gforge/common/tracker/ArtifactTypeFactory.class.php	2008-05-31 14:03:38 +
+++ gforge/common/tracker/ArtifactTypeFactory.class.php	2008-09-03 18:43:18 +

Bug#497512: gforge: The assigned to list is empty in tasks management

2008-09-02 Thread Jean-Pierre Fortune
Package: gforge
Version: 4.7rc2
Severity: important

When adding a new task or when doing a mass update, the user list below 
assigned to is empty.
Feel free to register at http://forge.ialto.org and to ask to join the 
Sandbox project.
Regards,
-- 
Jean-Pierre Fortune
Ialto

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]