(SM) Support Tip: Copy record option should be disabled for a close task that has a closed change

In the Change Module.
Enter in a task that is closed (and parent change is closed as well)
Go to More, "copy record" option. Save task
SM creates an open task in a parent change that is closed.
Copy record option should be disabled for a close task that has a close parent change

R&D Created Change Request QCCR1E145903 to be fix in the future SM release and if a hotfix is needed, a provide the timeline template is required

In the meanwhile a workaround is available so The "COPY RECORD" only shows up for the tasks when the parent change is not closed

1. In command line> Type do
2. Screen ID: change.view
3- Default label > Copy Record
3. Condition: remove the OOB condition and add: $L.tableAccess.expert and $L.tableAccess.new and nullsub($G.ess, false)=false and (filename($file)~="cm3t" or $L.parent.open)
4. Save > ok

5. In command line> Type ds
6. Screen ID: change.view
7. In main> Initialization please paste the following:
if (filename($L.filed)="cm3t") then ($L.parent.open=jscall("mfChange.getparentstatus", parent.change in $L.filed))
8. Save > ok

Create new ScriptLibrary
ScriptLibrary: mfChange

/* Validate status of Parent Change for a Task              */
/* @param1 : Parent Change number                           */
function getparentstatus(changenumber)
{ var parentopen=false;
  var parentchange=changenumber;
  var change= new SCFile("cm3r");
 var querySQL = "number=\"" parentchange "\"";
 if (change.doSelect(querySQL) == RC_SUCCESS)
  { if (change.status!="closed")  {parentopen=true; } return parentopen; }}

 if (change.doSelect(querySQL) == RC_SUCCESS)
  { if (change.status!="closed")  {parentopen=true; } return parentopen; }}