File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
src/main/java/org/woehlke/simpleworklist Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ public String addNewProjectToProjectIdPersist(
8181 } else {
8282 Project thisProject = projectService .findByProjectId (projectId );
8383 project = thisProject .addOtherProjectToChildren (project );
84+ project .setContext (context );
8485 project = projectService .add (project );
8586 thisProject = projectService .update (thisProject );
8687 log .info ("project: " + project .toString ());
@@ -129,6 +130,7 @@ public String addNewProjectToProjectRootPersist(
129130 Model model
130131 ) {
131132 log .info ("addNewProjectToRootPersist" );
133+ project .setContext (context );
132134 project = projectService .add (project );
133135 userSession .setLastProjectId (project .getId ());
134136 model .addAttribute ("userSession" , userSession );
Original file line number Diff line number Diff line change @@ -81,11 +81,13 @@ public Project findByProjectId(@Min(1L) long projectId) {
8181 public Project add (@ NotNull Project entity ) {
8282 log .info ("saveAndFlush" );
8383 entity .setUuid (UUID .randomUUID ().toString ());
84+ /*
8485 if(entity.getContext()!=null){
8586 if(entity.getContext().getUuid() == null){
8687 entity.getContext().setUuid(UUID.randomUUID().toString());
8788 }
8889 }
90+ */
8991 return projectRepository .saveAndFlush (entity );
9092 }
9193
Original file line number Diff line number Diff line change 1010import org .woehlke .simpleworklist .user .session .UserSessionBean ;
1111
1212import javax .validation .constraints .NotNull ;
13+ import java .util .UUID ;
1314
1415@ Slf4j
1516@ Service
@@ -32,13 +33,13 @@ public String transformTaskIntoProjectGet(
3233 Project thisProject = new Project ();
3334 thisProject .setName (task .getTitle ());
3435 thisProject .setDescription (task .getText ());
35- thisProject .setUuid (task .getUuid ());
3636 thisProject .setContext (task .getContext ());
3737 if (task .getProject () != null ) {
3838 long projectId = task .getProject ().getId ();
3939 Project parentProject = projectService .findByProjectId (projectId );
4040 thisProject .setParent (parentProject );
4141 }
42+ thisProject .setContext (task .getContext ());
4243 thisProject = projectService .add (thisProject );
4344 task .setProject (null );
4445 task .moveToTrash ();
You can’t perform that action at this time.
0 commit comments