HPE Service Manager / Service Center Support and News Forum
Showing results for 
Search instead for 
Do you mean 

Suppress copy Task prompt when copying Change

SOLVED
Go to Solution
Highlighted
Advisor

Suppress copy Task prompt when copying Change

When using 'Copy Record' to copy Change, if the original ticket have associated task, upon saving SM7.11 will prompt

 

    "The original change has 1 associated task(s). Copy and open them?"

 

In our environment the tasks are not supposed to be copied over, so I am required to change this behaviour such that the prompt will not display at all. Is there a way to do this?

 

Please help, thanks in advance.

1 ACCEPTED SOLUTIONS
Honored Contributor

Re: Suppress copy Task prompt when copying Change

2 REPLIES
Honored Contributor

Re: Suppress copy Task prompt when copying Change

Advisor

Re: Suppress copy Task prompt when copying Change

[ Edited ]

Thanks, I figured out a solution similar to your sugggestion in the first link, just instead of not assigning to $L.copy.number in Final Expression, I cleared it out in Final Javascript because I got others customisation codes there. My codes are something like this:

 

Process: cm.copyopen

Final Javascript:

 

if ( ...test that this is from my own customized displayoption Copy Record )

{

   // do other customisation works here, copy attachments, copy associated CIs etc etc...

  .....

 

  // After all the copying is done, clear ori CR's id from $L.copy.number,

  // to bypass the check/prompt to copy tasks from ori CR.

   system.vars.$L_copy_number=null;

}

else

{

   // Do nothing, to not disturb any other part that might need the original functionlity.

}