Disable Problem Closure untill related change is Closed (131 Views)
Reply
Trusted Contributor
Posts: 331
Registered: ‎01-25-2011
Message 1 of 4 (131 Views)

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

Honored Contributor
Posts: 4,374
Registered: ‎06-17-2010
Message 2 of 4 (112 Views)

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
Posts: 331
Registered: ‎01-25-2011
Message 3 of 4 (104 Views)

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
Posts: 4,374
Registered: ‎06-17-2010
Message 4 of 4 (94 Views)

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.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.