Cannot Delete Messages

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
rgaborko
Posts: 21
Joined: Thu Jan 25, 2007 10:23 am

Cannot Delete Messages

Post by rgaborko »

Ok we have been trying to figure out what is going on here but we have no clue as to why messages sent cannot be deleted.

There does not seem to be any error message when deleting the messages it just does not delete. We have deleted the files in the tmp directory and this still does not allow us to delete.


Here is the Debug Info

(postgres7): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = ? AND ip_address = ? AND updated_date >= ? [ (session_id=>'a50ea23b50267bd9d907c3136e8ecebf') (ip_address=>'206.186.13.254') (updated_date=>'1173958420') ]
________________________________________
________________________________________
(postgres7): update authentication set updated_date = ? where session_id = ? [ (updated_date=>'1173972820') (session_id=>'a50ea23b50267bd9d907c3136e8ecebf') ]
________________________________________
________________________________________
(postgres7): select * from station where company_id = ? AND station_id = ? AND deleted = 0 [ (company_id=>'1') (station_id=>'cbcd6bf2966499077b946d171d171672') ]
________________________________________
________________________________________
(postgres7): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1
________________________________________
________________________________________
(postgres7): select d.severity_id as severity_id, count(*) as count from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN exception_policy as d ON a.exception_policy_id = d.id LEFT JOIN pay_period as e ON b.pay_period_id = e.id where b.user_id = ? AND b.date_stamp < ? AND e.status_id = ? AND NOT EXISTS ( select z.id from request as z where z.user_date_id = a.user_date_id AND z.status_id = 30 ) AND ( a.deleted = 0 AND b.deleted = 0 AND e.deleted=0) GROUP BY d.severity_id ORDER BY d.severity_id desc [ (user_id=>'1') (date_stamp=>'2007-03-15 00:00:00 EDT') (status_id=>'10') ]
________________________________________
________________________________________
(postgres7): select * from permission where company_id = ? AND user_id in (-1, ? ) AND deleted = 0 ORDER BY company_id ASC, user_id ASC [ (company_id=>'1') (user_id=>'1') ]
________________________________________
________________________________________
(postgres7): select name FROM bread_crumb WHERE user_id = ? AND name = ? LIMIT 1 [ (user_id=>'1') (name=>'Message List') ]
________________________________________
________________________________________
(postgres7): UPDATE bread_crumb SET url = ?, created_date = ? WHERE user_id = ? AND name = ? [ (url=>'/timetrex/interface/message/UserMessageList.php?filter_folder_id...') (created_date=>'1173972820') (user_id=>'1') (name=>'Message List') ]
________________________________________
/tmp/timetrex//e3/adodb_e3a6d09d19b5693fc22f03974037170a.cache reloaded, ttl=85249 [ select * from message where id = -1 ]
________________________________________
(postgres7): SELECT COUNT(*) FROM message as a LEFT JOIN users as d ON a.object_type_id = 5 AND a.object_id = d.id AND d.deleted=0 LEFT JOIN request as b ON a.object_type_id = 50 AND a.object_id = b.id AND b.deleted=0 LEFT JOIN user_date as c ON b.user_date_id = c.id AND c.deleted=0 WHERE a.object_type_id in (5,50) AND ( ( ( c.user_id = ? OR d.id = ? OR a.parent_id in ( select parent_id FROM message WHERE created_by = ? AND parent_id != 0 ) OR a.parent_id in ( select id FROM message WHERE created_by = ? AND parent_id = 0 ) ) AND a.created_by != ? ) ) AND a.deleted = 0 [ (user_id=>'1') (id=>'1') (created_by1=>'1') (created_by2=>'1') (created_by3=>'1') ]
________________________________________
________________________________________
(postgres7): SELECT a.*, CASE WHEN a.object_type_id = 5 THEN d.id WHEN a.object_type_id = 50 THEN c.user_id END as sent_to_user_id FROM message as a LEFT JOIN users as d ON a.object_type_id = 5 AND a.object_id = d.id AND d.deleted=0 LEFT JOIN request as b ON a.object_type_id = 50 AND a.object_id = b.id AND b.deleted=0 LEFT JOIN user_date as c ON b.user_date_id = c.id AND c.deleted=0 WHERE a.object_type_id in (5,50) AND ( ( ( c.user_id = ? OR d.id = ? OR a.parent_id in ( select parent_id FROM message WHERE created_by = ? AND parent_id != 0 ) OR a.parent_id in ( select id FROM message WHERE created_by = ? AND parent_id = 0 ) ) AND a.created_by != ? ) ) AND a.deleted = 0 order by a.status_id = 10 desc,a.created_date desc LIMIT 25 OFFSET 0 [ (user_id=>'1') (id=>'1') (created_by1=>'1') (created_by2=>'1') (created_by3=>'1') ]

