Post

3 followers Follow
0
Avatar

Rule to validate entity type for a resource assignment

In our instance we have rules that prevent assigning multiple resources to a single task unless all resources are the same "timekeeping type".  This is a custom field (toggle) to indicate if that resource should log time or not.  

This is one of the validation rules that prevents assignment of a "non timekeeping" user to a task that is set as reportable.  

$Resource.C_TimesheetUser=FALSE && $WorkItem.ResourcesCount>0 && Not($WorkItem.SYSID='P-12203') && Not($WorkItem.SYSID='T-55571')&& Not($WorkItem.SYSID='T-55572') && ($WorkItem.Reportable=TRUE  ||  $WorkItem.ActualEffortUpdatedFromTimesheets=TRUE)

The issue I'm having is I now want to use the Planning Module - assigning resources at the project level but this same validation rule prevents it.  Is there a way to determine that the resource assignment is occurring at the project level?  I'd like to add that as an exclusion to these validation rules so it will allow mixing resources at the project level for resource planning purposes while retaining the logic at the task level.  

David Stackleather Answered

Please sign in to leave a comment.

3 comments

0
Avatar

David,

 

I might be over-simplifying your requirement, but can you not just check the start letter of the 'WorkItem.SYSID', then you only apply your validation rule where the 'WorkItem.SYSID' begins with 'T'.

Phil Smith 0 votes
Comment actions Permalink
0
Avatar

Phil - I hadn't thought of that, it's a creative way to accomplish this.  I tried entity type, didn't work but I see from Ariel what my mistake was.

 

Thanks

David

 

David Stackleather 0 votes
Comment actions Permalink