...
Code Block |
---|
select distinct attribute_assign_id_marker, assign_name, 'new Provisionable' || (case when exists (select 1 from temp_provisioning_assigns tpa2 where tpa.attribute_assign_id_marker = tpa2.attribute_assign_id_marker and tpa2.assign_type = 'group') then 'Group' else 'Stem' end) || 'Save().assignTargetName("' || (select tpa2.value_string from temp_provisioning_assigns tpa2 where tpa.attribute_assign_id_marker = tpa2.attribute_assign_id_marker and tpa2.attribute_name = 'etc:provisioning:provisioningTarget') || '").assign' || (case when exists (select 1 from temp_provisioning_assigns tpa2 where tpa.attribute_assign_id_marker = tpa2.attribute_assign_id_marker and tpa2.assign_type = 'group') then 'Group' else 'Stem' end) || 'Name("' || (select distinct assign_name from temp_provisioning_assigns tpa2 where tpa.attribute_assign_id_marker = tpa2.attribute_assign_id_marker) || '")"' || (case when exists (select 1 from temp_provisioning_assigns tpa2 where tpa.attribute_assign_id_marker = tpa2.attribute_assign_id_marker and tpa2.assign_type = 'group') then 'Group' else 'Stem' end) || '".save();' as script from temp_provisioning_assigns tpa where exists (select 1 from temp_provisioning_assigns tpa2 where tpa.attribute_assign_id_marker = tpa2.attribute_assign_id_marker and tpa2.value_string = 'true' and tpa2.attribute_name = 'etc:provisioning:provisioningDirectAssign') and assign_type = 'stem' order by 2; |
List of people in a group with their start time (v4)
In v5 this is easier...
Note, you need to change the query to change micros from 1970 to a timestamp
Code Block |
---|
SELECT subject_id,
(select grouper_to_timestamp(min(gpmglv.the_start_time)) FROM grouper_pit_mship_group_lw_v gpmglv
where gpmglv.group_name = gmlv.group_name
and gpmglv.member_id = gmlv.member_id
and gpmglv.field_name = 'members'
and gpmglv.the_end_time is null
)
FROM grouper_memberships_lw_v gmlv
WHERE group_name = 'test:testGroup' AND list_name = 'members' AND subject_source = 'pennperson'; |