By iStyLe on
Hello,
i want to create a Inventory Management tool for our IT department with Drupal, but right now i am having some trouble so i was thinking about geting some advice on this forum.
The main problem is the management of licences, is there some solution that would enable me to "reference" or "link" a license to a node?
Let say i go to license management - add a new license in some category and after that i go to a node and add that license to that node which represent my piece of hardware i have. After that, the license should be substracted out of my licences pool until i unlink the license again from that node.
i hope for some constructive advices ;)
Comments
*bump*
no one knows a practical solution?
Node reference CCK field, back reference, Auto Nodetitle
Here is how I would do it:
Install:
http://drupal.org/project/cck (install CCK Node Reference)
http://drupal.org/project/backreference
http://drupal.org/project/auto_nodetitle
http://drupal.org/project/token
Create a new content type "Software License"
Add a text field labelled "Software Name" to your new content type.
Add a text field labelled "Key" to your new content type.
Edit the content type, under Automatic Nodetitle, tell it to automatically create the node title based on the token for [field_software_name] - [field_key] so that your software name and key are used to automatically build the title of every Software License node (you can also use other fields from your Software License content type to build the title differently).
Add a node reference field labelled "Installed on" to your new content type. Tell it to reference nodes of your "Hardware" content type.
Add a nodereference field labelled "Software Licences" to your "Hardware" content type. Tell it to reference nodes of your "Software License" content type. Allow unlimited values.
Go back to your "Software License" content type and configure the "Installed on" field under "Back reference settings" to be a backreference to the "Software Licences" field on your "Hardware" content type. Allow 1 value.
You will now be able to add licences to your hardware and they will appear on the node as links to your software nodes and vice versa.
Backreference will also enforce 1-1 relationships with your reference fields so you can ensure that you are not breaking software license laws . . . ;)
Use the relationships feature of the Views module to display your hardware/software relationships with unlimited possibilities
Hope this helps!
Lunk
lunk_rat is Acquia Certified Grand Master