Map Incident / Request / Change states to Task states

Date

2011/08/02

What

Together with Mariliza.

Map Incident, Request, Change (etc.) states to Task states. The goal is to be able to group all Open tickets (for instance). Or all tickets with state "Work in Progress", etc. no matter which table they belong to.

How

There already is a Business Rule for Requests:

  • called req_item_state_map on u_request_fulfillment

Fields used:

Table State field used
Task task.state
Incident incident.incident_state
Requests u_request_fulfillment.u_current_task_state
Change change_request.u_change_state

Available task states:

  • Open
  • Pending
  • Work in Progress
  • Resolved
  • Closed Complete
  • Closed Incomplete
  • Closed Skipped

Mapping proposal:

Incident state Close code Mapping proposal (task state)
New   Open
Assigned   Open
In progress   Work in Progress
Waiting for user   Pending
Waiting for 3rd party   Pending
Waiting for Change   Pending
Waiting for Parent   Pending
Resolved Any Resolved
Closed Restored Closed Complete
Closed Restored (Work Around) Closed Complete
Closed Works as designed Closed Complete
Closed Converted Closed Complete
Closed Not Reproducible Closed Incomplete
Closed Not restored by decision of customer Closed Skipped
Closed Refused Closed Skipped
Closed Handed over to Closed Complete
Closed Spam Closed Skipped
Closed Cancelled Closed Skipped
Closed Other Closed Complete

Request state Closed code Mapping proposal (task state) Previous mapping
New   Open Open
Assigned   Open Open
Accepted     Open
In Progress   Work in Progress Work in Progress
Waiting for user   Pending Pending
Waiting for 3rd party   Pending Pending
Waiting for Project Mgmt   Pending Pending
Waiting for Change Mgmt   Pending Pending
Waiting for Approvals   Pending Pending
Resolved Any Resolved Pending
Closed Any   Closed Complete
Closed Fulfilled Closed Complete  
Closed Handed over to Closed Complete  
Closed Converted Closed Complete  
Closed Invalid Closed Skipped  
Closed Not authorised Closed Skipped  
Closed Not fulfilled by decision of the customer Closed Skipped  
Closed Other Closed Complete  
Closed Refused Closed Skipped  
Closed Spam Closed Skipped  
Closed Cancelled Closed Skipped  
Archived     Closed Complete

Change state Closed code Mapping proposal (task state)
New   Open
Admission   Open
Evaluation   Work in Progress
Approval   Pending
Plan and built   Work in Progress
Test   Work in Progress
Deployment   Work in Progress
Review   Work in Progress
Reviewed   Closed Complete
Rollback   Closed Incomplete
Closed complete   Closed Complete
Closed Complete Closed Complete
Closed Incomplete   Closed Incomplete
Closed Incomplete Closed Incomplete
Closed Rejected   Closed Skipped
Closed Rejected Closed Skipped
Closed Failed   Closed Incomplete
Closed Failed Closed Incomplete

The "existing mapping" is the one set in the * Business Rule.* And the code is:

if ((current.u_current_task_state = 10) || (current.u_current_task_state = 11) ) { // incident state is closed so // 1. mark the task as inactive

current.active = false; }

if ((current.u_current_task_state = 10) || (current.u_current_task_state = 11) ) { // OP: remove Resolved from this state || (current.u_current_task_state = 9)) { // state closed complete

current.state = 3; }

if (current.u_current_task_state = 4) { // state work in progress

current.state = 2; }

if ((current.u_current_task_state = 5) || (current.u_current_task_state = 6) || (current.u_current_task_state = 7) || (current.u_current_task_state = 8) || (current.u_current_task_state = 9)) { // state pending

current.state = -5; }

if ((current.u_current_task_state = 1) || (current.u_current_task_state = 2) || (current.u_current_task_state = 3)) { // state open

current.state = 1; }

Update Set

20110802 SOPH - Map INC/REQ/CH states to TASK state

Issues


-- SophieLemaitre - 04-Aug-2011

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r12 - 2012-04-12 - MarilizaCheimariou
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback