api icon indicating copy to clipboard operation
api copied to clipboard

Invalid dates returned from some hearings

Open DaGenix opened this issue 2 years ago • 4 comments

Hi,

We've noticed that some hearings appear to be returning invalid dates. For example:

https://api.govinfo.gov/packages/CHRG-117shrg46924/summary?api_key=DEMO_KEY

Produces a response of:

{
    "documentType": "SHRG",
    "congress": "117",
    "heldDates": ["2022-02-012022-02-09"],
    "session": "2",
    "documentNumber": "232",
    "detailsLink": "https://www.govinfo.gov/app/details/CHRG-117shrg46924",
    "title": "HEARING ON THE NOMINATIONS OF THE HONORABLE SHALANDA D. YOUNG, OF LOUISIANA, TO BE DIRECTOR OF THE OFFICE OF MANAGEMENT AND BUDGET AND THE HONORABLE NANI A. COLORETTI, OF CALIFORNIA, TO BE DEPUTY DIRECTOR OF THE OFFICE OF MANAGEMENT AND BUDGET",
    "branch": "legislative",
    "collectionName": "Congressional Hearings",
    "download": {
        "premisLink": "https://api.govinfo.gov/packages/CHRG-117shrg46924/premis",
        "zipLink": "https://api.govinfo.gov/packages/CHRG-117shrg46924/zip",
        "modsLink": "https://api.govinfo.gov/packages/CHRG-117shrg46924/mods"
    },
    "pages": "119",
    "chamber": "SENATE",
    "relatedLink": "https://api.govinfo.gov/related/CHRG-117shrg46924",
    "suDocClassNumber": "Y 4.B 85/2:S.HRG.117-232",
    "granulesLink": "https://api.govinfo.gov/packages/CHRG-117shrg46924/granules?offset=0&pageSize=100",
    "dateIssued": "2022-02-01",
    "packageId": "CHRG-117shrg46924",
    "collectionCode": "CHRG",
    "governmentAuthor2": "Senate",
    "governmentAuthor1": "Congress",
    "publisher": "U.S. Government Publishing Office",
    "docClass": "SHRG",
    "lastModified": "2022-06-29T19:05:19Z",
    "category": "Congressional Committee Materials",
    "otherIdentifier": {
        "migrated-doc-id": "f:46924.txt",
        "ils-system-id": "001178858"
    }
}

The heldDates value is: ["2022-02-012022-02-09"]. It looks like instead of producing an array of strings, all of the dates are being concatenated into a single string and added to the array.

DaGenix avatar Jul 21 '22 01:07 DaGenix

Additional information:

The following are the packages that are known to be affected, although there could be more:

  • CHRG-117shrg46924
  • CHRG-117shrg44902
  • CHRG-117hhrg46369
  • CHRG-117hhrg45892
  • CHRG-117hhrg45770

avalatea avatar Jul 21 '22 15:07 avalatea

Looking into this to see how we can resolve quickly.

jonquandt avatar Jul 21 '22 15:07 jonquandt

We have a fix that we are finalizing testing on. I expect it to be available tomorrow afternoon. I will let you know when it's working as expected.

jonquandt avatar Jul 28 '22 13:07 jonquandt

@jonquandt Any updates on this issue? How did the testing go?

avalatea avatar Aug 08 '22 17:08 avalatea

@avalatea - This issue should now be resolved:

https://api.govinfo.gov/packages/CHRG-117shrg46924/summary?api_key=DEMO_KEY

heldDate is now properly returning as an array with one or more dates, as applicable:

{
  "documentType": "SHRG",
  "congress": "117",
  "heldDates": [
    "2022-02-01",
    "2022-02-09"
  ],
  "session": "2",
  "documentNumber": "232",

jonquandt avatar Aug 31 '22 04:08 jonquandt

Belated, but thank you for the fix 😸

avalatea avatar Sep 15 '22 18:09 avalatea