From 069777dcaf0d76e0ae607333b1a93441d2650061 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Thu, 13 Jul 2023 12:35:59 -0400 Subject: [PATCH 1/2] fix(appellate): Remove the normalized pacer_dls_id --- spec/AppellateSpec.js | 7 ++++--- src/appellate/utils.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/AppellateSpec.js b/spec/AppellateSpec.js index 087338c7..21834cc2 100644 --- a/spec/AppellateSpec.js +++ b/spec/AppellateSpec.js @@ -11,10 +11,12 @@ describe('The Appellate module', function () { { href: 'https://ecf.ca9.uscourts.gov/docs1/009031927529', onClick: "return doDocPostURL('009031927529','290338');", + dlsId: '009031927529', }, { href: 'https://ecf.ca9.uscourts.gov/docs1/009131956734', onClick: "return doDocPostURL('009131956734','290338');", + dlsId: '009131956734', }, ]; const searchParamsWithCaseId = new URLSearchParams('servlet=DocketReportFilter.jsp&caseId=318547'); @@ -50,10 +52,9 @@ describe('The Appellate module', function () { describe('getDocIdFromURL', function () { it('returns the document id ', function () { for (const item of showDocURLs) { - var queryString = new URLSearchParams(item.url) + var queryString = new URLSearchParams(item.url); expect(APPELLATE.getDocIdFromURL(queryString)).toBe(item.docId); } - }); }); @@ -233,7 +234,7 @@ describe('The Appellate module', function () { for (let i = 0; i < anchors.length; i++) { let item = anchors[i]; - expect(item.dataset.pacerDlsId).toBe(links[i]); + expect(item.dataset.pacerDlsId).toBe(documentLinks[i]['dlsId']); expect(item.dataset.pacerCaseId).toBe('290338'); expect(item.dataset.pacerTabId).toBe('3'); expect(item.dataset.attachmentNumber).toBe('0'); diff --git a/src/appellate/utils.js b/src/appellate/utils.js index 17a32d35..706daff9 100644 --- a/src/appellate/utils.js +++ b/src/appellate/utils.js @@ -280,7 +280,8 @@ let APPELLATE = { clonedNode.dataset.pacerDocId = docId; if (doDoc && doDoc.doc_id) { - clonedNode.dataset.pacerDlsId = PACER.cleanPacerDocId(doDoc.doc_id); + // don't normalize this attribute because we use it to check whether a doc is free or not + clonedNode.dataset.pacerDlsId = doDoc.doc_id; } clonedNode.dataset.pacerCaseId = pacerCaseId; clonedNode.dataset.pacerTabId = tabId; From 4e637b33d9efa6fa02142f376cce99f6424e5f32 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Thu, 13 Jul 2023 13:59:34 -0400 Subject: [PATCH 2/2] feat(docs): Changelog Update --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index c9626e55..95fe4e4f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ Changes: Fixes: - More robust logic to get the document id from appellate courts([#340](https://github.com/freelawproject/recap/issues/340)) - Normalize document numbers from appellate courts that uses the pacer_doc_id instead of the regular docket entry numbering([#2877](https://github.com/freelawproject/courtlistener/issues/2877)). + - Remove logic to normalize the pacer_dls_id attribute in the document links([#338](https://github.com/freelawproject/recap-chrome/pull/338)) For developers: - Nothing yet