mirror of https://github.com/apache/archiva.git
[MRM-1032]
o added check for start date and end date in statistics report git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@754623 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
18bb01e2cd
commit
51ad4bdec9
|
@ -227,6 +227,12 @@ public class GenerateReportAction
|
|||
return ERROR;
|
||||
}
|
||||
|
||||
if( startDateInDF.after( endDateInDF ) )
|
||||
{
|
||||
addFieldError( "startDate", "Start Date must be earlier than the End Date" );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
// multiple repos
|
||||
generateReportForMultipleRepos(repoContentStatsDao, startDateInDF, endDateInDF, true);
|
||||
}
|
||||
|
@ -241,6 +247,12 @@ public class GenerateReportAction
|
|||
startDateInDF = getStartDateInDateFormat();
|
||||
endDateInDF = getEndDateInDateFormat();
|
||||
|
||||
if( startDateInDF.after( endDateInDF ) )
|
||||
{
|
||||
addFieldError( "startDate", "Start Date must be earlier than the End Date" );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
List<RepositoryContentStatistics> contentStats = repoContentStatsDao.queryRepositoryContentStatistics(
|
||||
new RepositoryContentStatisticsByRepositoryConstraint( selectedRepo, startDateInDF, endDateInDF ) );
|
||||
|
||||
|
@ -322,6 +334,12 @@ public class GenerateReportAction
|
|||
return ERROR;
|
||||
}
|
||||
|
||||
if( startDateInDF.after( endDateInDF ) )
|
||||
{
|
||||
addFieldError( "startDate", "Start Date must be earlier than the End Date" );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
// multiple repos
|
||||
generateReportForMultipleRepos( repoContentStatsDao, startDateInDF, endDateInDF, false );
|
||||
}
|
||||
|
@ -333,6 +351,12 @@ public class GenerateReportAction
|
|||
startDateInDF = getStartDateInDateFormat();
|
||||
endDateInDF = getEndDateInDateFormat();
|
||||
|
||||
if( startDateInDF.after( endDateInDF ) )
|
||||
{
|
||||
addFieldError( "startDate", "Start Date must be earlier than the End Date" );
|
||||
return INPUT;
|
||||
}
|
||||
|
||||
List<RepositoryContentStatistics> contentStats = repoContentStatsDao.queryRepositoryContentStatistics(
|
||||
new RepositoryContentStatisticsByRepositoryConstraint( selectedRepo, startDateInDF, endDateInDF ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue