Post

3 followers Follow
0
Avatar

Adding new Manager

We are trying to build a Workflow rule that, in a determined condition (product type), sets a new manager (internal users) to the work item.
The main question is: What is the correct field and the right function to define users at the 'set action' field?


Janio Lima Answered

Please sign in to leave a comment.

7 comments

0
Avatar

Hello Janio,

To assign a Project Manager from a workflow rule that has been created on the Project entity, please choose 'Update Field' action >> $ProjectManager field and populate it with the manager's username in quotes. You can use a formula that equates to a valid username or a user object as well.

I think the function you're looking for is:

If(In($C_Disciplina, 'Matematica') && In($C_Segmento, 'Fundamental II'), 'username if conditions are true', 'username if conditions are false')

Please let me know if this helps.

Roland Pumputis 0 votes
0
Avatar

Hello Roland,

Before to define the function case at the set action field, I selected If function and I wrote the same way you did, but it didn't work.

 

Janio Lima 0 votes
0
Avatar

Which object are you running this on? Projects or Work Items?  It will fail unless you run it on Projects since Milestones and Tasks do not have a Project Manager field.

Josh Santos 0 votes
0
Avatar

Josh, 

The intention is to run it on tasks, but, majority of the tasks already contains an user. Is there a way to include someone else as a manager at the tasks?

Janio Lima 0 votes
0
Avatar

There is an Owner and Manager for Work Items, perhaps that should be the field to update instead of Project Manager. Project Manager will error out at the Task or Milestone level because the field only exists for Projects. (If you want to reference the Project Manager from a Task, it would be $Project.ProjectManager and would change the PM for the whole Project).

Josh Santos 0 votes
0
Avatar

Josh, I got it what you meant, but,  just for conclusion: The rule would just works for Project level, and there is no way to run it on milestones and tasks levels, isn't?.

Thanks for the contribution

Janio Lima 0 votes
0
Avatar

As written above, it would only run on projects and trigger errors every time it tries to run on a task or milestone. If you run it on Owner, then it can run on Tasks, Milestones, or Projects. We would recommend working with your PS consultant to make sure the rule is aligned with your use case.

Josh Santos 0 votes