Ok button on Problem

PLakin1
Tera Guru

We've been trying to get back to Out of Box (OoB) for Problem Management and we've made some solid progress, but the OK UI Action is not working correctly for me and I'm trying to understand why.

Before, none of the UI Actions in Problem had been working for me and I was able to find some missing Script Includes that were causing the problem.

Since adding all the Script Includes that mention Problem in their name I've got all the buttons working except for the OK button that appears in the Popups. For instance:

find_real_file.png

In my personal instance the OK button works fine, in our DEV instance two things stand out. The OK button doesn't work and multiple other buttons appear that we don't want to. We only want OK and Cancel to show up, but our DEV box looks like this:

find_real_file.png

Any assistance identifying what is causing this would be appreciated.

1 ACCEPTED SOLUTION

All,

Even though it isn't referenced directly in the OK button, and didn't seem to affect the other buttons, it was the ProblemUtilsClientSNC Script Include that fixed the OK button for me. Somehow it didn't show in the original filtered list I used to compare the two instances.

I still need to figure out how to make the other buttons go away though (Save, Assess, etc) on the popup window, but I'll open another question for that.

Thank you all for your help!

View solution in original post

5 REPLIES 5

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

This is a UI PAge. Try checking that.

Thanks,
Ashutosh

Actually this is NOT a UI page.  Its a modal of the problem form using a different view.  While viewing a problem as admin, right click choose Views and you will see one for each of the states of problem.  For example the one above is "Assess Dialog Form View".

 

@PLakin All of this is controlled by a UI Script named ProblemModalUIHelpers.  I would look at the version history to see if this may have been edited and revert if necessary.

I agree that they are versions of views. I recreated each of the views from my personal instance so that the popups would have the correct fields when the buttons were pushed, but the popups themselves work fine, it's only the OK button I'm currently having trouble with.

ProblemModalUIHelpers is one of the XML files I copied over from my personal instance to fix the other buttons (Assess, Confirm, etc). However, I have a feeling there's another Script Include I'm missing to make the OK button function correctly. The OK button uses an almost identical snippet of code as the other buttons except for the bolded portion below:

function onOk() {
var view = g_form.getViewName();
if(parent.name != "gsft_main" && (parent.$j.find("#" + view).length == 0)) {
g_form.addErrorMessage(getMessage("Action not available here"));
return;
}

if(g_form.mandatoryCheck()) {
ScriptLoader.getScripts("ProblemModalUIHelpers.jsdbx", function() {
ProblemModalUIHelpers.onOk("problem");
});
}
}

The other buttons work accurately and I believe it is because of the view that statement the button isn't working accurately. 

Any help is appreciated.

Thank you

All,

Even though it isn't referenced directly in the OK button, and didn't seem to affect the other buttons, it was the ProblemUtilsClientSNC Script Include that fixed the OK button for me. Somehow it didn't show in the original filtered list I used to compare the two instances.

I still need to figure out how to make the other buttons go away though (Save, Assess, etc) on the popup window, but I'll open another question for that.

Thank you all for your help!