From: <ke...@us...> - 2006-09-01 15:52:44
|
Revision: 3572 http://svn.sourceforge.net/mailmanager/?rev=3572&view=rev Author: kevca Date: 2006-09-01 08:52:28 -0700 (Fri, 01 Sep 2006) Log Message: ----------- Merged revisions 3306,3330,3342,3345-3349,3351,3353-3357,3367,3374,3376,3381-3382,3384-3385,3441,3462-3570 via svnmerge from https://svn.sourceforge.net/svnroot/mailmanager/MailManager/branches/RELENG_2_1 ........ r3466 | aveitch | 2006-08-16 13:31:54 +0000 (Wed, 16 Aug 2006) | 3 lines No actual code change - just sorting out the identing of the tabs/subtabs code so it is consistent and easier to read. ........ r3468 | aveitch | 2006-08-16 14:52:45 +0000 (Wed, 16 Aug 2006) | 2 lines Fix for Queues sub tab should be a main tab (#1537597) ........ r3469 | aveitch | 2006-08-16 14:59:27 +0000 (Wed, 16 Aug 2006) | 2 lines This file was accidentally omitted from the commit for bug #1537597 ........ r3470 | aveitch | 2006-08-16 17:40:32 +0000 (Wed, 16 Aug 2006) | 7 lines Fixes: - No longer a Zope error if an attempt is made to add a queue without groups setup. (#1541445) - When a queue is successfully added a page is now returned, rather than just freezing the browser. - Error messages are clearer and are displayed on the correct pages. ........ r3471 | aveitch | 2006-08-16 17:43:42 +0000 (Wed, 16 Aug 2006) | 2 lines Fix for 1541445 ........ r3472 | aveitch | 2006-08-16 20:20:32 +0000 (Wed, 16 Aug 2006) | 4 lines Change the order of the access list from Tickets, Reports, Settings, Queues to Tickets, Queues, Reports, Settings which matches the order the tabs are displayed. Hopefully this will make this section a bit more intuitive. ........ r3473 | kevca | 2006-08-17 10:02:58 +0000 (Thu, 17 Aug 2006) | 2 lines Now ensures tickets are correclty allocated under load ........ r3474 | kevca | 2006-08-17 10:19:29 +0000 (Thu, 17 Aug 2006) | 3 lines Changes for Zope 2.7.5 transactions ........ r3475 | kevca | 2006-08-17 11:47:26 +0000 (Thu, 17 Aug 2006) | 4 lines Added back in the oldest ticket information, which was removed to deal with getQueuedTicket performance poor (#1511256) This is not configurable via the UI, but may be altered in the database. ........ r3476 | kevca | 2006-08-17 12:00:56 +0000 (Thu, 17 Aug 2006) | 2 lines Accidently removed add tab position ........ r3477 | kevca | 2006-08-17 13:16:55 +0000 (Thu, 17 Aug 2006) | 3 lines Fix for Unicode Decode error adding attachment (#1541902) ........ r3478 | kevca | 2006-08-17 13:45:48 +0000 (Thu, 17 Aug 2006) | 3 lines Fix for Cacheing should be switched on for graphics and style sheets (#1536752) ........ r3479 | kevca | 2006-08-17 17:51:34 +0000 (Thu, 17 Aug 2006) | 5 lines More changes relating to getQueuedTicket performance poor (#1511256) This fixes a number of concurrency problems, and adds in a test case for these issues. ........ r3480 | kevca | 2006-08-17 17:58:25 +0000 (Thu, 17 Aug 2006) | 3 lines Last commit left in a reference to a debugging sql method, which should be removed. ........ r3481 | aveitch | 2006-08-17 20:14:07 +0000 (Thu, 17 Aug 2006) | 2 lines Apply cache fix (#1536752) to print style sheet. ........ r3482 | kevca | 2006-08-18 09:45:04 +0000 (Fri, 18 Aug 2006) | 3 lines Fix for Unicode Decode error adding attachment (#1541902) ........ r3483 | kevca | 2006-08-18 11:23:27 +0000 (Fri, 18 Aug 2006) | 3 lines Fixes for Managers don't get a count of overdue tickets in queues (#1538545) ........ r3484 | kevca | 2006-08-18 11:44:13 +0000 (Fri, 18 Aug 2006) | 2 lines Make database setup more robust to prevent testsuite failures ........ r3485 | kevca | 2006-08-18 12:27:32 +0000 (Fri, 18 Aug 2006) | 2 lines Last change put a typo in a logging method, which was raising an error at runtime. ........ r3486 | kevca | 2006-08-18 14:03:39 +0000 (Fri, 18 Aug 2006) | 2 lines Cleanup to enable notify home feature ........ r3487 | kevca | 2006-08-18 14:15:14 +0000 (Fri, 18 Aug 2006) | 2 lines notifyHome must not be called in the test suite! ........ r3488 | kevca | 2006-08-18 14:38:24 +0000 (Fri, 18 Aug 2006) | 3 lines notify_home must not be called in the test suite Some bugs relating to sql false usage ........ r3489 | kevca | 2006-08-19 17:46:06 +0000 (Sat, 19 Aug 2006) | 4 lines Some changes to address - Installation Failures (#1543170) ........ r3490 | kevca | 2006-08-19 17:57:16 +0000 (Sat, 19 Aug 2006) | 5 lines Fixes for - No way to identify tickets closed by date (#1543173) Adds in a new cache table for reports, and adds in the additional report information to the API. The UI for this has not yet been added. ........ r3491 | kevca | 2006-08-19 18:22:28 +0000 (Sat, 19 Aug 2006) | 2 lines Adding some comments ........ r3492 | aveitch | 2006-08-20 21:54:47 +0000 (Sun, 20 Aug 2006) | 2 lines Added a user interface for tickets closed by user report (#1543173) ........ r3493 | kevca | 2006-08-21 10:10:23 +0000 (Mon, 21 Aug 2006) | 2 lines Noting to restart zope ........ r3494 | kevca | 2006-08-21 10:41:45 +0000 (Mon, 21 Aug 2006) | 2 lines Make the database setup a bit more robust with the test suite ........ r3495 | kevca | 2006-08-21 10:42:09 +0000 (Mon, 21 Aug 2006) | 2 lines Correction for recent change to report graphing ........ r3496 | kevca | 2006-08-21 10:56:51 +0000 (Mon, 21 Aug 2006) | 3 lines Fix for Installation fails on MySQL with InnoDB default (#1494920) ........ r3497 | kevca | 2006-08-21 11:22:11 +0000 (Mon, 21 Aug 2006) | 1 line Fix for Deleting unicode category choices fails (#1543868) ........ r3498 | kevca | 2006-08-21 11:32:55 +0000 (Mon, 21 Aug 2006) | 2 lines MySQL fix for concurrency issues ........ r3499 | kevca | 2006-08-21 11:39:40 +0000 (Mon, 21 Aug 2006) | 2 lines Fix log output for win32 (not fully tested) ........ r3500 | kevca | 2006-08-21 12:50:21 +0000 (Mon, 21 Aug 2006) | 2 lines Test cleanup for zope 2.7 ........ r3501 | kevca | 2006-08-21 12:51:30 +0000 (Mon, 21 Aug 2006) | 2 lines Fixing logging for thread errors ........ r3502 | kevca | 2006-08-21 12:51:59 +0000 (Mon, 21 Aug 2006) | 2 lines More MySQL fixes ........ r3503 | kevca | 2006-08-21 13:51:26 +0000 (Mon, 21 Aug 2006) | 2 lines More changes to what is tested on MySQL ........ r3504 | kevca | 2006-08-21 14:36:08 +0000 (Mon, 21 Aug 2006) | 3 lines Qualify the nature of the failure (rather than just 'installation failure') ........ r3505 | kevca | 2006-08-21 15:47:13 +0000 (Mon, 21 Aug 2006) | 5 lines Refactoring SQL methods We can now use dtml-include to reference other files. This makes updating common pieces of SQL much simpler. Note that this may make debug-mode loading of SQL files from disk inconsistent. ........ r3506 | kevca | 2006-08-21 15:56:12 +0000 (Mon, 21 Aug 2006) | 2 lines Now has a nocache option ........ r3507 | aveitch | 2006-08-21 15:56:31 +0000 (Mon, 21 Aug 2006) | 3 lines Cody tidy up - use the int DateTime methods rather than doing int() on the string methods. ........ r3508 | kevca | 2006-08-21 15:57:42 +0000 (Mon, 21 Aug 2006) | 2 lines Disabling concurrency tests on pg 8.0 until they can be resolved ........ r3509 | kevca | 2006-08-21 15:58:16 +0000 (Mon, 21 Aug 2006) | 2 lines Some tidying of formatting ........ r3510 | aveitch | 2006-08-21 15:58:29 +0000 (Mon, 21 Aug 2006) | 3 lines Make the reporting interface a bit more powerful and consistent. Allow report down to days/hours. ........ r3511 | aveitch | 2006-08-21 16:05:19 +0000 (Mon, 21 Aug 2006) | 2 lines Fixed 2 typos. ........ r3512 | kevca | 2006-08-21 16:14:59 +0000 (Mon, 21 Aug 2006) | 2 lines Fixes to the recent changes to reports ........ r3513 | kevca | 2006-08-21 16:18:52 +0000 (Mon, 21 Aug 2006) | 2 lines Fixing the notify home url ........ r3514 | aveitch | 2006-08-21 20:54:44 +0000 (Mon, 21 Aug 2006) | 2 lines Improve format of category form. ........ r3515 | kevca | 2006-08-21 21:17:58 +0000 (Mon, 21 Aug 2006) | 2 lines Factoring out report cache closed into an include file ........ r3516 | kevca | 2006-08-21 22:03:06 +0000 (Mon, 21 Aug 2006) | 3 lines Leaving some debugging hints in sql/__init__.py ReportCacheClosed now appears to work ok ........ r3517 | aveitch | 2006-08-21 22:14:44 +0000 (Mon, 21 Aug 2006) | 2 lines Moving the Home, Top & Help buttons to the left. ........ r3518 | aveitch | 2006-08-22 08:44:38 +0000 (Tue, 22 Aug 2006) | 2 lines Fix for Quick find on help is broken (#1544275) ........ r3519 | kevca | 2006-08-22 09:12:22 +0000 (Tue, 22 Aug 2006) | 2 lines Should not use cache for generating hourly reports ........ r3520 | aveitch | 2006-08-22 09:21:32 +0000 (Tue, 22 Aug 2006) | 2 lines Graph period is now set correctly & graph is correctled labelled. ........ r3521 | kevca | 2006-08-22 09:30:24 +0000 (Tue, 22 Aug 2006) | 3 lines Add in a nullastext macro, which allows postgres to remain strongly typed when dealing with pure null values in subselects ........ r3522 | kevca | 2006-08-22 09:32:14 +0000 (Tue, 22 Aug 2006) | 2 lines Deal with strong typing in postgres ........ r3523 | kevca | 2006-08-22 09:32:38 +0000 (Tue, 22 Aug 2006) | 2 lines Don't use cache for the daily graphs ........ r3524 | aveitch | 2006-08-22 09:43:11 +0000 (Tue, 22 Aug 2006) | 4 lines Now defaults to the current day. Issue was that DateTime().dd() returns the day as a string but we want DateTime().day() which returns the day as an int. ........ r3525 | kevca | 2006-08-22 09:57:20 +0000 (Tue, 22 Aug 2006) | 2 lines Fix use of caches ........ r3526 | kevca | 2006-08-22 09:57:50 +0000 (Tue, 22 Aug 2006) | 2 lines Broken reports for accounts ........ r3527 | kevca | 2006-08-22 11:24:25 +0000 (Tue, 22 Aug 2006) | 2 lines More fixes to cache problems and some typos on view names ........ r3528 | kevca | 2006-08-22 11:25:14 +0000 (Tue, 22 Aug 2006) | 4 lines Make the queues page look more like the tickets list Fix the problem with the queues page altering the state which is displayed in the tickets list. ........ r3529 | kevca | 2006-08-22 12:41:14 +0000 (Tue, 22 Aug 2006) | 3 lines Disable concurrency tests as ZoDB conflicts are causing this to fail on all platforms ........ r3530 | kevca | 2006-08-22 12:42:17 +0000 (Tue, 22 Aug 2006) | 2 lines Updating version for release ........ r3534 | kevca | 2006-08-23 11:55:41 +0000 (Wed, 23 Aug 2006) | 2 lines Fix for Migration page fails to display (#1545224) ........ r3535 | kevca | 2006-08-23 12:41:21 +0000 (Wed, 23 Aug 2006) | 1 line Fixes No Close button on Overdue tickets (#1545248) ........ r3536 | kevca | 2006-08-23 12:49:46 +0000 (Wed, 23 Aug 2006) | 2 lines Typo on last commit, missed , ........ r3537 | kevca | 2006-08-23 17:55:09 +0000 (Wed, 23 Aug 2006) | 3 lines Add on similar restrictions for other queue searches in order to improve performance. ........ r3541 | kevca | 2006-08-24 16:15:21 +0000 (Thu, 24 Aug 2006) | 3 lines Fix for Default ticket view appears to be 'show all users' (#1544703) ........ r3543 | kevca | 2006-08-25 09:16:12 +0000 (Fri, 25 Aug 2006) | 1 line fixing merge tracking ........ r3546 | kevca | 2006-08-25 09:34:59 +0000 (Fri, 25 Aug 2006) | 3 lines Cleaning up comments and cleaning up code relating to issue [ 1543178 ] Queue performance report is broken ........ r3547 | kevca | 2006-08-25 11:27:02 +0000 (Fri, 25 Aug 2006) | 2 lines Snapshot cache should default to false ........ r3550 | kevca | 2006-08-25 15:01:10 +0000 (Fri, 25 Aug 2006) | 2 lines Deal with the changed default for snapshot_cache ........ r3551 | kevca | 2006-08-25 15:02:15 +0000 (Fri, 25 Aug 2006) | 2 lines Deal with changes to snapshot cache ........ r3552 | kevca | 2006-08-25 15:40:55 +0000 (Fri, 25 Aug 2006) | 1 line Fix for Some account settings fail to update on MySQL (#1545328) ........ r3553 | kevca | 2006-08-25 15:44:19 +0000 (Fri, 25 Aug 2006) | 1 line Fix for migration fails from 2.0.10 (#154527) ........ r3555 | kevca | 2006-08-28 09:15:42 +0000 (Mon, 28 Aug 2006) | 2 lines Some cleanup to remove warning messages when imported ........ r3560 | kevca | 2006-08-28 10:32:42 +0000 (Mon, 28 Aug 2006) | 4 lines Updating scheduler code Now details use of process_task Now recommends use of ClockServer when cron is not available ........ r3561 | kevca | 2006-08-28 10:35:23 +0000 (Mon, 28 Aug 2006) | 3 lines Fixing unicode issues for Default ticket view appears to be 'show all users' (#1544703) ........ r3562 | kevca | 2006-08-28 10:53:49 +0000 (Mon, 28 Aug 2006) | 2 lines Typo on last commit ........ r3567 | kevca | 2006-08-29 13:56:31 +0000 (Tue, 29 Aug 2006) | 6 lines Fix for Queue Reports broken (#1548505) Quite a lot of cleanup on SQL methods where legacy/testing code had been left around in commented blocks. Same applies to the test case. ........ Modified Paths: -------------- MailManager/branches/RELENG_2_2/sql/v2_2/addSubTab.zsql MailManager/branches/RELENG_2_2/sql/v2_2/addTab.zsql MailManager/branches/RELENG_2_2/sql/v2_2/createTables.zsql MailManager/branches/RELENG_2_2/sql/v2_2/deleteReportCache.zsql MailManager/branches/RELENG_2_2/sql/v2_2/editAccount.zsql MailManager/branches/RELENG_2_2/sql/v2_2/generateReportCacheReceived.zsql MailManager/branches/RELENG_2_2/sql/v2_2/getReportCacheReceived.zsql MailManager/branches/RELENG_2_2/sql/v2_2/getTicketWindow.zsql MailManager/branches/RELENG_2_2/sql/v2_2/listHistory.zsql MailManager/branches/RELENG_2_2/sql/v2_2/listQueuedTickets.zsql MailManager/branches/RELENG_2_2/sql/v2_2/listSubTabs.zsql MailManager/branches/RELENG_2_2/sql/v2_2/listTabs.zsql MailManager/branches/RELENG_2_2/sql/v2_2/modifyTicketRulesets.zsql Modified: MailManager/branches/RELENG_2_2/sql/v2_2/addSubTab.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/addSubTab.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/addSubTab.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -2,13 +2,17 @@ title:Add a new sub tab connection_id: mailmanager_db max_rows:0 -arguments:sqv_id sqv_title sqv_tab_id sqv_tooltip sqv_url sqv_accesskey sqv_roles +arguments:sqv_id sqv_title sqv_tab_id sqv_tooltip sqv_url sqv_accesskey sqv_roles sqv_position + +The dtml-if sqv_position statements are required for migration purposes. + </dtml-comment> -INSERT INTO <dtml-var schema>mm_nav_subtabs (id, title, tab_id, tooltip, url, accesskey, roles) +INSERT INTO <dtml-var schema>mm_nav_subtabs (id, title, tab_id, tooltip, url, accesskey, roles<dtml-if sqv_position>, position</dtml-if>) VALUES (<dtml-sqlvar sqv_id type="nb">, <dtml-sqlvar sqv_title type="nb">, <dtml-sqlvar sqv_tab_id type="nb">, <dtml-sqlvar sqv_tooltip type="nb" optional>, <dtml-sqlvar sqv_url type="nb">, <dtml-sqlvar sqv_accesskey type="nb" optional>, - <dtml-sqlvar sqv_roles type="nb" optional>) + <dtml-sqlvar sqv_roles type="nb" optional> + <dtml-if sqv_position>,<dtml-sqlvar sqv_position type="int" optional></dtml-if>) Modified: MailManager/branches/RELENG_2_2/sql/v2_2/addTab.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/addTab.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/addTab.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -2,12 +2,16 @@ title:Add a new main tab connection_id: mailmanager_db max_rows:0 -arguments:sqv_id sqv_title sqv_tooltip sqv_url sqv_accesskey sqv_roles +arguments:sqv_id sqv_title sqv_tooltip sqv_url sqv_accesskey sqv_roles sqv_position + +The dtml-if sqv_position statements are required for migration purposes. + </dtml-comment> -INSERT INTO <dtml-var schema>mm_nav_tabs (id, title, tooltip, url, accesskey, roles) +INSERT INTO <dtml-var schema>mm_nav_tabs (id, title, tooltip, url, accesskey, roles<dtml-if sqv_position>, position</dtml-if>) VALUES (<dtml-sqlvar sqv_id type="nb">, <dtml-sqlvar sqv_title type="nb">, <dtml-sqlvar sqv_tooltip type="nb" optional>, <dtml-sqlvar sqv_url type="nb">, <dtml-sqlvar sqv_accesskey type="nb" optional>, - <dtml-sqlvar sqv_roles type="nb" optional>) + <dtml-sqlvar sqv_roles type="nb" optional> + <dtml-if sqv_position>,<dtml-sqlvar sqv_position type="int"></dtml-if>) Modified: MailManager/branches/RELENG_2_2/sql/v2_2/createTables.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/createTables.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/createTables.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -871,7 +871,7 @@ body TEXT, html_body TEXT, FULLTEXT (body, html_body) - ) <dtml-var sql_charset> <dtml-var sql_delimiter> + ) ENGINE=MyISAM <dtml-var sql_charset> <dtml-var sql_delimiter> CREATE TABLE mm_ticket_index ( id INT, @@ -879,7 +879,7 @@ body TEXT, html_body TEXT, FULLTEXT (body, html_body) - ) <dtml-var sql_charset> <dtml-var sql_delimiter> + ) ENGINE=MyISAM <dtml-var sql_charset> <dtml-var sql_delimiter> </dtml-if> Modified: MailManager/branches/RELENG_2_2/sql/v2_2/deleteReportCache.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/deleteReportCache.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/deleteReportCache.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -31,3 +31,8 @@ </dtml-if> <dtml-var sql_delimiter> +DELETE FROM <dtml-var schema>mm_report_cache_closed +<dtml-if sqv_date> + WHERE cache_date = <dtml-sqlvar sqv_date type="nb"> +</dtml-if> +<dtml-var sql_delimiter> Modified: MailManager/branches/RELENG_2_2/sql/v2_2/editAccount.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/editAccount.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/editAccount.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -2,7 +2,7 @@ title:Edit an account connection_id: mailmanager_db max_rows:0 -arguments:sqv_email sqv_assign_user sqv_assign_group sqv_assign_queue sqv_notify_user sqv_notify_group sqv_routing sqv_mail_server sqv_mail_username sqv_mail_password sqv_server_type sqv_default_priority sqv_default_category0 sqv_default_category1 sqv_default_category2 sqv_response_target sqv_auto_reply sqv_reply_text sqv_html_reply sqv_signature sqv_signature_text sqv_html_signature sqv_tid_subject sqv_set_default_template sqv_default_template sqv_top_post +arguments:sqv_email sqv_assign_user sqv_assign_group sqv_assign_queue sqv_notify_user sqv_notify_group sqv_routing sqv_mail_server sqv_mail_username sqv_mail_password sqv_server_type sqv_default_priority sqv_default_category0 sqv_default_category1 sqv_default_category2 sqv_response_target sqv_auto_reply sqv_reply_text sqv_html_reply sqv_signature sqv_signature_text sqv_html_signature sqv_tid_subject sqv_default_template_update sqv_default_template sqv_top_post sqv_auto_reply_update sqv_html_reply_update sqv_signature_update sqv_html_signature_update sqv_top_post_update sqv_notify_user_update sqv_notify_group_update General method used to edit an account's details @@ -25,8 +25,6 @@ <dtml-elif sqv_assign_queue> , assign_queue=<dtml-sqlvar sqv_assign_queue type="nb" optional>, assign_user=NULL, assign_group=NULL </dtml-if> - , notify_user=<dtml-sqlvar sqv_notify_user type="nb"> - , notify_group=<dtml-sqlvar sqv_notify_group type="nb"> <dtml-if sqv_routing>, routing=<dtml-sqlvar sqv_routing type="nb" optional> </dtml-if> <dtml-if sqv_mail_server>, mail_server=<dtml-sqlvar sqv_mail_server type="string" optional> </dtml-if> <dtml-if sqv_mail_username>, mail_username=<dtml-sqlvar sqv_mail_username type="string" optional> </dtml-if> @@ -42,12 +40,14 @@ <dtml-else> , response_target=NULL </dtml-if> - <dtml-if sqv_auto_reply>, auto_reply=<dtml-sqlvar sqv_auto_reply type="string" optional> </dtml-if> <dtml-if sqv_reply_text>, reply_text=<dtml-sqlvar sqv_reply_text type="string" optional> </dtml-if> - <dtml-if sqv_html_reply>, html_reply=<dtml-sqlvar sqv_html_reply type="string" optional> </dtml-if> - <dtml-if sqv_top_post>, top_post=<dtml-sqlvar sqv_top_post type="string" optional> </dtml-if> - <dtml-if sqv_signature>, signature=<dtml-sqlvar sqv_signature type="string" optional> </dtml-if> <dtml-if sqv_signature_text>, signature_text=<dtml-sqlvar sqv_signature_text type="string" optional> </dtml-if> - <dtml-if sqv_html_signature>, html_signature=<dtml-sqlvar sqv_html_signature type="string" optional> </dtml-if> - <dtml-if sqv_set_default_template>, default_template=<dtml-sqlvar sqv_default_template type="string"> </dtml-if> + <dtml-if sqv_notify_user_update>, notify_user=<dtml-sqlvar sqv_notify_user type="nb"> </dtml-if> + <dtml-if sqv_notify_group_update>, notify_group=<dtml-sqlvar sqv_notify_group type="nb"> </dtml-if> + <dtml-if sqv_auto_reply_update>, auto_reply=<dtml-sqlvar sqv_auto_reply type="string" optional> </dtml-if> + <dtml-if sqv_html_reply_update>, html_reply=<dtml-sqlvar sqv_html_reply type="string" optional> </dtml-if> + <dtml-if sqv_top_post_update>, top_post=<dtml-sqlvar sqv_top_post type="string" optional> </dtml-if> + <dtml-if sqv_signature_update>, signature=<dtml-sqlvar sqv_signature type="string" optional> </dtml-if> + <dtml-if sqv_html_signature_update>, html_signature=<dtml-sqlvar sqv_html_signature type="string" optional> </dtml-if> + <dtml-if sqv_default_template_update>, default_template=<dtml-sqlvar sqv_default_template type="string"> </dtml-if> WHERE <dtml-sqltest sqv_email column="email" type="nb"> Modified: MailManager/branches/RELENG_2_2/sql/v2_2/generateReportCacheReceived.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/generateReportCacheReceived.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/generateReportCacheReceived.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -35,51 +35,24 @@ ticket_count ) - SELECT + <dtml-let sqv_start_date="sqv_date+' 00:00'"> + <dtml-let sqv_end_date="sqv_date+' 23:59'"> + <dtml-let sqv_subsection="'user'"> - <dtml-sqlvar sqv_date type="nb"> AS cache_date, - COALESCE(table_count.assigned, user_count.assigned), - COALESCE(table_count.ticket_count, user_count.ticket_count) + SELECT - FROM ( - <dtml-comment> + <dtml-sqlvar sqv_date type="nb"> AS cache_date, + subres.assigned, + subres.ticket_count - Obtain the stats from the mm_ticket table, which may omit - an entry for users where there are no tickets. + FROM ( + <dtml-include file='reportCacheReceived.inc'/> + ) AS subres - </dtml-comment> + </dtml-let> + </dtml-let> + </dtml-let> - SELECT - assigned, COUNT(1) AS ticket_count - FROM <dtml-var schema>mm_ticket - - <dtml-sqlgroup where> - date_opened >= (SELECT CAST('<dtml-var sqv_date> 00:00' AS <dtml-var sql_datetimestamp>)) - <dtml-and> - date_opened <= (SELECT CAST('<dtml-var sqv_date> 23:59' AS <dtml-var sql_datetimestamp>)) - <dtml-and> - state != 'Spam' - </dtml-sqlgroup> - - GROUP BY assigned - ORDER BY assigned - ) AS table_count - - <dtml-comment> - - Join the mm_user table to ensure that all users are included in - the result. This select gives a username and a 0 for all users. - - </dtml-comment> - - RIGHT OUTER JOIN ( - SELECT - username AS assigned, 0 AS ticket_count - FROM <dtml-var schema>mm_user - ) AS user_count - - ON table_count.assigned = user_count.assigned - <dtml-var sql_delimiter> @@ -102,7 +75,7 @@ COALESCE(table_count.ticket_count, account_count.ticket_count) FROM ( - + <dtml-comment> Obtain the stats from the mm_ticket table, which may omit Modified: MailManager/branches/RELENG_2_2/sql/v2_2/getReportCacheReceived.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/getReportCacheReceived.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/getReportCacheReceived.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -2,9 +2,12 @@ title:Get the reporting cache for received tickets connection_id: mailmanager_db max_rows:0 -arguments:sqv_from_date sqv_today_date sqv_to_date sqv_subsection sqv_include_live_stats +arguments:sqv_from_date sqv_today_date sqv_to_date sqv_subsection sqv_include_live_stats sqv_nocache -This method also takes into account the current +This method also takes into account the stats from the current date in the +database, if sqv_include_live_stats is true. Setting sqv_hourly will cause +the method to calculate from the database directly, rather than use the +cache, as the resolution of the cache is too low to do hourly stats. </dtml-comment> @@ -12,259 +15,72 @@ FROM - ( SELECT ticket_count, account, assigned, category0, category1, category2 FROM + ( - <dtml-var schema>mm_report_cache_received - <dtml-sqlgroup where> - cache_date >= <dtml-sqlvar sqv_from_date type="nb"> - <dtml-and> - cache_date <= <dtml-sqlvar sqv_to_date type="nb"> - <dtml-and> - <dtml-if sqv_subsection> - <dtml-if expr="sqv_subsection == 'account'"> - account IS NOT NULL - </dtml-if> - <dtml-if expr="sqv_subsection == 'user' or sqv_subsection == 'queue'"> - assigned IS NOT NULL - </dtml-if> - <dtml-if expr="sqv_subsection == 'category0'"> - category0 IS NOT NULL - </dtml-if> - <dtml-if expr="sqv_subsection == 'category1'"> - category1 IS NOT NULL - </dtml-if> - <dtml-if expr="sqv_subsection == 'category2'"> - category2 IS NOT NULL - </dtml-if> - </dtml-if> - <dtml-and> - </dtml-sqlgroup> + <dtml-if sqv_nocache> - <dtml-if sqv_include_live_stats> - - UNION ALL - <dtml-comment> + + Live Data for all dates - Live Cache - - Please see generateReportCacheReceived for a complete explanation - of this section. It returns results which are row compatible with - the cache results, and allows the current data from the live - database to be included in reports. - </dtml-comment> + <dtml-let sqv_start_date=sqv_from_date> + <dtml-let sqv_end_date=sqv_to_date> + <dtml-include file='reportCacheReceived.inc'/> + </dtml-let> + </dtml-let> - <dtml-if expr="sqv_subsection == 'user' or sqv_subsection == 'queue'"> + <dtml-else> - SELECT + SELECT ticket_count, account, assigned, category0, category1, category2 FROM - COALESCE(table_count.ticket_count, user_count.ticket_count), - NULL AS account, - COALESCE(table_count.assigned, user_count.assigned), - NULL AS category0, - NULL AS category1, - NULL AS category2 - - FROM ( - - SELECT - assigned, COUNT(1) AS ticket_count - FROM <dtml-var schema>mm_ticket - - <dtml-sqlgroup where> - date_opened >= (SELECT CAST(<dtml-sqlvar sqv_today_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - date_opened <= (SELECT CAST(<dtml-sqlvar sqv_to_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - state != 'Spam' - </dtml-sqlgroup> - - GROUP BY assigned - ORDER BY assigned - - ) AS table_count - - RIGHT OUTER JOIN ( - SELECT - username AS assigned, 0 AS ticket_count - FROM <dtml-var schema>mm_user - ) AS user_count - - ON table_count.assigned = user_count.assigned - - </dtml-if> - - - <dtml-if expr="sqv_subsection == 'account'"> - - SELECT - - COALESCE(table_count.ticket_count, account_count.ticket_count), - COALESCE(table_count.account_id, account_count.account_id), - NULL AS assigned, - NULL AS category0, - NULL AS category1, - NULL AS category2 - - FROM ( - - SELECT - account_id, COUNT(1) AS ticket_count - FROM <dtml-var schema>mm_ticket - - <dtml-sqlgroup where> - date_opened >= (SELECT CAST(<dtml-sqlvar sqv_today_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - date_opened <= (SELECT CAST(<dtml-sqlvar sqv_to_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - state != 'Spam' - </dtml-sqlgroup> - - GROUP BY account_id - ORDER BY account_id - - ) AS table_count - - RIGHT OUTER JOIN ( - SELECT - email AS account_id, 0 AS ticket_count - FROM <dtml-var schema>mm_account - ) AS account_count - - ON table_count.account_id = account_count.account_id - - </dtml-if> - - - <dtml-if expr="sqv_subsection == 'category0'"> - - SELECT - - COALESCE(table_count.ticket_count, category_count.ticket_count), - NULL AS account, - NULL AS assigned, - COALESCE(table_count.category0, category_count.category0), - NULL AS category1, - NULL AS category2 - - FROM ( + <dtml-var schema>mm_report_cache_received + <dtml-sqlgroup where> + cache_date >= <dtml-sqlvar sqv_from_date type="nb"> + <dtml-and> + cache_date <= <dtml-sqlvar sqv_to_date type="nb"> + <dtml-and> + <dtml-if sqv_subsection> + <dtml-if expr="sqv_subsection == 'account'"> + account IS NOT NULL + </dtml-if> + <dtml-if expr="sqv_subsection == 'user' or sqv_subsection == 'queue'"> + assigned IS NOT NULL + </dtml-if> + <dtml-if expr="sqv_subsection == 'category0'"> + category0 IS NOT NULL + </dtml-if> + <dtml-if expr="sqv_subsection == 'category1'"> + category1 IS NOT NULL + </dtml-if> + <dtml-if expr="sqv_subsection == 'category2'"> + category2 IS NOT NULL + </dtml-if> + </dtml-if> + <dtml-and> + </dtml-sqlgroup> - SELECT - category0, COUNT(1) AS ticket_count - FROM <dtml-var schema>mm_ticket + <dtml-if sqv_include_live_stats> + + UNION ALL + + <dtml-comment> + + Live Data for today + + </dtml-comment> - <dtml-sqlgroup where> - date_opened >= (SELECT CAST(<dtml-sqlvar sqv_today_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - date_opened <= (SELECT CAST(<dtml-sqlvar sqv_to_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - state != 'Spam' - </dtml-sqlgroup> + <dtml-let sqv_start_date=sqv_today_date> + <dtml-let sqv_end_date=sqv_to_date> + <dtml-include file='reportCacheReceived.inc'/> + </dtml-let> + </dtml-let> - GROUP BY category0 - ORDER BY category0 - - ) AS table_count + </dtml-if> - RIGHT OUTER JOIN ( - SELECT - choice AS category0, 0 AS ticket_count - FROM <dtml-var schema>mm_category_choices - WHERE category_id = 0 AND choice != '' - ) AS category_count + </dtml-if sqv_nocache> - ON table_count.category0 = category_count.category0 - - </dtml-if> - - - <dtml-if expr="sqv_subsection == 'category1'"> - - SELECT - - COALESCE(table_count.ticket_count, category_count.ticket_count), - NULL AS account, - NULL AS assigned, - NULL AS category0, - COALESCE(table_count.category1, category_count.category1), - NULL AS category2 - - FROM ( - - SELECT - category1, COUNT(1) AS ticket_count - FROM <dtml-var schema>mm_ticket - - <dtml-sqlgroup where> - date_opened >= (SELECT CAST(<dtml-sqlvar sqv_today_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - date_opened <= (SELECT CAST(<dtml-sqlvar sqv_to_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - state != 'Spam' - </dtml-sqlgroup> - - GROUP BY category1 - ORDER BY category1 - - ) AS table_count - - RIGHT OUTER JOIN ( - SELECT - choice AS category1, 0 AS ticket_count - FROM <dtml-var schema>mm_category_choices - WHERE category_id = 1 AND choice != '' - ) AS category_count - - ON table_count.category1 = category_count.category1 - - </dtml-if> - - - <dtml-if expr="sqv_subsection == 'category2'"> - - SELECT - - COALESCE(table_count.ticket_count, category_count.ticket_count), - NULL AS account, - NULL AS assigned, - NULL AS category0, - NULL AS category1, - COALESCE(table_count.category2, category_count.category2) - - FROM ( - - SELECT - category2, COUNT(1) AS ticket_count - FROM <dtml-var schema>mm_ticket - - <dtml-sqlgroup where> - date_opened >= (SELECT CAST(<dtml-sqlvar sqv_today_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - date_opened <= (SELECT CAST(<dtml-sqlvar sqv_to_date type="nb"> AS <dtml-var sql_datetimestamp>)) - <dtml-and> - state != 'Spam' - </dtml-sqlgroup> - - GROUP BY category2 - ORDER BY category2 - - ) AS table_count - - RIGHT OUTER JOIN ( - SELECT - choice AS category2, 0 AS ticket_count - FROM <dtml-var schema>mm_category_choices - WHERE category_id = 2 AND choice != '' - ) AS category_count - - ON table_count.category2 = category_count.category2 - - </dtml-if> - - </dtml-if> - ) AS subquery GROUP BY @@ -273,4 +89,5 @@ subquery.category0, subquery.category1, subquery.category2 + Modified: MailManager/branches/RELENG_2_2/sql/v2_2/getTicketWindow.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/getTicketWindow.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/getTicketWindow.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -12,122 +12,8 @@ </dtml-comment> -<dtml-comment> - This method works backwards from what would be intuitive. We first find - the state of tickets at the end date, by combining the mm_ticket and - mm_history table. We find either the first history item after the end - date, or alternative the current information from mm_ticket, for each - ticket in the database. This allows us to find the - Current Ticket Status - Ticket History - End of Window - | | s - | h------|-----s - h--|---------|-----s s : current status from mm_ticket - -----|---------|--h s h : history item from mm_history - | | h-h s - : point at which a ticket is in - -----|---------|-----s the given assignment/state - - And history items in the window are them used to calculate the duration, - or alternatively the duration is the entire period. - - The SQL goes along the following lines - - Select the closest history item from past the end window date, so we - know the current state of the the ticket. We then join this with the - ticket table to get the state of tickets which are not affected by - history at this point. - - We need to use DISTINCT in this query to restrict the result to the last - ticket item. This appears to be reproducable in oracle in mssql using - a rework of the query. Search the web for more info when porting. - - This is turning into a rather messy operation. We need to do this - windowing for each attribute type we are interested in. For now, this - method just deals with assignments! - - SELECT - curr_assigned AS assigned, - curr_state AS state, - curr_date AS date, - id - FROM ( - SELECT - <dtml-var schema>mm_ticket.id, - COALESCE(history.assigned, <dtml-var schema>mm_ticket.assigned) AS curr_assigned, - COALESCE(history.state, <dtml-var schema>mm_ticket.state) AS curr_state, - COALESCE(history.last_date, <dtml-var sql_now>) AS curr_date - FROM <dtml-var schema>mm_ticket - LEFT JOIN - ( SELECT DISTINCT ON (<dtml-var schema>mm_history.ticket_id) - <dtml-var schema>mm_history.ticket_id AS id, - <dtml-var schema>mm_history.assigned, - <dtml-var schema>mm_history.state, - <dtml-var schema>mm_history.change_date AS last_date - FROM <dtml-var schema>mm_history - - WHERE <dtml-var schema>mm_history.change_date > <dtml-sqlvar sqv_from_date type="nb"> - AND assigned IS NOT NULL - - ORDER BY <dtml-var schema>mm_history.ticket_id, <dtml-var schema>mm_history.change_date - ) AS history - USING(id) - ) AS currinfo - - <dtml-sqlgroup where> - <dtml-sqltest sqv_assigned column="curr_assigned" type="nb" optional> - <dtml-and> - <dtml-sqltest sqv_state column="curr_state" type="nb" optional> - </dtml-sqlgroup> - - ; - -</dtml-comment> - - - <dtml-comment> - - The rewrite - - It turns out that the above information isn't actually correct, or useful. - - - First we find all of the times a ticket has been changed from having been - assigned to the queue manager in the given time frame. We are only - interested in tickets which have been removed from the queue in this time - so we ignore the tickets table, and just use the history. - - from_date to_date - - | | - X------|-------(1) | - X--O X-|-----------(2) | - X------|-(3) X----(4) | - | | - - History items - - id | count | date | prev_date - ---+-------+------+---------- - 1 | 0 | | - 2 | 1 | | - 3 | 0 | | - 4 | 1 | | - - - - - X----X - - - - </dtml-comment> - - - - SELECT <dtml-var schema>mm_history.ticket_id, <dtml-var schema>mm_history.assigned, <dtml-var schema>mm_history.state, @@ -135,78 +21,8 @@ FROM <dtml-var schema>mm_history - <dtml-comment> - - Subselect to obtain the number of times that the given ticket has been - queued. This is calculated from the COUNT() of times which the ticket - has been assigned to the queue manager. - - </dtml-comment> - - <dtml-comment> - - COALESCE(histinfo.count, 0) AS count - - LEFT JOIN - ( - SELECT COUNT(*) AS count, ticket_id - FROM <dtml-var schema>mm_history - <dtml-sqlgroup where> - <dtml-sqltest sqv_assigned column="assigned" type="nb" optional> - <dtml-and> - change_date < <dtml-sqlvar sqv_from_date type="nb"> - </dtml-sqlgroup> - GROUP BY (ticket_id) - ) AS histinfo - on histinfo.ticket_id = <dtml-var schema>mm_history.ticket_id - - - Subselect to obtain the timestamp of the previous history item for - each ticket_state. - - Ignoring this for now, it's too much effort at present! - - </dtml-comment> - - <dtml-comment> - - Restrict to the results we care about - - </dtml-comment> - - WHERE <dtml-var schema>mm_history.change_date > <dtml-sqlvar sqv_from_date type="nb"> - AND <dtml-var schema>mm_history.change_date < <dtml-sqlvar sqv_to_date type="nb"> + WHERE <dtml-var schema>mm_history.change_date >= <dtml-sqlvar sqv_from_date type="nb"> + AND <dtml-var schema>mm_history.change_date <= <dtml-sqlvar sqv_to_date type="nb"> AND <dtml-var schema>mm_history.assigned = <dtml-sqlvar sqv_assigned type="nb"> ORDER BY <dtml-var schema>mm_history.ticket_id, <dtml-var schema>mm_history.change_date - - -<dtml-comment> - - CREATE TABLE <dtml-var schema>mm_reporingtest ( - ticket_id INT, - assigned TEXT, - change_date TIMESTAMP - ); - - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (1, '_Qincoming', '2001-01-01 12:00'); - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (1, '', '2001-01-01 13:00'); - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (1, '_Qincoming', '2001-01-01 14:00'); - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (1, '_Qincoming', '2001-01-01 15:00'); - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (2, '', '2001-01-01 12:00'); - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (2, '', '2001-01-01 13:00'); - INSERT INTO <dtml-var schema>mm_reporingtest (ticket_id, assigned, change_date) VALUES (2, '_Qincoming', '2001-01-01 14:00'); - - - SELECT COUNT(*) AS count, MAX(change_date) AS max_date, ticket_id - FROM <dtml-var schema>mm_reporingtest - <dtml-sqlgroup where> - <dtml-sqltest sqv_assigned column="assigned" type="nb" optional> - </dtml-sqlgroup> - GROUP BY (ticket_id) - -</dtml-comment> - - - - Modified: MailManager/branches/RELENG_2_2/sql/v2_2/listHistory.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/listHistory.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/listHistory.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -23,7 +23,7 @@ </dtml-if> <dtml-and> <dtml-if sqv_to_date> - <dtml-sqltest sqv_to_date type="nb" column="change_date" op="lt" optional> + <dtml-sqltest sqv_to_date type="nb" column="change_date" op="le" optional> </dtml-if> <dtml-and> <dtml-if sqv_active_field> Modified: MailManager/branches/RELENG_2_2/sql/v2_2/listQueuedTickets.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/listQueuedTickets.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/listQueuedTickets.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -19,7 +19,6 @@ Test case: tests/testQueueing.py method abilitiesTest() - </dtml-comment> SELECT <dtml-var schema>mm_ticket.* @@ -54,6 +53,23 @@ <dtml-var schema>mm_ticket.assigned = <dtml-sqlvar sqv_queue_user type="nb"> </dtml-sqlgroup> + ORDER BY <dtml-var schema>mm_ticket.priority DESC, + <dtml-var schema>mm_ticket.respond_by, + <dtml-var schema>mm_ticket.date_opened + + <dtml-if expr="sql_database == 'mysql'"> + FOR UPDATE + <dtml-else> + FOR UPDATE OF mm_ticket, mm_history + </dtml-if> + + <dtml-if expr="sql_database != 'mysql'"> + <dtml-unless sqv_nolimit> + LIMIT 20 + </dtml-unless> + </dtml-if> + + <dtml-else> INNER JOIN ( @@ -75,14 +91,26 @@ ORDER BY <dtml-var schema>mm_ticket.priority DESC, <dtml-var schema>mm_ticket.respond_by, <dtml-var schema>mm_ticket.date_opened - <dtml-unless sqv_nolimit> - LIMIT 1 - </dtml-unless> + <dtml-if expr="sql_database == 'mysql'"> + FOR UPDATE + <dtml-else> + FOR UPDATE OF mm_ticket + </dtml-if> + <dtml-comment> + Limit is set to 20 to prevent concurrency issues removing all + rows and returning 0 results. 20 should be larger than the Max + number of threads on any known installation. </dtml-comment> + <dtml-if expr="sql_database != 'mysql'"> + <dtml-unless sqv_nolimit> + LIMIT 20 + </dtml-unless> + </dtml-if> + </dtml-if> @@ -106,12 +134,43 @@ <dtml-sqltest sqv_queue_user type="nb" column="assigned" optional> </dtml-sqlgroup> + ORDER BY <dtml-var schema>mm_ticket.priority DESC, + <dtml-var schema>mm_ticket.respond_by, + <dtml-var schema>mm_ticket.date_opened + + <dtml-if expr="sql_database == 'mysql'"> + FOR UPDATE + <dtml-else> + FOR UPDATE OF mm_ticket + </dtml-if> + + <dtml-if expr="sql_database != 'mysql'"> + <dtml-unless sqv_nolimit> + LIMIT 20 + </dtml-unless> + </dtml-if> + <dtml-else> <dtml-sqlgroup where> <dtml-sqltest sqv_queue_user type="nb" column="assigned" optional> </dtml-sqlgroup> + ORDER BY <dtml-var schema>mm_ticket.priority DESC, + <dtml-var schema>mm_ticket.respond_by, + <dtml-var schema>mm_ticket.date_opened + + <dtml-if expr="sql_database == 'mysql'"> + FOR UPDATE + <dtml-else> + FOR UPDATE OF mm_ticket + </dtml-if> + + <dtml-if expr="sql_database != 'mysql'"> + <dtml-unless sqv_nolimit> + LIMIT 20 + </dtml-unless> + </dtml-if> + </dtml-if> - Modified: MailManager/branches/RELENG_2_2/sql/v2_2/listSubTabs.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/listSubTabs.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/listSubTabs.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -1,8 +1,9 @@ <dtml-comment> -title:List navigation tabs +title:List subtabs for a particular main tab connection_id: mailmanager_db max_rows:0 arguments: sqv_tab_id </dtml-comment> SELECT * FROM <dtml-var schema>mm_nav_subtabs -WHERE tab_id=<dtml-sqlvar sqv_tab_id type="nb"> +WHERE <dtml-sqltest sqv_tab_id column="tab_id" type="nb"> +ORDER BY position Modified: MailManager/branches/RELENG_2_2/sql/v2_2/listTabs.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/listTabs.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/listTabs.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -5,3 +5,4 @@ arguments: </dtml-comment> SELECT * FROM <dtml-var schema>mm_nav_tabs +ORDER BY position Modified: MailManager/branches/RELENG_2_2/sql/v2_2/modifyTicketRulesets.zsql =================================================================== --- MailManager/branches/RELENG_2_2/sql/v2_2/modifyTicketRulesets.zsql 2006-09-01 15:47:53 UTC (rev 3571) +++ MailManager/branches/RELENG_2_2/sql/v2_2/modifyTicketRulesets.zsql 2006-09-01 15:52:28 UTC (rev 3572) @@ -9,5 +9,7 @@ rsname = <dtml-sqlvar sqv_new_ruleset type="nb"> <dtml-sqlgroup where> <dtml-sqltest sqv_old_ruleset column="rsname" type="nb" optional> + <dtml-and> + <dtml-sqltest sqv_new_ruleset column="rsname" type="nb" op="ne"> </dtml-sqlgroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |