Move createOpenItemId method from controller to model.