Re: Suppress copy Task prompt when copying Change (303 Views)
Reply
Advisor
alchn
Posts: 17
Registered: ‎07-11-2012
Message 1 of 3 (334 Views)
Accepted Solution

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.

Please use plain text.
Honored Contributor
-m-
Posts: 989
Registered: ‎02-22-2011
Message 2 of 3 (313 Views)

Re: Suppress copy Task prompt when copying Change

Please use plain text.
Advisor
alchn
Posts: 17
Registered: ‎07-11-2012
Message 3 of 3 (303 Views)

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.

}

 

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