id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 2014,Implement extension point for item initialization,Nicklas Nordborg,everyone,"When creating new items, the BASE core API initializes some properties in different stages. Typically a name and maybe some other properties are set when the `getNew()` method is called. Other properties are set just before the item is saved to the database when calling `DbControl.commit()`. For example: * Project default settings such as protocols and software * Owner of the item * Sharing the item to the active project Typically the above properties are only set if the client application has not already explicitly set them to something else (including null). We should implement an extensions point that allows extensions to hook into item creation and set default properties for other scenarios. There are some alternative to where this hook should be: * In the `getNew()` method. This might not be the best place since the extensions can't make decisions based on other properties (for example, do X when a sample is of type A and Y when the sample is of type B). * When calling `DbControl.saveItem()`. Typically most properties are set when this method is called, but client application may make changes after calling this method so the drawbacks are more or less the same as above. * When calling `DbControl.commit()` but before the other default properties are set. * When calling `DbControl.commit()` but after the other default properties are set. ",task,new,major,BASE Future Release,core,,,,