id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 1945,It's not possible to create an item and add it to an item list in the same transaction,Nicklas Nordborg,everyone,"This is not possible to reproduce in the web gui, but requires a plug-in or extensions. This was discovered in the ""Reggie"" extensions when registering RNA and at the same time trying to add them to the ""Flagged RNA"" item list. To reproduce: 1. Start transaction 2. Create a new item 3. Load an existing item list (let it be empty to make things easier) 4. Add the item to the item list 5. Commit the transaction Everything should complete without errors. Check the item list in the web gui. It should claim a size of ""1"" but when listing the members it is empty. Further investigations show that 0 has been added as member to list. This happens because the new item starts out with id=0 and doesn't get a real id until the commit in step 5. When the item is added to the list in step 4, 0 is copied to the list and the size is incremented. But since there is no item that has id=0 the list appears to have no members. In BASE 3.4 the linking of members was mapped as relations managed by Hibernate and Hibernate ensured that values were inserted in the correct order into the database. The change in BASE 3.5 (#1325) that enables support for other item types in items lists means that we can't use Hibernate to manage the relations. So, our code needs to be ""smarter"" and detect this kind of issue. There are other parts of the API that doesn't allow unsaved items to be used and throws an exception. But it is not a good solution in this case, since there are existing code that expects things to work more or less as before. We need to fix the item list code so that it put unsaved items on hold and then hooks into the commit phase to make sure that the correct id is inserted into the list.",defect,closed,blocker,BASE 3.5.1,core,,fixed,,