Highlighted
Absent Member.
Absent Member.
1491 views

Notification to assignment group manager

Jump to solution
Is this an out of the box function?
If it is, what should the recipient value in the "IM Open" notification be?
0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
Ok.

There isn't an OOB method to do this; that doesn't mean it can't be done. It just means it's a little trickier.

One way to go is to capture the value of the wdManagerName from the assignment table into a field in the probsummary table by means of a formatctrl query and a calculation when the record is filed. To do this, you'd need to add a field to the probsummary table for the manager's name, set up a formatctrl query and a formatctrl calculation. Pretty easy to do, and you get the benefit of having the manager's name stored in the Incident ticket itself. Then, you'd customize the notification record to hae this new field as the recipient.

The other way is to create a JavaScript that will use the value in the assignment field in the Incident record to query the assignment table and return the manager's name as the email recipient.

View solution in original post

13 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
In which? Service Manager? If so, which version (and with IIA or without?) Service Center?
0 Likes
Highlighted
Absent Member.
Absent Member.
Sorry about the vagueness.

I'm working on SM7.01 with IIA.
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
Ok.

There isn't an OOB method to do this; that doesn't mean it can't be done. It just means it's a little trickier.

One way to go is to capture the value of the wdManagerName from the assignment table into a field in the probsummary table by means of a formatctrl query and a calculation when the record is filed. To do this, you'd need to add a field to the probsummary table for the manager's name, set up a formatctrl query and a formatctrl calculation. Pretty easy to do, and you get the benefit of having the manager's name stored in the Incident ticket itself. Then, you'd customize the notification record to hae this new field as the recipient.

The other way is to create a JavaScript that will use the value in the assignment field in the Incident record to query the assignment table and return the manager's name as the email recipient.

View solution in original post

Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
If you want to go with the new field, follow these steps.

Type "dbdict" in the command window, then search for File Name="probsummary".

click on the "desicriptor" (first entry in the first column under "Name") and then click "New Field/Key" button.

Type in the Name of your new field (no spaces... for now, let's call it "assignment.manager") and choose a type of "character", then click the "Add Field" button

Then click "OK" and when prompted, choose "SM Alters". This will add the field to your database. This may take a few minutes... be patient.

Then, type "fc" in the command window and search for Name="probsummary"

In the Queries tab, add the following:
add: not null(assignment in $file)
update: not null(assignment in $file)
Filename: assignment
Query: name=assignment in $file

Take note of which entry this is in the Queries panel (i.e. entry number 1, 2, 3, etc)

The results of that query will be stored in a $fileX variable, where X is the entry number. If this is the third query, then the results are in the $file3 variable. If this is the second, then it's in the $file2, ect... Let's assume it's $file2 for now

Then, in the Calculations panel, add the following:
Add: not null(wdManagerName in $file2)
Update: not null(wdManagerName in $file2)
Calculation: assignment.manager in $file=wdManagerName in $file2


Then, in the IM Open Notification record, set the Recipient to "assignment.manager in $L.file"
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
If you want to do the Javascript method, here's a little script I threw together that should work.

Type "sl" in the command window.

Type in a name for this script (for now, just call it ManagerName)

Then paste the contents and click the Add button.


function Notify(group)
{
var manager
var assignment=new SCFile("assignment")
var getAssignment = assignment.doSelect("name=\""+group+"\"")

if (getAssignment == RC_SUCCESS)
{
manager=assignment.coordinator_incident

if (manager != null)
{
return manager
}

else
{
return null
}

}
else
{
return null
}
}


Then, in the notification table, set the recipient to:

jscall("ManagerName.Notify", assignment in $L.file)


What the script does is it takes the value passed to it (the assignment group from the Incident ticket) and builds a query of the assignment table for that group. If it finds the group, it returns the wdManagerName of that group, otherwise it returns nothing. You could change that to email a particular user if no manager is found; that's up to you.
Highlighted
Absent Member.
Absent Member.
I'll give it a try.
Thanks for your help.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
gents,

any idea how i can do this to the requestors manager name in cm3r?
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

@Jacob Heubner wrote:
If you want to do the Javascript method, here's a little script I threw together that should work.

Type "sl" in the command window.

Type in a name for this script (for now, just call it ManagerName)

Then paste the contents and click the Add button.


function Notify(group)
{
var manager
var assignment=new SCFile("assignment")
var getAssignment = assignment.doSelect("name=\""+group+"\"")

if (getAssignment == RC_SUCCESS)
{
manager=assignment.coordinator_incident

if (manager != null)
{
return manager
}

else
{
return null
}

}
else
{
return null
}
}


Then, in the notification table, set the recipient to:

jscall("ManagerName.Notify", assignment in $L.file)


What the script does is it takes the value passed to it (the assignment group from the Incident ticket) and builds a query of the assignment table for that group. If it finds the group, it returns the wdManagerName of that group, otherwise it returns nothing. You could change that to email a particular user if no manager is found; that's up to you.

Will this work in 9.21?  I have added this script and modified the notification but it is not sending out the email.

0 Likes
Highlighted
Absent Member.
Absent Member.
Hi,
It would work in SM9.21 too , you have to make a minor change as "coordinator_incident" field does not exists in assignment table.
You should use field wdManagerName and change the expressions as below,

manager=assignment.coordinator_incident
to
manager=assignment.wdManagerName

hth
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Highlighted
Absent Member.
Absent Member.

I applied the same script on 9.41 but some how it is not working.

I Need to send an email to both the Assignment Group and Assignee Manager.

Any suggestions

 

-DK

 

 

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi John,

 

I want to  know what is meaning of below line

"Take note of which entry this is in the Queries panel (i.e. entry number 1, 2, 3, etc)

The results of that query will be stored in a $fileX variable, where X is the entry number. If this is the third query, then the results are in the $file3 variable. If this is the second, then it's in the $file2, ect... Let's assume it's $file2 for now"

 

I am not able to move further on this

 

Regards

HB

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.