hackforla / peopledepot

A project to setup a datastore for people and projects at HackforLA. The link below takes you to the code documentation
https://hackforla.github.io/peopledepot/
GNU General Public License v2.0
7 stars 26 forks source link

Create Table: Accomplishment #48

Open fyliu opened 2 years ago

fyliu commented 2 years ago

Overview

We need to create the accomplishment table so that we can update a shared data store across hackforla.org, vrms, civictechjobs, and tables (onboarding) project.

Details

A table and a model are the same thing

Action Items

Resources/Instructions

Description

List of Accomplishments associated with a project

Data Fields

  1. Copied from spreadsheet and checked off according to ERD. (unchecked items indicate a mismatch between ERD and spreadsheet, which requires a review)

    • [x] PK - id - int - Record Id
    • [x] (FK) project_id - int - Record Id
    • [x] title - varchar
    • [x] description - varchar
    • [x] url - url varchar
    • [x] created - timestamp
    • [x] updated - timestamp
    • [x] accomplished_on - date
  2. In ERD only (having items here indicates a mismatch, which requires a review)

    • None

Associated Tables

  1. Copied from spreadsheet and checked off according to ERD. (unchecked items indicate a mismatch between ERD and spreadsheet, which requires a review)

    • [x] project (many-to-one)
  2. In ERD only (having items here indicates a mismatch, which requires a review)

    • None

Custom Validation

The project_id field can be null.

  1. If project_id is null, the url field must be filled
  2. If the project_id is not null, the url field can still be filled if there's an alternative web page for the specific accomplishment
joshuayhwu commented 2 years ago
class Accomplishment(AbstractBaseModel):
    """
    Accomplishment
    """
    id = models.IntegerField(primary_key=True)
    title = models.CharField(max_length=255)
    description = models.CharField(max_length=3)
    url = models.URLField(blank=True) 
    accomplished_on = models.DateField()
    created_date = models.DateTimeField()
    last_updated = models.DateTimeField()

    project_id = models.ForeignKey(Project, on_delete=models.CASCADE)

    def __str__(self): 
        return f"{self.name}" 
Neecolaa commented 1 year ago

The project_id field can be null. If it is null, the url field must be filled. If the project_id is not null, the url field can still be filled if there's an alternative web page for the specific accomplishment.

I'm not sure if this is something we can enforce in django, or if it counts as a business rule that another team will enforce.

ExperimentsInHonesty commented 1 year ago

@fyliu please clean up this issue so that all the necessary information is in the top.

fyliu commented 1 year ago

Added validation action items, resource link, and requirements to the issue description. Reverified that the fields in this issue matches the ones in the ERD. This is ready for prioritization.

fyliu commented 10 months ago

See comments in #61 to see whether this table is still needed. I'm confused because accomplishment_type was renamed to win_type, so should this table be win, but there's already an issue for the win table.

Update: turns out accomplishment doesn't have a type because there's no set categories for it.

dmartin4820 commented 1 month ago

For 10/24/2024 meeting: I won't be at the meeting tomorrow

Progress: Not started yet. Blockers: None yet Availability: Flexible between 5pm - 9pm on weekdays. ETA: Will work over the weekend

dmartin4820 commented 3 weeks ago

For 10/30/2024 meeting:

Progress: Not started yet. Blockers: Been focusing on PR updates (#385 and #400) for other tasks and reviewing. Once those are done or don't have any lingering issues to fix, I can dedicate more time to this. Availability: Flexible between 5pm - 9pm on weekdays and the weekend. ETA: Will work over the weekend

shmonks commented 2 weeks ago

@drakeredwind01 Just the usual update request ahead of today's meeting.

Please provide update

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures or links* (if necessary): "Add any pictures or links that will help illustrate what you are working on."
drakeredwind01 commented 2 weeks ago

created "class Accomplishment(AbstractBaseModel)" working on API then will run a test to make sure they work

drakeredwind01 commented 1 week ago

finished:

need help:

shmonks commented 5 days ago

Please provide update

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures or links* (if necessary): "Add any pictures or links that will help illustrate what you are working on."