R31398-12 Project Task Resource- Add Task Participant

Code R31398-12
Entity Projects.ProjectTaskResources Entity
Name AddTaskParticipant
Attribute ProjectTask.Participants
Layer Front-End
Events AttributeChanged(ResourceInstance)
Priority Normal
Modify YES
Applicable Legislations ALL // no condition needed
Action if (ResourceInstance != null and ResourceInstance.Party != null) { var person = Persons.Where(Person == ResourceInstance.Party).FirstOrDefault();

if (!ProjectTask.Participants.Any(ParticipantPerson == person)) ProjectTask.Participants.Add(new ProjectTaskParticipant{NotifyOnStatusChange = true,WorkLoadPercent = 1,ParticipantPerson = person}) }
Description When Resource Instance is changed,  if the Resource Instance is not null and in its definition Party is not null, if there is a Person for that Party and the Person is not in the Project Task Participants, a new Participant is created related to the Person.
Message
Version Introduced: 21

Updated: -
Revocable YES

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.