Analysis Information tab show on all PTASKs when Closed (but not Open) should only show on RCA PTASK

Ben28
Tera Contributor

We've noticed a bug or defect in our Problem Management process with PTASKs. Initially we started out with just RCA PTASKs for Problem Owners, but have since expanded out to assign CAPAs using General PTASKs. We've noticed that the Analysis Information tab is showing up on the General PTASKS when they are closed, although not when open

There is a client script, called "Display RCA task specific sections" which I think is OoTB, and which says the analysis_information should only display on the rca problem_task_type, otherwise it should be hidden (false). Can anyone think of why this might not be working correctly?

The 2nd line of not showing close_notes on the rca ptask type, or showing it on other ptask types does work correctly.

function onLoad() {
   if (g_form.getValue('problem_task_type') == 'rca') {
	   g_form.setSectionDisplay('analysis_information', true);
	   g_form.setDisplay('close_notes', false);
   }
   else {
	   g_form.setSectionDisplay('analysis_information', false);
	   g_form.setDisplay('close_notes', true);
   }
   if (g_form.getValue('problem_task_type') == 'rca' && g_form.getValue('close_code') == 'canceled')
	   g_form.setDisplay('close_notes', true);
}

Ben28_0-1740174235199.pngBen28_1-1740174246646.png

 

 

 

3 REPLIES 3

Martin Friedel
Mega Sage

Hello Ben28,

 

in the second screenshot I see you have some field in the Analysis Information tab set as mandatory (by asterisk character)

mandatory.JPG

OOB logic works like when some form element is mandatory, it can't be hidden. Therefore code 

g_form.setSectionDisplay('analysis_information', false);

is not executed and tab is not hidden.

 

If my answer helped you, please accept it as correct and mark helpful, thank you 👍
Martin

Hi Martin,

Thanks for the reply. I'll check the form, I know we have data policies and UI policies that force mandatory entry on certain task types.

Do you know why this only appears when the form is closed? Presumably the OOTB logic for mandatory elements should work on both open & closed PTASKs? I couldn't see anything in the code that  or the way the client script is setup that says to only work this way when the PTASK is closed!

The other weird thing is, we have 3 environments, DEV, QA, and PROD. This issue only seems to appear in QA & PROD, not in DEV, despite all the being clones.

Siris
Tera Contributor

Thanks, We've noticed that the Analysis Information tab is not showing up on the General PTASKS, and deactivating  client script, called "Display RCA task specific sections"  helped to solve the issue.