readme.txt 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --- Customization of the portal
  2. This is the way it is working now and is highly subject to change...
  3. Configuration (itop-config.php)
  4. ===============================
  5. portal_tickets: CSV value to specify which ticket classes are enabled (default to 'UserRequest')
  6. Common constants (XML)
  7. ======================
  8. PORTAL_POWER_USER_PROFILE: Name of the profile that determines who can see the ticket of her organization (not only the tickets she is caller for)
  9. PORTAL_SERVICECATEGORY_QUERY: OQL to list the services (parameters available: org_id)
  10. PORTAL_SERVICE_SUBCATEGORY_QUERY: OQL to list the service subcategories (parameters available: org_id, svc_id)
  11. PORTAL_VALIDATE_SERVICECATEGORY_QUERY: OQL to check the service again (security against malicious HTTP POSTs)
  12. PORTAL_VALIDATE_SERVICESUBCATEGORY_QUERY: OQL to check the service again (security against malicious HTTP POSTs)
  13. PORTAL_ALL_PARAMS: parameters that the wizard will kindly propagate through its pages (mixing should not be a problem, default value could be cleaned a little...)
  14. PORTAL_SET_TYPE_FROM: attribute of the class ServiceSubcategory determining the request type
  15. PORTAL_TYPE_TO_CLASS: optional mapping from the request types to ticket classes
  16. PORTAL_TICKETS_SEARCH_CRITERIA: comma separated list of search criteria (attcodes) for closed tickets
  17. PORTAL_TICKETS_SEARCH_FILTER_attcode: an OQL query to limit the list of values available in the search form (drop-down list). One define per entry in PORTAL_TICKETS_SEARCH_CRITERIA
  18. Caution: Hardcoded stuff
  19. ========================
  20. Classes Service and ServiceSubcategory
  21. A user can update a ticket (new/assigned)
  22. A user can close a ticket (resolved) (user_satisfaction is hardcoded though user_comment is not)
  23. Constants depending on the class of ticket
  24. ==========================================
  25. For each ticket class enabled, you will have to define these constants:
  26. PORTAL_<TICKET-CLASS>_PUBLIC_LOG: name of the public log attribute
  27. PORTAL_<TICKET-CLASS>_USER_COMMENT: name of the user comment attribute (legacy, used to be user_commmmment)
  28. PORTAL_<TICKET-CLASS>_FORM_ATTRIBUTES: attributes proposed to the end-user in the edition form
  29. PORTAL_<TICKET-CLASS>_TYPE: optional attribute to be set with the value of "request type"
  30. PORTAL_<TICKET-CLASS>_LIST_ZLIST: list of attribute displayed in the lists (opened and resolved)
  31. PORTAL_<TICKET-CLASS>_CLOSED_ZLIST: list of attribute displayed in the list of closed tickets
  32. PORTAL_<TICKET-CLASS>_DETAILS_ZLIST: selection and presentation of attributes in the page that shows their details
  33. PORTAL_<TICKET-CLASS>_DISPLAY_QUERY: selection of displayable objects (use parameters contact->attcode to check things against the user/contact)
  34. PORTAL_<TICKET-CLASS>_DISPLAY_POWERUSER_QUERY: selection of displayable objects for power users (use parameters contact->attcode to check things against the user/contact)
  35. How to add a type of ticket (example: Incident)
  36. ===============================================
  37. 1) Add it to the list of supported tickets classes: itop-config.php/portal_tickets
  38. 2) Define PORTAL_SET_TYPE_FROM (if not already done) as the attribute of ServiceSubcategory, that will define the request type, depending on the user selection
  39. 3) Map the different values of this request type (in class ServiceSubcategory) to the supported ticket classes
  40. YOU MUST MAKE SURE THAT ANY OF THE VALUE HAS A MAPPING SO AS TO EXCLUDE SUBCATEGORIES IF THE CORRESPONDING CLASS ARE NOT ENABLED IN THE CONFIG.
  41. 4) Make sure that the queries PORTAL_SERVICE_SUBCATEGORY_QUERY and PORTAL_VALIDATE_SERVICESUBCATEGORY_QUERY will not exclude the expected type
  42. 5) Define the various constants for this class (PORTAL_<MY-CLASS>_XXXX).
  43. 6) Adjust PORTAL_TICKETS_SEARCH_CRITERIA. Those criteria are common to all types of tickets. Giving too many criteria can lead to confusion.
  44. 7) Test, test and re-test!!!
  45. How to copy the request type to the ticket
  46. ==========================================
  47. 1) Define PORTAL_SET_TYPE_FROM (if not already done) as the attribute of ServiceSubcategory, that will define the request type, depending on the user selection
  48. 2) Define PORTAL_<TICKET-CLASS>_TYPE as the tiket attribute code to which the request type will be copied as is. There is no mapping.
  49. Behavior of the lists when handling several types of tickets
  50. ============================================================
  51. There are three lists: opened tickets, resolved tickets and closed tickets.
  52. The following explanation applies to any of those lists.
  53. * If no item has been found, one single message is displayed (no request of this category).
  54. * If a number of items of only one category have been found, the list is displayed as is.
  55. * Otherwise, there are several types of tickets to display. Each sub-list is preceeded by the name of the corresponding class.