continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r764364 - in /continuum/trunk/continuum-webapp/src/main/java/org/apache: continuum/web/util/AuditLogConstants.java maven/continuum/web/action/BuildProjectAction.java
Date Mon, 13 Apr 2009 06:46:04 GMT
Author: ctan
Date: Mon Apr 13 06:46:03 2009
New Revision: 764364

URL: http://svn.apache.org/viewvc?rev=764364&view=rev
Log:
[CONTINUUM-2170] fixed exception when forcing a build in group-level build definition tab

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

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/util/AuditLogConstants.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/util/AuditLogConstants.java?rev=764364&r1=764363&r2=764364&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/util/AuditLogConstants.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/util/AuditLogConstants.java
Mon Apr 13 06:46:03 2009
@@ -28,7 +28,9 @@
     public static final String TEMPLATE = "BUILD_TEMPLATE";
 
     public static final String BUILD_DEFINITION = "BUILD_DEFINITION";
-    
+
+    public static final String PROJECT_GROUP = "PROJECT_GROUP";
+
     // events
     public static final String FORCE_BUILD = "Forced Project Build";
 

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java?rev=764364&r1=764363&r2=764364&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
Mon Apr 13 06:46:03 2009
@@ -82,6 +82,9 @@
 
         if ( projectId > 0 )
         {
+            Project proj = getContinuum().getProject( projectId );
+            triggerAuditEvent( getPrincipal(), AuditLogConstants.PROJECT, proj.getGroupId()
+ ":" + proj.getArtifactId(), AuditLogConstants.FORCE_BUILD );
+
             if ( fromGroupPage == true )
             {
                 return "to_group_page";
@@ -91,9 +94,10 @@
                 return "to_project_page";
             }
         }
-        
-        Project proj = getContinuum().getProject( projectId );
-        triggerAuditEvent( getPrincipal(), AuditLogConstants.PROJECT, proj.getGroupId() +
":" + proj.getArtifactId(), AuditLogConstants.FORCE_BUILD );
+        else
+        {
+            triggerAuditEvent( getPrincipal(), AuditLogConstants.PROJECT_GROUP, new Integer(
projectGroupId ).toString(), AuditLogConstants.FORCE_BUILD );
+        }
 
         return SUCCESS;
     }



Mime
View raw message