Disable Problem Closure untill related change is Closed (97 Views)
Reply
Trusted Contributor
Posts: 323
Registered: ‎01-25-2011
Message 1 of 4 (97 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,281
Registered: ‎06-17-2010
Message 2 of 4 (78 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: 323
Registered: ‎01-25-2011
Message 3 of 4 (70 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,281
Registered: ‎06-17-2010
Message 4 of 4 (60 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.