Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..
196 views

(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; }}

Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.