[Anthill-pro] Event Selector - comparing last build status
Steve Boone
sbb at urbancode.com
Mon Feb 4 10:59:49 CST 2008
Curtis,
This should work.
import com.urbancode.anthill3.domain.workflow.*;
import com.urbancode.anthill3.domain.buildlife.*;
result = false;
if (event instanceof WorkflowEvent &&
event.getCase().isComplete() &&
event.getCase().getStatus().isSuccess()) {
currentSuccess = event.getCase().getBuildLife();
lastFailure =
BuildLifeFactory.getInstance().restorePriorMostRecentFailureForProfile(currentSuccess,
currentSuccess.getProfile());
lastSuccess =
BuildLifeFactory.getInstance().restorePriorMostRecentSuccessForProfile(currentSuccess,
currentSuccess.getProfile());
if (lastFailure != null) {
if (lastSuccess == null || lastFailure.getStartDate().after(
lastSuccess.getStartDate())) {
// This is a build fix
result = true;
}
}
}
return result;
On 2/1/08, Yanko, Curtis <curt_yanko at uhc.com> wrote:
>
> Has there been headway on this? I have a team that wants Failures and
> first Success. While I fundamentally disagree with this approach they are
> the customer.
>
> ===
> -Curt
> W: 860.702.9059
> M: 860.881.2050
>
>
> ------------------------------
> *From:* anthill-pro-bounces at lists.urbancode.com [mailto:
> anthill-pro-bounces at lists.urbancode.com] *On Behalf Of *Wes Bramhall
> *Sent:* Wednesday, January 30, 2008 5:33 PM
> *To:* AnthillPro user and support list.
> *Subject:* [Anthill-pro] Event Selector - comparing last build status
>
> I am trying to make a custom Event Selector that will notify if the
> current build is a success and the previous one is a failure. How would I
> access the previous build life to determine if it was a failure? I don't see
> a way to access previous build lives except by status.
>
>
>
> Thanks,
>
> -Wes
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20080204/6f5893bb/attachment-0001.htm
More information about the Anthill-pro
mailing list