Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-3659

Broken export for "Previous month" on Details pages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2023Q1
    • None
    • UI
    • None

      Export dialog on all Details pages offers current month (March 2023) as a Previous month option (export_previous_month.png).

      If user chooses this option and click on export, they either get an error message (Something went wrong) or nothing happens.

      Export is not generated due to Api400 returned. This happens because UI  uses an incorrect dates in api call: start_date=2023-03-01&end_date=2023-03-31 instead of start and end date for previous month (API 400 is due to the fact that end_date > today)

      https://console.stage.redhat.com/api/cost-management/v1/reports/openshift/costs/?filter[resolution]=monthly&filter[project]=kube-system&group_by[project]=*&currency=USD&limit=0&start_date=2023-03-01&end_date=2023-03-31 

       

      Steps to reproduce:

      stage-beta, cost-demo user

      1. navigate to OCP details page
      2. click on some item in table
      3. click on export button
      4. choose "Previous (March 2023)" option
      5. click on Export button

      Export won't be generated - you may end up with error message (but not every time). You will see api 400 in Network console

              dlabrecq@redhat.com Daniel Labrecque
              rhn-support-esebesto Eva Šebestová
              Eva Šebestová Eva Šebestová
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: