I have a content type Project with an entityreference user field
field_project_team where you can assign users to the project.
I also have a content type Task with an entityreference field
field_parent_project pointing to its parent Project and an entityreference user field
field_responsible where you can choose one of users to be responsible for this Task.
I want the Task field options to include only those users who are mentioned in
field_project_team of the parent node.
I've created a user type view with entityreference display for this, where I want to filter users by their belonging to field_project_team of the project with nid from
field_parent_project, but can't configure it correctly.
What i'm actually trying to do:
1) When you create a Project node, you can select users who will be a working team for this very project. I've already done it with a
field_project_team - an entityreference user select list, which selects users with the role I need via user view with entityreference display.
2) You can create Task nodes for each Project. Each Task node should be connected to its parent Project. I'm doing it like this: on a Project node page I have a button "Add task" which opens Task node add page via the link like node/add/task/[xxx] (where [xxx] is a nid of the parent Project node). Then in the Task content type i have an entityreference field
field_parent_project which is prepopulated from URL, so I can get the parent node reference filled automaticly when adding a new task.
All above mantioned works fine, but i try to achive one more thing:
3) When adding/etiting a Task node you should be able to assing this very task to some users to make them responsible for performing this task. In the Task content type I have an entityreference user select field called
field_responsible where you can select users. But I want to see in this field not all site users, but only those who are already selected as a Project team - in the
field_project_team of the parent Project. To get such a filtered user list I've changed the
field_responsible settings ENTITY SELECTION mode to Views: filter by an entity reference view and created a user view with Entity Reference display called "Project team users" to filter users.
My problem is that I can't configure the display in a right way to get only those users I need, i.e. those who are already selected to be a Project team of a parent Project referenced from a Task via
This is my View display:
And some explaination:
1. A bridge to the Content entity that is referencing User via
2. A bridge to the Content entity that is referenced via
field_parent_project (relationship with Content referencing User via
3. Context filter via Content:Nid (relationship with Content referenced via
field_parent_project)to get the Nid of parent Project
4. Was trying to add Content:Nid filter related with Content referenced via field_parent_project to filter by the Nid of parent Project.
5) "5" is a Nid of a test Parent project. The Project node with such a Nid exists on the site and some test Taks have reference to it as to parent Project.
In final, it doesn't work. I think I'm missing smth very simple with this but can't realize what... Will be very thankful for any help.