Commit 3c5f0430 authored by Hopt, Oliver's avatar Hopt, Oliver
Browse files

bugfix on cloning for handling references

parent 4a24efab
Pipeline #14986 passed with stage
in 1 minute and 36 seconds
......@@ -1261,9 +1261,9 @@ public class EntityCreationService
InterviewerInstruction cloneInstr = cloneInstruction( toCloneInstr, newContainerId, user, comment );
instructions.put( constr.getInstructionReference(), cloneInstr );
}
clone.setInstructionReference( instructions.get( constr.getInstructionReference() ).getId() );
clone.setInterviewerInstruction( instructions.get( constr.getInstructionReference() ) );
}
clone.setInstructionReference( instructions.get( constr.getInstructionReference() ).getId() );
clone.setInterviewerInstruction( instructions.get( constr.getInstructionReference() ) );
if ( constr.getImplementerInstructionReference() != null
&& !constr.getImplementerInstructionReference().equals( "empty" )
&& !instructions.containsKey( constr.getImplementerInstructionReference() ) )
......@@ -1276,10 +1276,10 @@ public class EntityCreationService
InterviewerInstruction cloneInstr = cloneInstruction( toCloneInstr, newContainerId, user, comment );
instructions.put( constr.getInstructionReference(), cloneInstr );
}
clone.setImplementerInstructionReference(
instructions.get( constr.getImplementerInstructionReference() ).getId() );
clone.setImplementerInstruction( instructions.get( constr.getImplementerInstructionReference() ) );
}
clone.setImplementerInstructionReference(
instructions.get( constr.getImplementerInstructionReference() ).getId() );
clone.setImplementerInstruction( instructions.get( constr.getImplementerInstructionReference() ) );
if ( constr.getUniverseReference() != null && !constr.getUniverseReference().equals( "empty" )
&& !universes.containsKey( constr.getUniverseReference() ) )
{
......@@ -1291,9 +1291,9 @@ public class EntityCreationService
Universe cloneUniv = cloneUniverse( toCloneUniv, newContainerId, user, comment );
universes.put( constr.getUniverseReference(), cloneUniv );
}
clone.setUniverseReference( universes.get( constr.getUniverseReference() ).getId() );
clone.setUniverse( universes.get( constr.getUniverseReference() ) );
}
clone.setUniverseReference( universes.get( constr.getUniverseReference() ).getId() );
clone.setUniverse( universes.get( constr.getUniverseReference() ) );
if ( constr.getQuestionType().contains( "Grid" ) )
{
MultipleQuestionItem toCloneItem = (MultipleQuestionItem) getDdiElementRestCacheClient()
......@@ -1400,9 +1400,9 @@ public class EntityCreationService
InterviewerInstruction cloneInstr = cloneInstruction( toCloneInstr, newContainerId, user, comment );
instructions.put( toClone.getInstructionReference(), cloneInstr );
}
clone.setInstructionReference( instructions.get( toClone.getInstructionReference() ).getId() );
clone.setInstruction( instructions.get( toClone.getInstructionReference() ) );
}
clone.setInstructionReference( instructions.get( toClone.getInstructionReference() ).getId() );
clone.setInstruction( instructions.get( toClone.getInstructionReference() ) );
clone.setBasedOnReference( toClone.getId() );
......@@ -1433,9 +1433,9 @@ public class EntityCreationService
CodeList cloneCodeList = cloneCodeList( toCloneCodeList, newContainerId, user, comment );
codeLists.put( toClone.getAnswerCodeListReference(), cloneCodeList );
}
clone.setAnswerCodeListReference( codeLists.get( toClone.getAnswerCodeListReference() ).getId() );
clone.setCodeList( codeLists.get( toClone.getAnswerCodeListReference() ) );
}
clone.setAnswerCodeListReference( codeLists.get( toClone.getAnswerCodeListReference() ).getId() );
clone.setCodeList( codeLists.get( toClone.getAnswerCodeListReference() ) );
CodeList toCloneItemCodeList = (CodeList) getDdiElementRestCacheClient()
.getElement( toClone.getContainerId(), DDIElement.CODELIST,
......@@ -1457,9 +1457,9 @@ public class EntityCreationService
InterviewerInstruction cloneInstr = cloneInstruction( toCloneInstr, newContainerId, user, comment );
instructions.put( toClone.getInstructionReference(), cloneInstr );
}
clone.setInstructionReference( instructions.get( toClone.getInstructionReference() ).getId() );
clone.setInstruction( instructions.get( toClone.getInstructionReference() ) );
}
clone.setInstructionReference( instructions.get( toClone.getInstructionReference() ).getId() );
clone.setInstruction( instructions.get( toClone.getInstructionReference() ) );
clone.setBasedOnReference( toClone.getId() );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment