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 +0000
+++ gforge/ChangeLog 2008-09-03 18:52:31 +0000
@@ -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 +0000
+++ gforge/common/forum/Forum.class.php 2008-09-03 18:47:54 +0000
@@ -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 +0000
+++ gforge/common/forum/ForumFactory.class.php 2008-09-03 18:48:12 +0000
@@ -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 +0000
+++ gforge/common/pm/ProjectGroup.class.php 2008-09-03 18:43:59 +0000
@@ -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 +0000
+++ gforge/common/pm/ProjectGroupFactory.class.php 2008-09-03 18:46:33 +0000
@@ -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 +0000
+++ gforge/common/tracker/ArtifactType.class.php 2008-09-03 18:47:06 +0000
@@ -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 +0000
+++ gforge/common/tracker/ArtifactTypeFactory.class.php 2008-09-03 18:43:18 +0000
@@ -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 2008-08-31 18:50:02 +0000
+++ gforge/debian/changelog 2008-09-03 18:55:06 +0000
@@ -1,3 +1,10 @@
+gforge (4.7~rc2-3) unstable; urgency=low
+
+ * Added explicit cast to fix PostgreSQL 8.3 compatibility (closes:
+ #497512).
+
+ -- Roland Mas <[EMAIL PROTECTED]> Wed, 03 Sep 2008 20:55:06 +0200
+
gforge (4.7~rc2-2) unstable; urgency=low
* Fixed chroot setup on amd64 (closes: #495728).
Roland.
--
Roland Mas
Luck, like a Russian car, generally only works if you push it.
-- Regalian, in My Hero (Tom Holt)