Make Cause Code Mandatory During PTASK Transition from Work in Progress to Complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
Currently, the Cause Code field on a Problem Task (PTASK) form is enforced only at the time of resolution, which creates a fragmented workflow. Here’s the issue:
- When a user attempts to resolve a PTASK, they first encounter the Close Note prompt.
- After completing that, they hit a mandatory field validation error for Cause Code.
- This forces them to abandon the resolution process, manually navigate back, populate Cause Code, and restart the resolution attempt.
This approach is inefficient and frustrating for users.
So to avoid this we want to make
Make the Cause Code field mandatory during the state transition from Work in Progress to Complete. This ensures:
- The field is addressed upfront.
- The resolution workflow is streamlined.
- Users avoid unnecessary steps and errors.
I have tried of UI policy and on change client script still the cause code is not mandating before the prompt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I am unable to view the contents of your screenshot for some reason, but this doesn't sound like an out of box process. In my Zurich PDI when I click the Complete button on an RCA Problem Task Record, I get a dialog box with the Cause notes and Proposed fix notes mandatory, and a Cause Code optional.
When I populate the two mandatory values then click OK, the Problem Task is in the Completed state. Have something been done in your instance to make Cause Code mandatory? Is Cause Code mandatory on a General type Problem Task, on which the Analysis section containing the Cause Code is not even displayed out of box? Are you testing this with a RCA Problem Task or General?
If you add a line to the Complete UI Action record that is on the problem_task table, it will enforce this prior to the dialog window:
function moveToClosedComplete() {
g_form.setMandatory('cause_code', true);
if (g_form && g_form.mandatoryCheck()) {
ScriptLoader.getScripts("ProblemModalUIHelpers.jsdbx", function() {
ProblemModalUIHelpers.ProblemTask_MoveToClosedComplete();
});
}
}
If you only want this on RCA tasks, it will look like this:
function moveToClosedComplete() {
if (g_form.getValue('problem_task_type') == 'rca') {
g_form.setMandatory('cause_code', true);
}
if (g_form && g_form.mandatoryCheck()) {
ScriptLoader.getScripts("ProblemModalUIHelpers.jsdbx", function() {
ProblemModalUIHelpers.ProblemTask_MoveToClosedComplete();
});
}
}