________________________________________
(postgres7): SELECT name,url FROM bread_crumb WHERE user_id = ? ORDER BY created_date DESC LIMIT 5 [ (user_id=>'1') ]
________________________________________
Debug Buffer
============================================================================
Memory Usage: 5921984
----------------------------------------------------------------------------
DEBUG [153]: [Function](): URI: /timetrex/interface/message/UserMessageList.php?filter_folder_id=10&ids%5B%5D=81&action=Delete&sort_column=&sort_order=&page=1
DEBUG [155]: [Function](): Production: 1
DEBUG [486]: Authentication::Check(): Session Name: SessionID
DEBUG [492]: Authentication::Check(): Session ID: a50ea23b50267bd9d907c3136e8ecebf
DEBUG [301]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:a50ea23b50267bd9d907c3136e8ecebf
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [301]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:a50ea23b50267bd9d907c3136e8ecebf
DEBUG [62]: [Function](): User Authenticated: admin Created Date: 1173972392
DEBUG [1817]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [92]: TTDate::setTimeZone(): Setting TimeZone: Canada/Eastern
DEBUG [108]: TTDate::setDateFormat(): Setting Default Date Format: d-M-y
DEBUG [122]: TTDate::setTimeFormat(): Setting Default Time Format: g:i A
DEBUG [136]: TTDate::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [1817]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [954]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [104]: [Function](): Station ID Cookie found! cbcd6bf2966499077b946d171d171672
DEBUG [199]: [Function](): UnRead Messages: 0
DEBUG [48]: BreadCrumb::setCrumb(): Dropping Bread Crumb: Message List URL: /timetrex/interface/message/UserMessageList.php?filter_folder_id=10&ids%5B%5D=81&action=Delete&sort_column=&sort_order=&page=1
DEBUG [73]: [Function](): Filter Folder ID: 10
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.created_by&sort_order=desc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.created_by&sort_order=desc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.created_by&sort_order=asc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.created_by&sort_order=asc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.subject&sort_order=desc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.subject&sort_order=desc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.subject&sort_order=asc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.subject&sort_order=asc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.object_type_id&sort_order=desc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.object_type_id&sort_order=desc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.object_type_id&sort_order=asc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.object_type_id&sort_order=asc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.created_date&sort_order=desc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.created_date&sort_order=desc
DEBUG [93]: URLBuilder::getURL(): URL Values: filter_folder_id=10&sort_column=a.created_date&sort_order=asc
DEBUG [109]: URLBuilder::getURL(): URL: ?filter_folder_id=10&sort_column=a.created_date&sort_order=asc
DEBUG [93]: URLBuilder::getURL(): URL Values: object_type_id=5&object_id=1&id=81
DEBUG [109]: URLBuilder::getURL(): URL: ../message/ViewMessage.php?object_type_id=5&object_id=1&id=81
============================================================================
============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 94.7139 ms (21.62 %) Authentication::Check()
1 25.6381 ms (5.85 %) Interface.inc - Check for Exceptions
1 14.8470 ms (3.39 %) Interface.inc - Check for UNREAD messages...
1 3.1149 ms (0.71 %) getEmptyRecordSet()
1 182.8258 ms (41.74 %) unprofiled

116.9221 ms (26.69 %) Missed
============================================================================
438.0620 ms (100.00 %) OVERALL TIME
============================================================================
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Are you trying to delete messages that you have created, or that someone has sent to you? You can only delete messages that you created.
rgaborko
Posts: 21
Joined: Thu Jan 25, 2007 10:23 am

Post by rgaborko »

We are trying to delete a message that was sent. Once We have dealt with a message it didn't need to stay in our inbox so we tried to delete it. Is there a way to remove the message from the inbox so it is only new messages, or old ones that still need to be dealt with.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Because timetrex doesn't handle messages like email, where the message is duplicated for each person it is sent to, only the original author of the FIRST message can delete it. So if John Doe employee sends a message to his supervisor and the supervisor responds, only John Doe can delete it if he has permissions.

The reason for this is it allows hierarchies within TimeTrex to change without losing messages. If the messages were just sent to the supervisor at the time, if that supervisor happens to be on vacation, you can just switch out a different supervisor and he can pick up where the other left off. The employees don't have to re-send all their requests.

We recommend against deleting any messages if possible, but that is obviously up to you.
Locked