4 messages in com.mysql.lists.eventum-usersRe: Issue of getting emails when new ...| From | Sent On | Attachments |
|---|---|---|
| Brian E. Bothwell | 10 May 2007 16:08 | |
| Barry Benowitz | 11 May 2007 06:33 | |
| Brian E. Bothwell | 11 May 2007 08:55 | |
| Barry Benowitz | 11 May 2007 11:00 |
| Subject: | Re: Issue of getting emails when new issue is created/assigned![]() |
|---|---|
| From: | Brian E. Bothwell (bria...@wisdomtools.com) |
| Date: | 05/11/2007 08:55:39 AM |
| List: | com.mysql.lists.eventum-users |
There is a typo in the diff you posted:
$tpl->assign("assigned_projects", Project::getAssocList($assigned_prj_ids);
This is missing a ')' on the end.
I tried adapting this fix for 2.0.1, but got this error when trying to use the new preferences.php to update my prefs, which seems be caused by an array getting passed to Project::getAssocList() instead of a usr_id:
An error was found at 05/11/2007 10:48:28 (1178894908) on line '651' of script '/www/eventum-2.0.1/include/class.project.php'.
The error message passed to us was:
'DB Error: no such field'
A more detailed error message follows:
'SELECT prj_id, prj_title FROM eventum.eventum_project, eventum.eventum_project_user WHERE prj_id=pru_prj_id AND pru_usr_id=Array ORDER BY prj_title [nativecode=1054 ** Unknown column 'Array' in 'where clause']'
Barry Benowitz wrote:
The fix for this is on the wiki.
Barry
-----Original Message----- From: Brian E. Bothwell [mailto:bria...@wisdomtools.com] Sent: Thursday, May 10, 2007 7:09 PM To: even...@lists.mysql.com Subject: Re: Issue of getting emails when new issue is created/assigned
This is a follow up the post below. I am trying to figure out how make it so all existing users will automatically receive emails for any projects they are added to. I have this working fine with new users, but can't seem to get it working for existing users. I tried the SQL update below (on just one user) and it didn't seem to work. I am hoping to understand the serialized array a bit better so I can understand what kind of change is needed to alter a user to ensure that for each project they are added to, they have the "*Receive emails when new issues are assigned to you?*" option set to "yes" every time.
The change below did not seem to work with existing users and existing projects, nor with existing users and new projects.
Maybe I am missing something.
thanks,
-Brian
Hemant Madaan wrote:
Hi Bryan,
The problem is that we have created all our users already. Is there
any
script or any DB changes which we can do to the settings for the
existing
users in bulk. Look forward to your response.
Those settings are stored in a serialized array in the usr_preferences field of the eventum_user table. Here is a statement that will update all users to have "yes" for those to settings. It will also overwrite any other preferences they might have already set.
UPDATE eventum_user SET usr_preferences =
'a:9:{s:19:"close_popup_windows";s:1:"0";s:23:"receive_assigned_emails"; a:1:{i:1;s:1:"1";}s:18:"receive_new_emails";a:1:{i:1;s:1:"1";}s:8:"timez one";s:10:"Etc/GMT+12";s:17:"list_refresh_rate";s:1:"5";s:19:"emails_ref resh_rate";s:1:"5";s:15:"email_signature";s:0:"";s:15:"auto_append_sig"; N;s:20:"auto_append_note_sig";N;}';
Note: email clients may wrap the above statement, you need to make
sure
it is all on one line.
/bryan




