continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r582855 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Date Mon, 08 Oct 2007 15:56:15 GMT
Author: evenisse
Date: Mon Oct  8 08:56:14 2007
New Revision: 582855

URL: http://svn.apache.org/viewvc?rev=582855&view=rev
Log:
[CONTINUUM-1512] Fix constraint violation exception dele"ting a project group after to move
all its built projects to an other group

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=582855&r1=582854&r2=582855&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Mon Oct  8 08:56:14 2007
@@ -21,6 +21,7 @@
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectDependency;
 import org.apache.maven.continuum.model.project.ProjectGroup;
@@ -346,6 +347,14 @@
                 getLogger().info(
                     "Moving project " + project.getName() + " to project group " + newProjectGroup.getName()
);
                 project.setProjectGroup( newProjectGroup );
+
+                //CONTINUUM-1512
+                Collection<BuildResult> results = getContinuum().getBuildResultsForProject(
project.getId() );
+                for ( BuildResult br : results )
+                {
+                    getContinuum().removeBuildResult( br.getId() );
+                }
+
                 getContinuum().updateProject( project );
             }
         }



Mime
View raw message