catch ( NoBuildAgentInGroupException e )
{
addActionError( getText( "projectGroup.build.error.noBuildAgentInGroup" ) );
}
AuditLog event = new AuditLog( AuditLogConstants.FORCE_BUILD );
event.setCurrentUser( getPrincipal() );
if ( projectId > 0 )
{
event.setResource( "Project id=" + projectId );
event.setCategory( AuditLogConstants.PROJECT );
event.log();
if ( fromGroupPage || hasActionErrors() )
{
return "to_group_page";
}
if ( fromProjectPage )
{
return "to_project_page";
}
}
else
{
event.setResource( "Project Group id=" + projectGroupId );
event.setCategory( AuditLogConstants.PROJECT_GROUP );
event.log();
if ( fromGroupPage )
{
return "to_group_page";
}
}