Fixed age extract issues.
This commit is contained in:
parent
de605e2a55
commit
bc3f4fc26f
@ -144,6 +144,41 @@ public class Issue
|
||||
return this.projectId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is active at.
|
||||
*
|
||||
* @param date
|
||||
* the date
|
||||
* @return true, if is active at
|
||||
*/
|
||||
public boolean isActiveAt(final LocalDate date)
|
||||
{
|
||||
boolean result;
|
||||
|
||||
LocalDate createdDate = this.createdOn.toLocalDate();
|
||||
LocalDate closedDate;
|
||||
if (this.closedOn == null)
|
||||
{
|
||||
closedDate = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
closedDate = this.closedOn.toLocalDate();
|
||||
}
|
||||
|
||||
if ((!createdDate.isAfter(date)) && ((closedDate == null) || (date.isBefore(closedDate))))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setClosedOn(final LocalDateTime closedOn)
|
||||
{
|
||||
this.closedOn = closedOn;
|
||||
|
@ -106,18 +106,7 @@ public class Issues extends ArrayList<Issue>
|
||||
|
||||
for (Issue issue : this)
|
||||
{
|
||||
LocalDate createdOn = issue.getCreatedOn().toLocalDate();
|
||||
LocalDate closedOn;
|
||||
if (issue.getClosedOn() == null)
|
||||
{
|
||||
closedOn = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
closedOn = issue.getClosedOn().toLocalDate();
|
||||
}
|
||||
|
||||
if ((!createdOn.isAfter(date)) && ((issue.getClosedOn() == null) || (!closedOn.isBefore(date))))
|
||||
if (issue.isActiveAt(date))
|
||||
{
|
||||
result.add(issue);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user