Guest User

Untitled

a guest
Jul 9th, 2015
200
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set(%Lifecycles,
  2. default => {
  3. initial => [ 'new' ],
  4. active => [ 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment'],
  5. inactive => [ 'resolved', 'Dispatched', 'rejected', 'deleted' ],
  6.  
  7. defaults => {
  8. on_create => 'new',
  9. on_merge => 'resolved',
  10. approved => 'open',
  11. denied => 'rejected',
  12. reminder_on_open => 'open',
  13. reminder_on_resolve => 'resolved',
  14. },
  15.  
  16. transitions => {
  17. "" => [qw(new open resolved)],
  18.  
  19. # from => [ to list ],
  20. 'new' => ['open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'resolved', 'Dispatched', 'rejected', 'deleted'],
  21. 'open' => ['new', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'resolved', 'Dispatched', 'rejected', 'deleted'],
  22. 'stalled' => ['new', 'open', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  23. 'Awaiting Collection' => ['new', 'open', 'stalled', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  24. 'Awaiting Unit' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  25. 'Unit Received / Diagnostics' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  26. 'FMIP Active / Passcode Required' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  27. 'Awaiting Authorisation' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  28. 'Awaiting EUCL' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  29. 'Awaiting GSX' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  30. 'Awaiting Parts' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  31. 'Repair Complete' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Awaiting Shipment', 'rejected', 'resolved', 'Dispatched', 'deleted'],
  32. 'Awaiting Shipment' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete' , 'rejected', 'resolved', 'Dispatched', 'deleted'],
  33. 'resolved' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'Dispatched', 'rejected', 'deleted'],
  34. 'Dispatched' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'resolved', 'deleted'],
  35. 'rejected' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'resolved', 'Dispatched', 'deleted'],
  36. 'deleted' => ['new', 'open', 'stalled', 'Awaiting Collection', 'Awaiting Unit', 'Unit Received / Diagnostics', 'FMIP Active / Passcode Required','Awaiting Authorisation','Awaiting EUCL', 'Awaiting GSX', 'Awaiting Parts', 'Repair Complete', 'Awaiting Shipment', 'rejected', 'Dispatched', 'resolved'],
  37. },
  38. rights => {
  39. '* -> deleted' => 'DeleteTicket',
  40. '* -> *' => 'ModifyTicket',
  41. },
  42. actions => [
  43. 'new -> open' => { label => 'Open It', update => 'Respond' }, # loc{label}
  44. 'new -> resolved' => { label => 'Resolve', update => 'Comment' }, # loc{label}
  45. 'new -> rejected' => { label => 'Reject', update => 'Respond' }, # loc{label}
  46. 'new -> deleted' => { label => 'Delete', }, # loc{label}
  47. 'open -> stalled' => { label => 'Stall', update => 'Comment' }, # loc{label}
  48. 'open -> resolved' => { label => 'Resolve', update => 'Comment' }, # loc{label}
  49. 'open -> rejected' => { label => 'Reject', update => 'Respond' }, # loc{label}
  50. 'stalled -> open' => { label => 'Open It', }, # loc{label}
  51. 'resolved -> open' => { label => 'Re-open', update => 'Comment' }, # loc{label}
  52. 'rejected -> open' => { label => 'Re-open', update => 'Comment' }, # loc{label}
  53. 'deleted -> open' => { label => 'Undelete', }, # loc{label}
  54. ],
  55. },
  56. # don't change lifecyle of the approvals, they are not capable to deal with
  57. # custom statuses
  58. approvals => {
  59. initial => [ 'new' ],
  60. active => [ 'open', 'stalled' ],
  61. inactive => [ 'resolved', 'rejected', 'deleted' ],
  62.  
  63. defaults => {
  64. on_create => 'new',
  65. on_merge => 'resolved',
  66. reminder_on_open => 'open',
  67. reminder_on_resolve => 'resolved',
  68. },
  69.  
  70. transitions => {
  71. '' => [qw(new open resolved)],
  72.  
  73. # from => [ to list ],
  74. new => [qw(open stalled resolved rejected deleted)],
  75. open => [qw(new stalled resolved rejected deleted)],
  76. stalled => [qw(new open rejected resolved deleted)],
  77. resolved => [qw(new open stalled rejected deleted)],
  78. rejected => [qw(new open stalled resolved deleted)],
  79. deleted => [qw(new open stalled rejected resolved)],
  80. },
  81. rights => {
  82. '* -> deleted' => 'DeleteTicket',
  83. '* -> rejected' => 'ModifyTicket',
  84. '* -> *' => 'ModifyTicket',
  85. },
  86. actions => [
  87. 'new -> open' => { label => 'Open It', update => 'Respond' }, # loc{label}
  88. 'new -> resolved' => { label => 'Resolve', update => 'Comment' }, # loc{label}
  89. 'new -> rejected' => { label => 'Reject', update => 'Respond' }, # loc{label}
  90. 'new -> deleted' => { label => 'Delete', }, # loc{label}
  91. 'open -> stalled' => { label => 'Stall', update => 'Comment' }, # loc{label}
  92. 'open -> resolved' => { label => 'Resolve', update => 'Comment' }, # loc{label}
  93. 'open -> rejected' => { label => 'Reject', update => 'Respond' }, # loc{label}
  94. 'stalled -> open' => { label => 'Open It', }, # loc{label}
  95. 'resolved -> open' => { label => 'Re-open', update => 'Comment' }, # loc{label}
  96. 'rejected -> open' => { label => 'Re-open', update => 'Comment' }, # loc{label}
  97. 'deleted -> open' => { label => 'Undelete', }, # loc{label}
  98. ],
  99. },
  100. );
RAW Paste Data