Purpose
ucEditClone is called during the issue clone process, after the new database objects have been set up but before rendering the edit screen for the new issue
Applies To
Edit Issue screen
Signature
public void ucEditClone (
Problem item, // the item or case
ArrayList releases, // the list of releases
ArrayList modules, // the list of modules
ArrayList udfs, // the list of UDF's
SesameSession session, // the current session
Connection con, // DB connection for ExtraView db.
String parentId, // id of the cloning bug
String clonedId, // new id of the cloned bug.
HashMap values) // the selected values from the form
Notes
Example
In this example, if the record is in the Resolved Status, upon executing a clone, then it’s moved to Closed.
public void ucEditClone (
Problem item, // the item or case
ArrayList releases, // the list of releases
ArrayList modules, // the list of modules
ArrayList udfs, // the list of UDF's
SesameSession session, // the current session.
Connection con, // DB connection for ExtraView db.
String parentId, // id of the cloning bug
String clonedId, // new id of the cloned bug.
HashMap values) { // the selected values from the form
String area = item.getAreaId();
String project = item.getProjctId();
if (AREA__BUGS.equals(area) && PROJ__BUGS_DATA.equals(project) )
{
String status = (String) values.get("STATUS");
// If the status is Resolved when we clone the record, go ahead and close it
if (status != null && "RESOLVED".equals(status) ) {
values.put("STATUS", "CLOSED");
}
}
}