Friday, June 30, 2006

How to create a % complete progress bar against a req in a portal?

Add 2 new fields:
  • percentage complete
  • colour source
Need to add in another "percentage complete" field rather than OOTB field because need to add default value of zero which the OOTB field does not provide.

Colour Source must have a validation consisting of "RED, YELLOW, GREEN" values.

Modify the custom portlet to include reference to:
SELECT a.request_id REQUEST_ID, f.status_name WORKFLOW_STATUS, c.description PROJECT_TITLE, b.request_type_name REQUEST_TYPE, c.priority_code PRIORITY, a.request_id REQUEST_ID_HYPERLINK, d.parameter1 RAG, g.full_name CREATED_BY, a.creation_date CREATION_DATE, d.visible_parameter41 IDEA, d.visible_parameter20 BUSINESS_SPONSOR, c.application APPLICATION, a.visible_parameter3 PREFERRED_ETA, a.visible_parameter4 SPECIFICATION_WRITER, a.visible_parameter42 BRIEF_JUSTIFICATION, a.visible_parameter5 PROJECT_MANAGER, a.visible_parameter10 CONTRIBUTORS, a.visible_parameter6 ETA_FOR_REQUIREMENTS, a.visible_parameter11 APPROVERS, a.visible_parameter7 ETA_FOR_JUSTIFICATION, a.visible_parameter26 CHANGE_TYPE, a.visible_parameter12 ETA_FOR_PID, a.visible_parameter13 ETA_FOR_PROJECT_DELIVERY, a.visible_parameter20 ETA_ON_TEST, a.visible_parameter19 ETA_FOR_PROJ_INITIATION, d.visible_parameter2 PERCENTAGE_COMPLETE, d.parameter1 COLOUR_SOURCE
FROM kcrt_request_details a, kcrt_request_types b, kcrt_requests c, kcrt_req_header_details d, kcrt_statuses f, knta_users g
WHERE a.batch_number = 1
AND a.request_type_id = 30604
AND a.request_id = c.request_id
AND a.request_id = d.request_id
AND c.request_id = d.request_id
AND a.request_type_id = b.request_type_id
AND a.request_type_id = c.request_type_id
AND c.status_id = f.status_id
AND c.created_by = g.user_id
AND c.request_id in (
SELECT c.request_id
FROM kcrt_requests c
WHERE c.status_code NOT LIKE 'CLOSED%'
AND c.status_code NOT LIKE 'CANCEL%')

Then, modify the custom portlet so that it looks like:
Column Title: % complete
Column Type: Progress Bar
Percentage Source: Percentage Complete <-- new field added into data source
Color Source: Colour Source < -- new field added into data source

Save everything!!
The progress bar works in conjunction with the RAG status values.

An end user gives a request a RAG status of "amber", they then fill in 50% complete in the percentage complete field.
This will translate into a coloured progress bar in the portlet.

0 Comments:

Post a Comment

<< Home