You are here

README.txt in Resource Conflict 7.3

Same filename and directory in other branches
  1. 5.2 README.txt
  2. 5 README.txt
  3. 6.2 README.txt
  4. 7.2 README.txt
= Resource Conflict =

This module allows for users to detect overlapping dates and respond with Rules.
This is most often used for tracking bookable resources.  For example, a student
can book a microscope for use within their lab, but only one microscope can be
booked at a time.

By default, this module throws a form error for every overlapping date it finds
among conflict-enabled nodes. It is intended to be customized using Rules, for
example to only throw errors when certain field values are identical.

== Requirements ==

Entity: http://drupal.org/project/entity
Rules: http://drupal.org/project/rules
Date: http://drupal.org/project/date

== Installation ==

Download the module to your modules directory, and enable it from admin/modules.

You may wish to disable or modify the built in example Rule, which shows a form
error message for conflicts as they are detected.

== Usage ==

1) Create a content type with a date field.
2) On the Content Type Edit page, enable Conflict Checking for this Content
   Type. Select the date field which should be used for conflict checking, and
   save the form.
3) Create two nodes with overlapping dates to see the default Rule in action. Or
   create your own Rule.

Read more on how to setup a Rule to perform conflict checking with respect to a
specific resource here: https://drupal.org/node/2090487


== Included Rules Components ==

EVENT: A RESOURCE CONFLICT WAS DETECTED

This event is triggered any time a resource conflict is detected. By itself,
this event will never fire.


EVENT: A RESOURCE CONFLICT NODE FORM IS VALIDATED

This rule fires during node form validation on Resource Conflict enabled content
types. You should use this event if you want to set form errors, or if you want
to interact with Rules_forms module. It provides both a node object of the node
being created/edited and a form object for use with rules_forms. This is the
event trigger for the default Rule.


CONDITION: CONTAINS A RESOURCE CONFLICT
Evaluate a node object for conflicts. Returns TRUE if there are conflicts for
the node.


ACTION: LOAD A LIST OF CONFLICTING NODES

Creates a list of nodes that conflict with the given node.


ACTION: SET A FORM VALIDATION ERROR

Stores a form validation error to be fired the next time a validation hook is
called on a conflict-enabled node. This is intended for use with the "A Resource
Conflict Node Form is Validated" Event, but you could probably find other
creative uses for it. When this action fires, the next resource conflict enabled
node to go through validation will get a form error on the resource conflict
enabled date field.

== To Do ==

* Setting a form validation error currently works by setting a variable in
    $_SESSION, and retrieving it in hook_node_validate. This is open to all
    sorts of abuse, and if mis-used properly could throw errors on the wrong
    node forms. At the very least, I should set a time expiry on these messages
    to avoid accidental abuse. Proper caching would be even smarter.

* Make ANY fieldable entity capable of handling conflict detection.


== Contact ==
This module was originally developed by Andrew Berry (andrewberry@sentex.net)
for use at the Protein Dynamics lab at the University of Guelph.

It was re-written for Rules and Entity integration by Campbell Vertesi
(campbell@vertesi.com) for use on a private project.

Project Page: http://drupal.org/project/resource_conflict

File

README.txt
View source
  1. = Resource Conflict =
  2. This module allows for users to detect overlapping dates and respond with Rules.
  3. This is most often used for tracking bookable resources. For example, a student
  4. can book a microscope for use within their lab, but only one microscope can be
  5. booked at a time.
  6. By default, this module throws a form error for every overlapping date it finds
  7. among conflict-enabled nodes. It is intended to be customized using Rules, for
  8. example to only throw errors when certain field values are identical.
  9. == Requirements ==
  10. Entity: http://drupal.org/project/entity
  11. Rules: http://drupal.org/project/rules
  12. Date: http://drupal.org/project/date
  13. == Installation ==
  14. Download the module to your modules directory, and enable it from admin/modules.
  15. You may wish to disable or modify the built in example Rule, which shows a form
  16. error message for conflicts as they are detected.
  17. == Usage ==
  18. 1) Create a content type with a date field.
  19. 2) On the Content Type Edit page, enable Conflict Checking for this Content
  20. Type. Select the date field which should be used for conflict checking, and
  21. save the form.
  22. 3) Create two nodes with overlapping dates to see the default Rule in action. Or
  23. create your own Rule.
  24. Read more on how to setup a Rule to perform conflict checking with respect to a
  25. specific resource here: https://drupal.org/node/2090487
  26. == Included Rules Components ==
  27. EVENT: A RESOURCE CONFLICT WAS DETECTED
  28. This event is triggered any time a resource conflict is detected. By itself,
  29. this event will never fire.
  30. EVENT: A RESOURCE CONFLICT NODE FORM IS VALIDATED
  31. This rule fires during node form validation on Resource Conflict enabled content
  32. types. You should use this event if you want to set form errors, or if you want
  33. to interact with Rules_forms module. It provides both a node object of the node
  34. being created/edited and a form object for use with rules_forms. This is the
  35. event trigger for the default Rule.
  36. CONDITION: CONTAINS A RESOURCE CONFLICT
  37. Evaluate a node object for conflicts. Returns TRUE if there are conflicts for
  38. the node.
  39. ACTION: LOAD A LIST OF CONFLICTING NODES
  40. Creates a list of nodes that conflict with the given node.
  41. ACTION: SET A FORM VALIDATION ERROR
  42. Stores a form validation error to be fired the next time a validation hook is
  43. called on a conflict-enabled node. This is intended for use with the "A Resource
  44. Conflict Node Form is Validated" Event, but you could probably find other
  45. creative uses for it. When this action fires, the next resource conflict enabled
  46. node to go through validation will get a form error on the resource conflict
  47. enabled date field.
  48. == To Do ==
  49. * Setting a form validation error currently works by setting a variable in
  50. $_SESSION, and retrieving it in hook_node_validate. This is open to all
  51. sorts of abuse, and if mis-used properly could throw errors on the wrong
  52. node forms. At the very least, I should set a time expiry on these messages
  53. to avoid accidental abuse. Proper caching would be even smarter.
  54. * Make ANY fieldable entity capable of handling conflict detection.
  55. == Contact ==
  56. This module was originally developed by Andrew Berry (andrewberry@sentex.net)
  57. for use at the Protein Dynamics lab at the University of Guelph.
  58. It was re-written for Rules and Entity integration by Campbell Vertesi
  59. (campbell@vertesi.com) for use on a private project.
  60. Project Page: http://drupal.org/project/resource_conflict