Having a Assignee with different Projects, and a project with different Assignees

0
So I have right now a logic to replace all the tasks, assigned to an assignee to another assignee. Adding to that I want to check if the Assignee has access and is assigned to that Project that includes the tasks I want to assign to him. In case he doesn't it will throw a warning. Right now I am looping over the Project to get its assignee and then as the assignees are multiple I will also loop over the assignee list. The problem is it goes through the second loop as many times as the project's assignees, and I just want it to go once. Any suggestions to solve this? 
asked
1 answers
0

Instead of

- for the second loop 1) retrieve all assignees for that Project and 2) loop over that list of assignees and 3) in that loop check if the assignee has access

you can

- retrieve all assignees of the project, and include an xpath to limit to only assignees having access, and set the retrieve to only 'first'

answered