Disable Problem Closure untill related change is Closed (76 Views)
Reply
Trusted Contributor
hpsmsupport
Posts: 299
Registered: ‎01-25-2011
Message 1 of 4 (76 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

Please use plain text.
Honored Contributor
Piku
Posts: 3,908
Registered: ‎06-17-2010
Message 2 of 4 (57 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.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/5677925#U5677925
Please use plain text.
Trusted Contributor
hpsmsupport
Posts: 299
Registered: ‎01-25-2011
Message 3 of 4 (49 Views)

Re: Disable Problem Closure untill related change is Closed

Thanks Piku,

 

Can you please help me with the script if possible.

 

Regards,

Madhan

Please use plain text.
Honored Contributor
Piku
Posts: 3,908
Registered: ‎06-17-2010
Message 4 of 4 (39 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.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/5677925#U5677925
Please use plain text.
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