Notification on stateless recordtypes

General question about the package, problems, solutions
ronjuan
Posts: 20
Joined: Wed Dec 17, 2008 3:57 pm

Notification on stateless recordtypes

Postby ronjuan » Fri Nov 20, 2009 11:05 am

Hi,

we have a stateless recordtype called "Project". Now when something changes in this recordtype, we want to sent an email to the projectleader that something has changed. For normal recordtypes you can select "Setup recordtype for packages" and add EmailNotification 1.3. But how do i enable email_notification_rule for this stateless recordtype?

Ron.

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: Notification on stateless recordtypes

Postby Pavel » Fri Nov 20, 2009 11:41 am

ronjuan wrote:For normal recordtypes you can select "Setup recordtype for packages" and add EmailNotification 1.3. But how do i enable email_notification_rule for this stateless recordtype?


ClearQuest designer does not allow you to setup stateless record types for packages. You have to use command line interface, packageutil.
You can find detailed instructions on the package web site: http://cqadmin.org/wiki/Applying_Packag ... ss_Records

Regards,
Pavel

ronjuan
Posts: 20
Joined: Wed Dec 17, 2008 3:57 pm

Re: Notification on stateless recordtypes

Postby ronjuan » Thu Nov 26, 2009 9:33 am

Hi Pavel,

thanks for your reply. That did the trick. However i have another question now. I created a database property called DIS_GetFieldOriginalValue with the following value:

my ($name) = @_;
my $value = '';

eval {
$value = $entity->GetFieldOriginalValue($name)->GetValue();
};
$@ = '';
return $value;

Now i have an email rule that if one of the following fields change an email is sent posting the Original an new value.

Original ProjectLeader: DIS_GetFieldOriginalValue('ProjectLeader')
New ProjectLeader: ${ProjectLeader}

Original Security Delegate: DIS_GetFieldOriginalValue('ProjectSecurityDelegator')
New Security Delegate: ${ProjectSecurityDelegator}

Original Security Delegate 1: DIS_GetFieldOriginalValue('ProjectSecurityDelegator1')
New Security Delegate 1: ${ProjectSecurityDelegator1}

Original Security Delegate 2: DIS_GetFieldOriginalValue('ProjectSecurityDelegator2')
New Security Delegate 2: ${ProjectSecurityDelegator2}

Original Security Delegate 3: DIS_GetFieldOriginalValue('ProjectSecurityDelegator3')
New Security Delegate 3: ${ProjectSecurityDelegator3}

What i would like to do is only sent out the field that was actually changed and not the ones that are not changed.
Is that possible?

Ron.

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: Notification on stateless recordtypes

Postby Pavel » Thu Nov 26, 2009 10:12 am

ronjuan wrote:What i would like to do is only sent out the field that was actually changed and not the ones that are not changed.
Is that possible?

Yes, it possible. For example,

Code: Select all

IF(DIS_GetFieldOriginalValue('ProjectLeader') ne ${ProjectLeader},
"Original ProjectLeader: DIS_GetFieldOriginalValue('ProjectLeader')
New ProjectLeader: ${ProjectLeader}")

Regards,
Pavel

ronjuan
Posts: 20
Joined: Wed Dec 17, 2008 3:57 pm

Re: Notification on stateless recordtypes

Postby ronjuan » Fri Nov 27, 2009 3:59 am

Pavel,

thanks. This is excellent!

Ron.


Return to “Email Notification Package Q&A”

Who is online

Users browsing this forum: No registered users and 1 guest

cron