Hi all,

I am using CCK's Node Reference type to do some requirements modeling for an intranet site we are developing using Drupal. As in, we are using Drupal to store requirements and use cases. Starting out, we have created a type called "requirement", and a type called "use case". Currently we use node reference to show which requirements a use case references. So I create 5 requirements. I create a use case that represents those requirements. I then use a node reference field with the use case CCK node to make 5 references to the requirements.

This all works great, and when you view the use case you get 5 links to the five requirements the use case references. Now here is the question: When I display one of the five requirements, how can I show that the use case has referenced them? As it is, the CCK node reference is not a two way association, but only a reference.

So you have:

Requirement 1 <- Use Case 1
Requirement 2 <- Use Case 1
Requirement 3 <- Use Case 1
Requirement 4 <- Use Case 1
Requirement 5 <- Use Case 1

But I really want to see:

Requirement 1 <-> Use Case 1
Requirement 2 <-> Use Case 1
Requirement 3 <-> Use Case 1
Requirement 4 <-> Use Case 1
Requirement 5 <-> Use Case 1

As this shows, you need to make another reference on the requirement side to point back to the use case manually if you want a real association. It's not really efficient or manageable to create the reference in both directions. Also, in some cases it doesn't make sense for it to go both ways automatically. What it comes down to is that I can't think of a way to click through requirements nodes and see which of the use cases of have referenced them using the CCK node reference with the functionality I am aware of, and don't think having two references is a good solution.

I am still a relatively Drupal newcomer (although I have gotten quite good at installing Drupal), so maybe there is something I am missing. Please help.

Thanks!

jjv

Comments

jeffvogelsang’s picture

I think this should have gone in "Post Installation...", sorry.

ray007’s picture

You need to create a view to get the Use Cases referencing a requirement.

iancawthorne’s picture

Did you ever solve this problem as I am trying to do the same thing. As far as I can tell, views can only work in the single direction in your first example.

Hydrant Ltd
www.hydrant.co.uk

Hydrant Ltd
www.hydrant.co.uk

WorldFallz’s picture

i've been playing around with http://drupal.org/project/nodereferrer and it provides a nice list of backlinks.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz