esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
208 stars 23 forks source link

Completed but undelivered jobs does not have their status updated #752

Open warlof opened 6 years ago

warlof commented 6 years ago

Bug

Completed but undelivered jobs does not have their status updated. The two jobs bellow are ended for a while but has the status active

ready is expected

Request

https://esi.tech.ccp.is/latest/characters/91737895/industry/jobs/

Response

[
  {
    "job_id": 299121263,
    "installer_id": 91737895,
    "facility_id": 61000828,
    "station_id": 61000828,
    "activity_id": 1,
    "blueprint_id": 1021388600081,
    "blueprint_type_id": 3963,
    "blueprint_location_id": 61000828,
    "output_location_id": 61000828,
    "runs": 1,
    "status": "active",
    "duration": 28560,
    "start_date": "2016-06-25T08:02:00Z",
    "end_date": "2016-06-26T18:33:49Z",
    "cost": 271310,
    "licensed_runs": 3,
    "probability": 1,
    "product_type_id": 3962
  },
  {
    "job_id": 136257333,
    "installer_id": 91737895,
    "facility_id": 60002284,
    "station_id": 60002284,
    "activity_id": 3,
    "blueprint_id": 1006229093795,
    "blueprint_type_id": 2515,
    "blueprint_location_id": 60002284,
    "output_location_id": 60002284,
    "runs": 100,
    "status": "active",
    "duration": 600000,
    "start_date": "2012-04-03T16:28:59Z",
    "end_date": "2012-04-10T15:08:59Z",
    "licensed_runs": 0,
    "product_type_id": 2515
  }
]

Expected

[
  {
    "job_id": 299121263,
    "installer_id": 91737895,
    "facility_id": 61000828,
    "station_id": 61000828,
    "activity_id": 1,
    "blueprint_id": 1021388600081,
    "blueprint_type_id": 3963,
    "blueprint_location_id": 61000828,
    "output_location_id": 61000828,
    "runs": 1,
    "status": "ready",
    "duration": 28560,
    "start_date": "2016-06-25T08:02:00Z",
    "end_date": "2016-06-26T18:33:49Z",
    "cost": 271310,
    "licensed_runs": 3,
    "probability": 1,
    "product_type_id": 3962
  },
  {
    "job_id": 136257333,
    "installer_id": 91737895,
    "facility_id": 60002284,
    "station_id": 60002284,
    "activity_id": 3,
    "blueprint_id": 1006229093795,
    "blueprint_type_id": 2515,
    "blueprint_location_id": 60002284,
    "output_location_id": 60002284,
    "runs": 100,
    "status": "ready",
    "duration": 600000,
    "start_date": "2012-04-03T16:28:59Z",
    "end_date": "2012-04-10T15:08:59Z",
    "licensed_runs": 0,
    "product_type_id": 2515
  }
]
GoldenGnu commented 6 years ago

The workaround that I have been using all the way back from Xml, is to check if “now” is after the completed date.

panthernet commented 5 years ago

Still relevant more than a year after?...

rayanth commented 5 years ago

Still relevant more than a year after?...

The gears of change turn slowly, my friend...

panthernet commented 5 years ago

Well, yes. Also completed_date isn;t set when job is complete. Have to check end_date.

GoldenGnu commented 5 years ago

@panthernet

completed_date isn't set when job is complete

I think you're wrong.

To the best of my knowledge completed_date is omitted until the job is completed, after that it return the date the job was completed.

end_date returns the expected end date of the job, that may change if the job is paused or otherwise changed after it is installed.

panthernet commented 5 years ago

@GoldenGnu I've tested this right away. I have 2 jobs which are ready and both of them is in active state with empty completed_date. Probably it is set when job is delivered but in this case the name is misleading.

mdsantagithub commented 4 years ago

I had several corp jobs completed, delivered. Not returning with flag included_completed = false and NOT returning with flag included_completed = true. Jobs were fresh at the time of Feb 2020.