Commits

Mark Chaimungkalanont  committed 28f8dbb

Update the web item to use the cached plan

  • Participants
  • Parent commits c627de3

Comments (0)

Files changed (2)

   </build>
 
   <properties>
-    <bamboo.version>3.4</bamboo.version>
+    <bamboo.version>4.3</bamboo.version>
     <bamboo.data.version>3.2.2</bamboo.data.version>
   </properties>
 

File src/main/java/com/atlassian/bamboo/plugin/dotnet/ncover/NCoverBuildWebItemCondition.java

 package com.atlassian.bamboo.plugin.dotnet.ncover;
 
-import com.atlassian.bamboo.build.Buildable;
-import com.atlassian.bamboo.plan.PlanManager;
+import com.atlassian.bamboo.plan.PlanKeys;
+import com.atlassian.bamboo.plan.cache.CachedPlanManager;
+import com.atlassian.bamboo.plan.cache.ImmutableBuildable;
 import com.atlassian.plugin.PluginParseException;
 import com.atlassian.plugin.web.Condition;
 import org.apache.commons.lang.StringUtils;
 
 	}
 
-	public void setPlanManager(PlanManager planManager) {
-		this.planManager = planManager;
+	public void setCachedPlanManager(CachedPlanManager cachedPlanManager) {
+		this.cachedPlanManager = cachedPlanManager;
 	}
 
-	private PlanManager planManager;
+	private CachedPlanManager cachedPlanManager;
 
 	/**
 	 * Only display the NCover tab item if the appropriate configuration
 			return false;
         }
 
-		Buildable build = planManager.getPlanByKeyIfOfType(buildKey, Buildable.class);
+        ImmutableBuildable build = cachedPlanManager.getPlanByKeyIfOfType(PlanKeys.getPlanKey(buildKey), ImmutableBuildable.class);
 		if (build != null)
         {
             Map<String, String> customConfiguration = build.getBuildDefinition().getCustomConfiguration();