How to create release tasks based on selected assignment groups ?

User205031
Tera Contributor

Hi All,

I have a requirement in Release form. We have a list collector variable and it contains few groups. When a release is created with any of these groups, a task should get created.

If the user selects all the groups, tasks should get created for each selected groups.

How to achieve this?

Thanks in advance!

1 ACCEPTED SOLUTION

Rahul RJ
Giga Sage
Giga Sage

@User205031  to achieve this you need to write after insert the business rule to create task based on the group selection 

You can below code for the same.

var groupList=current.glideListFieldName ;//glidelist group field name

var group=groupList.split(','); 
for(var i=0;i<group.length;i++){ //depend on field value it will create that many task task other field can you set depend on your requirement
 var taskGR=new GlideRecord('task_table_name');
taskGR.initialize();
taskGR.short_description="Task"+i+"created"; 
taskGR.group_field=group[i];
taskGR.insert();
}

 Regards,

RJ

View solution in original post

2 REPLIES 2

Rahul RJ
Giga Sage
Giga Sage

@User205031  to achieve this you need to write after insert the business rule to create task based on the group selection 

You can below code for the same.

var groupList=current.glideListFieldName ;//glidelist group field name

var group=groupList.split(','); 
for(var i=0;i<group.length;i++){ //depend on field value it will create that many task task other field can you set depend on your requirement
 var taskGR=new GlideRecord('task_table_name');
taskGR.initialize();
taskGR.short_description="Task"+i+"created"; 
taskGR.group_field=group[i];
taskGR.insert();
}

 Regards,

RJ

Hello,

 

I tried with this script and working fine.

Thanks!