package com.collabnet.ctf.events.custom.events2;

import com.vasoftware.sf.events.EventContext;
import com.collabnet.ctf.events.EventListener;
import com.collabnet.ctf.events.SoapVersion;
import com.collabnet.ctf.events.Synchronous;

@EventListener(version = SoapVersion.SOAP_60)
public class AddTwoEffortHoursToArtifacts {

	/**
	 * Adds to effort units to the estimated effort
	 * @param eventContext The event content.
	 */
	@Synchronous(topic = "object.item.Artifact.create", rank = 10)
	public void addTwoEffortUnitsToArtifacts(EventContext eventContext) {
		/*ArtifactSoapDO artifact = (ArtifactSoapDO) eventContext.getUpdatedData();
		if (!artifact.getAutosumming()) {
			artifact.setEstimatedEffort(artifact.getEstimatedEffort() + 2);
			eventContext.addSuccessMessage("Added two effort units to the estimated effort");
		}*/
	}
}
