This questions has some similarities with How to display list of nodes that share the same Parent taxonomy term as current node, but I've not managed to figure out how I can get to what I need to do given the answers there.
A have a set of nodes that are associated via term reference with a taxonomy, that is two levels deep. I'll call the parent level area and the child level task.
This is a migration from another website that has pages for publications associated with each area but in my current data structure I only associate the publication nodes with the tasks (children of the areas). The areas each have a legacy_area_id field populated with the area id that was used in the url on the old site.
What I want to do now is create a view that will listen on pub/by/area/% and take a legacy area id as a contextual filter, and show a list of all nodes associated with a child of the taxonomy term that has that value in its legacy id field.
With a data setup like this, a request to /pub/by/area/1
Should return a listing containing Nodes 1, 3, and 4
One option would be to go back and change my migration to associate the publications with areas too, but that seems likely to make the task of moving tasks between areas later quite a bit more complicated.
Another option would be to add the legacy area id to the tasks as well, but that provides similar challenges.
In reality, my end goal is to redirect these pub/by/area/# requests to a different view with the area name in the url similarly to what I've done for other old addresses in How to redirect based on matching a node field?. So really I suppose all the view really needs to give me is the data required to redirect to another view. I'll keep working on this, but help would be appreciated.
a request to /pub/by/area/1
Should return a listing containing Nodes 1, 3, and 4What do nodes 1, 3 and 4 have in common? Same legacy id?
I only associate the publication nodes with the tasksso in your nodes you have a taxonomy reference field and in there you put task and not area, correct?