<commit_before>import {CRUDEntity} from "./CRUDEntity";
import * as moment from "moment";
import {BacklogItem} from "./backlogItem";

export class Sprint extends CRUDEntity {
  static path: string = 'sprint/';

  startTime: string;
  endTime: string;
  backlogItemsInvolved: Array<BacklogItem|string>;

  constructor()
  constructor(id: string, startTime: string, endTime: string, backlogItemsInvolved: Array<BacklogItem>)
  constructor(id?: string, startTime?: string, endTime?: string, backlogItemsInvolved?: Array<BacklogItem>) {
    super(id);
    this.startTime = moment(startTime).format('YYYY-MM-DD') || moment().format('YYYY-MM-DD');
    this.endTime = moment(endTime).format('YYYY-MM-DD') || moment().format('YYYY-MM-DD');
    this.backlogItemsInvolved = backlogItemsInvolved || [];
  }

}<commit_msg>Sprint save path updated<commit_after>import {CRUDEntity} from "./CRUDEntity";
import * as moment from "moment";
import {BacklogItem} from "./backlogItem";
import {Http, Response} from "@angular/http";
import {Observable} from "rxjs";

export class Sprint extends CRUDEntity {
  static path: string = 'sprint/';

  startTime: string;
  endTime: string;
  backlogItemsInvolved: Array<BacklogItem|string>;

  constructor()
  constructor(id: string, startTime: string, endTime: string, backlogItemsInvolved: Array<BacklogItem>)
  constructor(id?: string, startTime?: string, endTime?: string, backlogItemsInvolved?: Array<BacklogItem>) {
    super(id);
    this.startTime = moment(startTime).format('YYYY-MM-DD') || moment().format('YYYY-MM-DD');
    this.endTime = moment(endTime).format('YYYY-MM-DD') || moment().format('YYYY-MM-DD');
    this.backlogItemsInvolved = backlogItemsInvolved || [];
  }


  public save(http: Http): Observable<any[]> {
    return http.post(CRUDEntity.basePath + 'project/' + this.id + '/sprint', this)
      .map((res:Response) => res.json())
      .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
  }

}
{'fraction_non_alphanumeric': 0.16075050709939148, 'fraction_numerical': 0.0, 'mean_word_length': 5.2634920634920634, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4185373', 'n_tokens_mistral': 653, 'n_tokens_neox': 633, 'n_words': 136}