//issue.setNextId(prevItem.getId());
issue.setItemGroup(ig);
ig.getItem().add(issue);
PmDeployment.instance().persist(issue, em, context);
Action action = new Action();
action.setActionType(ActionType.STATUS_CHANGED);
action.setActionStatus(ItemActionStatus.CLOSED);
action.setItem(issue);
PmDeployment.instance().persist(action, em, context);
Issue prevIssue = issue;
issue = new Issue();
issue.setSummary("Issue 5.2 - 09:10:52,515 INFO [SessionSpecContainer]");
issue.setEffort(new Integer(1));
issue.setItemKey("P1-8");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (1*24*60*60*1000));
issue.setDueDate(cal);
issue.setDescription("09:10:52,515 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=melitronicRM.ear,jar=rmDom.jar,name=DmProduct,service=EJB3\n09:10:52,531 INFO [EJBContainer] STARTED EJB: com.melitronic.domain.product.DmProduct ejbName: DmProduct");
issue.setItemType(ItemType.IMPROVEMENT);
issue.setPriority(IssuePriority.MEDIUM);
issue.setResolution(IssueResolution.UNRESOLVED);
issue.setNextId(prevIssue.getId());
issue.setItemGroup(ig);
ig.getItem().add(issue);
PmDeployment.instance().persist(issue, em, context);
action = new Action();
action.setActionType(ActionType.STATUS_CHANGED);
action.setActionStatus(ItemActionStatus.OPEN);
action.setItem(issue);
PmDeployment.instance().persist(action, em, context);
Action prevAction = action;
action = new Action();
action.setActionType(ActionType.ASSIGNED_TO);
action.setPerson(person);
action.setNextId(prevAction.getId());
action.setItem(issue);
PmDeployment.instance().persist(action, em, context);
prevAction = action;
action = new Action();
action.setActionType(ActionType.ADDED_COMMENT);
action.setComment("Ihan turha juttu");
action.setNextId(prevAction.getId());
action.setItem(issue);
PmDeployment.instance().persist(action, em, context);
prevAction = action;
action = new Action();
action.setActionType(ActionType.STATUS_CHANGED);
action.setActionStatus(ItemActionStatus.CLOSED);
action.setNextId(prevAction.getId());
action.setItem(issue);
PmDeployment.instance().persist(action, em, context);
ImplementationPhase ip = new ImplementationPhase();