Skip to content

Commit

Permalink
Merge pull request #338 from freelawproject/fix-free-docs-upload-from…
Browse files Browse the repository at this point in the history
…-appellate

fix(appellate): Remove the logic to normalize the pacer_dls_id
  • Loading branch information
mlissner authored Jul 13, 2023
2 parents 07e4d6a + 4e637b3 commit 2d542e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions spec/AppellateSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
}

});
});

Expand Down Expand Up @@ -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');
Expand Down
3 changes: 2 additions & 1 deletion src/appellate/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2d542e6

Please sign in to comment.