Merge remote-tracking branch 'upstream/4.3' into 4.3-master-2013-08-21-20-13-45
[civicrm-core.git] / CRM / Case / xml / HRD / HRD.mysql
1 -- /*******************************************************
2 -- *
3 -- * Configuration Data for CiviCase Component
4 -- * For: HRD
5 -- *
6 -- *******************************************************/
7
8 -- /*******************************************************
9 -- *
10 -- * Case Types
11 -- *
12 -- *******************************************************/
13 SELECT @option_group_id_case_type := max(id) from civicrm_option_group where name = 'case_type';
14 SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase';
15
16 INSERT INTO
17 `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
18 VALUES
19 (@option_group_id_case_type, 'Civil and Political' , 1, 'Civil and Political' , NULL, 0, 1, 1, NULL, 0, 1, 1),
20 (@option_group_id_case_type, 'Economic, Social and Cultural', 2, 'Economic, Social and Cultural', NULL, 0, 0, 2, NULL, 0, 1, 1),
21 (@option_group_id_case_type, 'Gender Issues' , 3, 'Gender Issues' , NULL, 0, 0, 3, NULL, 0, 1, 1);
22
23
24 -- /*******************************************************
25 -- *
26 -- * Additional Case Activity Types
27 -- *
28 -- *******************************************************/
29 SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
30
31 SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
32
33 INSERT INTO
34 `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
35 VALUES
36 (@option_group_id_activity_type, 'Source(incoming)', (SELECT @max_val := @max_val+1), 'Source(incoming)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
37 (@option_group_id_activity_type, 'Incoming correspondence', (SELECT @max_val := @max_val+1), 'Incoming correspondence', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
38 (@option_group_id_activity_type, 'Incoming Press Release', (SELECT @max_val := @max_val+1), 'Incoming Press Release', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
39 (@option_group_id_activity_type, 'Complaint', (SELECT @max_val := @max_val+1), 'Complaint', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
40 (@option_group_id_activity_type, 'Urgent Action(incoming)', (SELECT @max_val := @max_val+1), 'Urgent Action(incoming)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
41 (@option_group_id_activity_type, 'Outgoing correspondence', (SELECT @max_val := @max_val+1), 'Outgoing correspondence', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
42 (@option_group_id_activity_type, 'Outgoing Press Release', (SELECT @max_val := @max_val+1), 'Outgoing Press Release', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
43 (@option_group_id_activity_type, 'FL Action(outgoing)', (SELECT @max_val := @max_val+1), 'FL Action(outgoing)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
44 (@option_group_id_activity_type, 'FL Urgent Action(outgoing)', (SELECT @max_val := @max_val+1), 'FL Urgent Action(outgoing)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
45 (@option_group_id_activity_type, 'Lobbying(outgoing)', (SELECT @max_val := @max_val+1), '', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId );