teamMember.setRole("owner");
teamMember.setPerson(person);
teamMember.setTeam(team);
PmDeployment.instance().persist(teamMember, em, context);
ItemGroup ig = new ItemGroup();
ig.setName("Itemgroup 2");
ig.setProduct(product);
product.getItemGroup().add(ig);
PmDeployment.instance().persist(ig, em, context);
item = new Item();
item.setSummary("Item 4.2 summary");
item.setEffort(new Integer(14));
item.setItemKey("P1-2");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("brevbirvdncvenrclndc");
item.setItemType(ItemType.FEATURE);
//item.setNextId(prevItem.getId());
item.setItemGroup(ig);
ig.getItem().add(item);
PmDeployment.instance().persist(item, em, context);
prevItem = item;
item = new Item();
item.setSummary("Item 4.1 summary");
item.setEffort(new Integer(10));
item.setItemKey("P1-3");
cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(System.currentTimeMillis() + (3*24*60*60*1000));
item.setDueDate(cal);
item.setDescription("xxxxxxxxxxxxxx\nyyyyyyyyyyyyy");
item.setItemType(ItemType.FEATURE);
item.setNextId(prevItem.getId());
item.setItemGroup(ig);
ig.getItem().add(item);
PmDeployment.instance().persist(item, em, context);
ItemGroup prevItemGroup = ig;
ig = new ItemGroup();
ig.setName("Itemgroup 1");
ig.setProduct(product);
ig.setNextId(prevItemGroup.getId());
product.getItemGroup().add(ig);
PmDeployment.instance().persist(ig, em, context);
Issue issue = new Issue();
issue.setSummary("Issue 5.1");