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

Implement upload portal for missouri and mississippi court opinions #4034

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

quevon24
Copy link
Member

@quevon24 quevon24 commented May 8, 2024

These are the implementations for the upload portal for mo, moctapp, miss and missctapp.

Based on what I saw on their sites, i define the following fields for the forms: caption, docket number, publication date, optional lead author and pdf file, only for Mississippi a summary field is required. I didn't find that they had neutral citations like maine or tennessee.

The information I added about the courts was extracted from their pages

image

image

image

image

I added a back button in the form and an asterisk to indicate required fields.

image

Tennessee and Maine maintain the same functionality, they just use the same base form.

miss fields:

  • Caption
  • Docket Number
  • Publication Date
  • Lead Author
  • Judges/Lead Author (str field)
  • Disposition
  • Summary
  • Lower Court (str)
  • Lower court docket number (str)
  • Download url
  • Opinion type
  • Opinion pdf

missctapp fields:

  • Caption
  • Docket Number
  • Publication Date
  • Lead Author
  • Judges/Lead Author (str field)
  • Disposition
  • Summary
  • Lower Court (str)
  • Lower court docket number (str)
  • Download url
  • Opinion type
  • Opinion pdf

mo fields:

  • Caption
  • Docket Number
  • Publication Date
  • Lead Author
  • Judges/Lead Author (str field)
  • Disposition
  • Download url
  • Opinion type
  • Opinion pdf

moctapp fields:

  • Caption
  • Docket Number
  • Publication Date
  • Lead Author
  • Judges/Lead Author (str field)
  • Disposition
  • Download url
  • Opinion type
  • Opinion pdf

Steps:

Add the new courts to courtlistener:

  • moctapped
  • moctappsd
  • moctappwd

Add new user groups and assign users to the groups:

  • uploaders_mo
  • uploaders_moctapp
  • uploaders_moctapped
  • uploaders_moctappsd
  • uploaders_moctappwd
  • uploaders_miss
  • uploaders_missctapp

@quevon24 quevon24 requested a review from flooie May 8, 2024 19:33
@quevon24 quevon24 linked an issue May 8, 2024 that may be closed by this pull request
@quevon24 quevon24 marked this pull request as draft May 8, 2024 20:06
quevon24 added 14 commits May 9, 2024 10:47
update make_objects function
update BaseCourtUploadForm
… court of appeals (with temporary ids for the new courts)
…-missouri-mississippi-court-opinions' into 3996-implement-upload-portal-for-missouri-mississippi-court-opinions
@quevon24 quevon24 marked this pull request as ready for review May 30, 2024 15:44
@quevon24 quevon24 requested a review from flooie May 30, 2024 15:44
…-missouri-mississippi-court-opinions' into 3996-implement-upload-portal-for-missouri-mississippi-court-opinions
cl/opinion_page/forms.py Outdated Show resolved Hide resolved
@flooie
Copy link
Contributor

flooie commented Jun 6, 2024

@quevon24 I think we talked about using seal-rookery to generate the seals.

cl/opinion_page/views.py Outdated Show resolved Hide resolved
cl/opinion_page/views.py Outdated Show resolved Hide resolved
widget=forms.Textarea(attrs={"class": "form-control"}),
)

# TODO this could be a select field with hardcoded options for a specific court
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that if we have the lower court names, we could create a list with lower court names, so that the court names are normalized

@@ -103,6 +103,7 @@ def make_objects(
item.get("source") or Docket.SCRAPER,
blocked=blocked,
date_blocked=date_blocked,
appeal_from_str=item.get("lower_court_str", ""),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this part of this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we use that function to create the objects but currently does not allow saving lower court, that's why I had to update it

self.cleaned_data["item"] = {
"source": Docket.DIRECT_INPUT,
"cluster_source": SOURCES.DIRECT_COURT_INPUT,
"cluster_disposition": self.cleaned_data.get("disposition", ""),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the language here is inconsistent really with how we use it.

I'm not sure why you are using cluster_disposition instead of just disposition

same with date_filed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i already checked carefully, i saw that the only model that has the disposition field is OpinionCluster, so it is only "disposition"

regarding date_filed, it has been defined as item["case_dates"] since 2019, making the change would imply modifying the code where the make_objects function is used, that could be done in an independent PR

widget=forms.TextInput(
attrs={
"class": "form-control",
"placeholder": "Judges / Lead author string, use this in case you can't "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are conflating author/author_str on the opinion object with judges and panel on the cluster.

    author = models.ForeignKey(
        "people_db.Person",
        help_text="The primary author of this opinion as a normalized field",
        related_name="opinions_written",
        on_delete=models.RESTRICT,
        blank=True,
        null=True,
    )
    author_str = models.TextField(
        help_text=(
            "The primary author of this opinion, as a simple text "
            "string. This field is used when normalized judges cannot "
            "be placed into the author field."
        ),
        blank=True,
    )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there should be a Charfield field in the form for judges and another for author?

rename dict item from cluster_disposition to disposition
change default opinion type
improve form selection based on pk
remove seals
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

Successfully merging this pull request may close these issues.

Implement Upload Portal for Missouri & Mississippi Court Opinions
3 participants