Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Disable Problem Closure untill related change is Closed

Trusted Contributor

Disable Problem Closure untill related change is Closed

Hi Experts,

 

I have a requirement to Disable Problem ticket Closure untill related change is Closed.

 

Thanks in advance for your support.

 

Regards,

Madhan

3 REPLIES
Honored Contributor Honored Contributor

Re: Disable Problem Closure untill related change is Closed

Hi ,

You can hide the close button by checking the status of any related change.
You can call JS in condition of 'close' display option which will return true or false based of status of any related change.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Trusted Contributor

Re: Disable Problem Closure untill related change is Closed

Thanks Piku,

 

Can you please help me with the script if possible.

 

Regards,

Madhan

Honored Contributor Honored Contributor

Re: Disable Problem Closure untill related change is Closed

HI Madhan,

Use below condition your display do,

<existing condition> and jscall("Check_CR.crstatus", id in $L.filed)

Create a JS named Check_CR having function crstatus() as below,

function crstatus(crnumber)
{
var pm = pmnumber ;
var scfile = new SCFile('screlation');
var query = "(source = \"" + pm + "\" and depend.filename=\"cm3r\" and depend.active=\"true\") or (depend.filename\"rootcause\" and depend = \"" + pm + "\" and depend.filename=\"depend.filename\" and source.active=\"true\")"

var scselect = scfile.doSelect(query);

if (scselect == RC_SUCCESS)
{ return false}
else
{ return true}

}

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.