async recalculateReport()

in widgets/agile-charts/src/app/widget.js [203:224]


  async recalculateReport() {
    const {
      report,
      isLoading,
      refreshPeriod,
      isConfiguring
    } = this.state;

    const updatedReportEntityId =
      await AgileProgressDiagramWidget.getSelectedReportId(
        this.fetchYouTrack, this.props.configWrapper.getFieldValue('settings')
      );

    if (!report || report.id !== updatedReportEntityId) {
      const newReportEntity = await this.loadReport(updatedReportEntityId);
      this.setState({report: newReportEntity, refreshPeriod});
    } else if (!isLoading && !isConfiguring &&
      !ReportModel.isReportCalculation(report)) {
      report.status = await recalculateReport(this.fetchYouTrack, report);
      this.setState({report, refreshPeriod});
    }
  }