continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r574355 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Date Mon, 10 Sep 2007 20:08:18 GMT
Author: olamy
Date: Mon Sep 10 13:08:18 2007
New Revision: 574355

URL: http://svn.apache.org/viewvc?rev=574355&view=rev
Log:
[CONTINUUM-1427] remove the default build definition from the drop down list as it's the default
choice.

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=574355&r1=574354&r2=574355&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 Sep 10 13:08:18 2007
@@ -132,14 +132,20 @@
         projectGroup = getProjectGroup( projectGroupId );
 
         List<BuildDefinition> projectGroupBuildDefs = getContinuum().getBuildDefinitionsForProjectGroup(
projectGroupId );
+        int defaultBuildDefinitionId = getContinuum().getDefaultBuildDefinition( projectGroupId
).getId();
         
         if (projectGroupBuildDefs != null)
         {
             this.buildDefinitions = new LinkedHashMap<String, Integer>(projectGroupBuildDefs.size());
             for(BuildDefinition buildDefinition : projectGroupBuildDefs)
             {
-                String key = StringUtils.isEmpty( buildDefinition.getDescription() ) ? buildDefinition.getGoals()
: buildDefinition.getDescription();
-                buildDefinitions.put( key, Integer.valueOf( buildDefinition.getId() ) );
+                if (buildDefinition.getId() != defaultBuildDefinitionId)
+                {
+                    String key = StringUtils.isEmpty( buildDefinition.getDescription() )
? buildDefinition.getGoals()
+                                                                                        :
buildDefinition
+                                                                                        
   .getDescription();
+                    buildDefinitions.put( key, Integer.valueOf( buildDefinition.getId() )
);
+                }
             }
         }
         else



Mime
View raw message