@Override
  public SearchRequest getSearchUrlSuffix(TimePeriod value, SearchRequest searchRequest) {
    TimePeriod timePeriod = value;
    Date startDate = timePeriod.getStart();
    Date endDate = new Date(timePeriod.getEnd().getTime());

    // copy the old searchrequest's query
    JqlQueryBuilder builder = JqlQueryBuilder.newBuilder(searchRequest.getQuery());
    builder.where().defaultAnd().addDateRangeCondition(documentConstant, startDate, endDate);

    return new SearchRequest(builder.buildQuery(), searchRequest.getOwnerUserName(), null, null);
  }
Ejemplo n.º 2
0
 private double getItemValue(int series, int item) {
   TimePeriod duration = this.underlying.getSeries(series).get(item).getDuration();
   return ((double) (duration.getStart().getTime() + duration.getEnd().getTime()))
       / DateAxis.DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS;
 }