45 lines
3.2 KiB
Plaintext
45 lines
3.2 KiB
Plaintext
|
-- /*******************************************************
|
||
|
-- *
|
||
|
-- * Configuration Data for CiviCase Component
|
||
|
-- * For: HRD
|
||
|
-- *
|
||
|
-- *******************************************************/
|
||
|
|
||
|
-- /*******************************************************
|
||
|
-- *
|
||
|
-- * Case Types
|
||
|
-- *
|
||
|
-- *******************************************************/
|
||
|
SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase';
|
||
|
|
||
|
INSERT INTO
|
||
|
`civicrm_case_type` (`title`, `name`, `weight`, `is_reserved`, `is_active`)
|
||
|
VALUES
|
||
|
('Civil and Political' , 'Civil and Political' , 1, NULL, 1, 1),
|
||
|
('Economic, Social and Cultural', 'Economic, Social and Cultural', 2, NULL, 1, 1),
|
||
|
('Gender Issues' , 'Gender Issues' , 3, NULL, 1, 1);
|
||
|
|
||
|
|
||
|
-- /*******************************************************
|
||
|
-- *
|
||
|
-- * Additional Case Activity Types
|
||
|
-- *
|
||
|
-- *******************************************************/
|
||
|
SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
|
||
|
|
||
|
SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
|
||
|
|
||
|
INSERT INTO
|
||
|
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
|
||
|
VALUES
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 ),
|
||
|
(@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 );
|