Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort Related Documents Chronologically #161

Open
kacinash opened this issue Sep 2, 2015 · 20 comments
Open

Sort Related Documents Chronologically #161

kacinash opened this issue Sep 2, 2015 · 20 comments
Assignees

Comments

@kacinash
Copy link
Contributor

kacinash commented Sep 2, 2015

Eventually, I would like to sort Related Documents chronologically, so that you can get a sense of the chronological progression of the case like with the Case Documents.

@jduss4
Copy link
Contributor

jduss4 commented Feb 10, 2016

Example: oscys.caseid.0249

@jduss4
Copy link
Contributor

jduss4 commented Feb 10, 2016

These are not currently sorted by date because there is not a "date" field associated with them. It looks as though it is part of the title:

"caseRelatedDocumentData_ss": [
     "{\"label\":\"Susan Davis v. Caleb Swann. Minute Book Entry (January 18, 1809)\",\
        "id\":\"oscys.mb.0013.002\"}",
],

Compare that with

"caseDocumentData_ss": [
    "{\"label\":\"Ann Davis v. Charles Minifee. Petition for Freedom (August 10, 1809)\",\
       "date\":\"1809-08-10\",\
       "dateDisplay\":\"August 10, 1809\",\
       "id\":\"oscys.case.0018.001\"}"
]

@kacinash
Copy link
Contributor Author

@jduss4 Is there a reason why there is no date field associated with them? The caseRelatedDocument documents are encoded exactly like the caseDocument.

@jduss4
Copy link
Contributor

jduss4 commented Feb 10, 2016

@kacinash I haven't looked into it too much, but I'm guessing it's just not coded into the tei -> solr script. I'll dig in a bit more!

@jduss4
Copy link
Contributor

jduss4 commented Feb 10, 2016

Notes for Jessica:
Court reports have different requirements for date:
<xsl:value-of select="//keywords[@n='term']/term/date/@when">
Will need to build this into the json dates. Look into if I can use $doc_date or if that will be formatted incorrectly.

@jduss4
Copy link
Contributor

jduss4 commented Feb 11, 2016

This seems as though it is working. Can you confirm, @kacinash ?

http://rosie.unl.edu/earlywashingtondc/cases/oscys.caseid.0001#rel_documents

@kacinash
Copy link
Contributor Author

@jduss4, seems to be working! You can see it best here: http://rosie.unl.edu/earlywashingtondc/cases/oscys.caseid.0342

One thing I did notice is that the documents with no date have an (n.d.) after them. In Case Documents, they are just blank.

@jduss4
Copy link
Contributor

jduss4 commented Feb 11, 2016

I think that's happening because I was trying to co-opt some of the existing functionality of dates. What things should appear with n.d. after them?

@kacinash
Copy link
Contributor Author

Nothing. It's just blank. See the bottom of http://rosie.unl.edu/earlywashingtondc/cases/oscys.caseid.0001#documents

@jduss4
Copy link
Contributor

jduss4 commented Feb 11, 2016

I mean are there any documents in that "related documents" list on cases that should appear with "n.d." ? If not, I'll just strip it out from anything. I think it's just a default right now if it can't find a date.

@kacinash
Copy link
Contributor Author

No. We decided we didn't want "n.d." to appear anywhere. If there is no date, there is just nothing after the document name.

@jduss4
Copy link
Contributor

jduss4 commented Feb 11, 2016

Oh! Is this a sitewide decision? Because if so, then I can wipe out the "n.d." with impunity. :D

@kacinash
Copy link
Contributor Author

Yup!

@jduss4
Copy link
Contributor

jduss4 commented Feb 12, 2016

I think that this and all the n.d.s and ()s, etc, are now taken care of! :)

@jduss4 jduss4 closed this as completed Aug 22, 2016
@kacinash kacinash reopened this Aug 22, 2016
@kacinash
Copy link
Contributor Author

I think this got fixed on the case page, but on the people page, Related Documents are still not sorted in any way.

@jduss4
Copy link
Contributor

jduss4 commented Aug 22, 2016

Okay!

@jduss4
Copy link
Contributor

jduss4 commented Aug 25, 2016

@kacinash does this look like the people related documents are sorting the way you would like?

http://rosie.unl.edu/earlywashingtondc/people/per.000003#documents

Undated are appearing at the top, currently, which might be somewhat difficult to switch unless if we have dates descending rather than ascending

@kacinash
Copy link
Contributor Author

kacinash commented Aug 25, 2016

@jduss4 It's fine, I guess. Though, on the case page the no dates are showing last, even though the date sort is ascending.

@jduss4
Copy link
Contributor

jduss4 commented Aug 26, 2016

I'll have to check, but I think that they are coming from different sources (one is the main solr doc, the others are the embedded json in the docs), but I'll have to look to see how I was sorting those.

@jduss4
Copy link
Contributor

jduss4 commented Aug 26, 2016

I'm going to move past this for now in the interests of getting to more issues today, but I'll leave it open so that I can circle back during the next bug squash!

@jduss4 jduss4 self-assigned this Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants