Index: openacs-4/packages/ecommerce/www/admin/customer-service/actions-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/actions-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/actions-oracle.xql 30 Aug 2001 06:50:22 -0000 1.1
@@ -0,0 +1,105 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+select a.action_id, a.interaction_id, a.issue_id,
+ i.interaction_date, i.customer_service_rep, i.interaction_originator, i.interaction_type,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date,
+ reps.first_names as rep_first_names, reps.last_name as rep_last_name,
+ i.user_identification_id, customer_info.user_id as customer_user_id,
+ customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_service_actions a, ec_customer_serv_interactions i, cc_users reps,
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name
+ from ec_user_identification id, cc_users u2
+ where id.user_id=u2.user_id(+)) customer_info
+ where a.interaction_id = i.interaction_id
+ and i.user_identification_id=customer_info.user_identification_id
+ and i.customer_service_rep=reps.user_id(+)
+ and 0 = (select count(*) from ec_cs_action_info_used_map map where map.action_id=a.action_id)
+ $interaction_date_query_bit $rep_query_bit
+ order by $order_by
+
+
+
+
+
+
+
+
+ select a.action_id, a.interaction_id, a.issue_id,
+ i.interaction_date, i.customer_service_rep, i.user_identification_id, i.interaction_originator, i.interaction_type,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date,
+ reps.first_names as rep_first_names, reps.last_name as rep_last_name,
+ customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_service_actions a, ec_customer_serv_interactions i, ec_cs_action_info_used_map map, cc_users reps,
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name
+ from ec_user_identification id, cc_users u2
+ where id.user_id=u2.user_id(+)) customer_info
+ where a.interaction_id = i.interaction_id
+ and i.user_identification_id=customer_info.user_identification_id
+ and a.action_id=map.action_id
+ and i.customer_service_rep=reps.user_id(+) $info_used_query_bit
+ $interaction_date_query_bit $rep_query_bit
+ order by $order_by
+
+
+
+
+
+
+
+
+ select a.action_id, a.interaction_id, a.issue_id,
+ i.interaction_date, i.customer_service_rep, i.user_identification_id, i.interaction_originator, i.interaction_type,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date,
+ reps.first_names as rep_first_names, reps.last_name as rep_last_name,
+ customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_service_actions a, ec_customer_serv_interactions i, ec_cs_action_info_used_map map, cc_users reps,
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name
+ from ec_user_identification id, cc_users u2
+ where id.user_id=u2.user_id(+)) customer_info
+ where a.interaction_id = i.interaction_id
+ and i.user_identification_id=customer_info.user_identification_id
+ and reps.user_id=i.customer_service_rep
+ and a.action_id=map.action_id
+ and map.info_used=:view_info_used
+ $interaction_date_query_bit $rep_query_bit
+ order by $order_by
+
+
+
+
+
+
+
+
+
+ and sysdate-i.interaction_date <= 1
+
+
+
+
+
+
+
+
+ and sysdate-i.interaction_date <= 7
+
+
+
+
+
+
+
+
+ and months_between(sysdate,i.interaction_date) <= 1
+
+
+
+
+
+
Index: openacs-4/packages/ecommerce/www/admin/customer-service/actions-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/actions-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/actions-postgresql.xql 30 Aug 2001 06:50:22 -0000 1.1
@@ -0,0 +1,106 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select a.action_id, a.interaction_id, a.issue_id,
+ i.interaction_date, i.customer_service_rep, i.interaction_originator, i.interaction_type,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date,
+ reps.first_names as rep_first_names, reps.last_name as rep_last_name,
+ i.user_identification_id, customer_info.user_id as customer_user_id,
+ customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_service_actions a, ec_customer_serv_interactions i
+ LEFT JOIN cc_users reps on (i.customer_service_rep=reps.user_id),
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name
+ from ec_user_identification id LEFT JOIN cc_users u2
+ on (id.user_id=u2.user_id)) customer_info
+ where a.interaction_id = i.interaction_id
+ and i.user_identification_id=customer_info.user_identification_id
+ and 0 = (select count(*) from ec_cs_action_info_used_map map where map.action_id=a.action_id)
+ $interaction_date_query_bit $rep_query_bit
+ order by $order_by
+
+
+
+
+
+
+
+
+ select a.action_id, a.interaction_id, a.issue_id,
+ i.interaction_date, i.customer_service_rep, i.user_identification_id, i.interaction_originator, i.interaction_type,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date,
+ reps.first_names as rep_first_names, reps.last_name as rep_last_name,
+ customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_service_actions a, ec_customer_serv_interactions i
+ LEFT JOIN cc_users reps
+ on (i.customer_service_rep=reps.user_id),
+ ec_cs_action_info_used_map map,
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name
+ from ec_user_identification id LEFT JOIN cc_users u2
+ on (id.user_id=u2.user_id)) customer_info
+ where a.interaction_id = i.interaction_id
+ and i.user_identification_id=customer_info.user_identification_id
+ and a.action_id=map.action_id
+ $info_used_query_bit
+ $interaction_date_query_bit $rep_query_bit
+ order by $order_by
+
+
+
+
+
+
+
+
+ select a.action_id, a.interaction_id, a.issue_id,
+ i.interaction_date, i.customer_service_rep, i.user_identification_id, i.interaction_originator, i.interaction_type,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date,
+ reps.first_names as rep_first_names, reps.last_name as rep_last_name,
+ customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_service_actions a, ec_customer_serv_interactions i, ec_cs_action_info_used_map map, cc_users reps,
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name
+ from ec_user_identification id LEFT JOIN cc_users u2
+ on (id.user_id=u2.user_id)) customer_info
+ where a.interaction_id = i.interaction_id
+ and i.user_identification_id=customer_info.user_identification_id
+ and reps.user_id=i.customer_service_rep
+ and a.action_id=map.action_id
+ and map.info_used=:view_info_used
+ $interaction_date_query_bit $rep_query_bit
+ order by $order_by
+
+
+
+
+
+
+
+
+ and now()-i.interaction_date <= timespan_days(1)
+
+
+
+
+
+
+
+
+ and now()-i.interaction_date <= timespan_days(7)
+
+
+
+
+
+
+
+
+ and now()-i.interaction_date <= '1 month'::interval
+
+
+
+
+
Index: openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl 20 Apr 2001 20:51:14 -0000 1.1
+++ openacs-4/packages/ecommerce/www/admin/customer-service/actions.tcl 30 Aug 2001 06:50:22 -0000 1.2
@@ -80,13 +80,14 @@