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

Add fund status table to Data Dictionary with funding status descriptions #1507

Merged
merged 7 commits into from
Jan 2, 2025

Conversation

mateoclarke
Copy link
Contributor

@mateoclarke mateoclarke commented Dec 12, 2024

Associated issues

Closes cityofaustin/atd-data-tech#19665

Screenshot 2024-12-27 at 4 09 45 PM

Testing

URL to test:
Test locally since there is a migration required.

Steps to test:

  1. Run local migrations
  2. Go to https://localhost:3000/moped/dev/lookups
  3. Click the "FUND STATUS" button on the far right of the lookups listed and confirm it takes you to the new lookup table at the bottom of the page AND/OR use this link with an anchor tag: https://localhost:3000/moped/dev/lookups#moped-fund_status
  4. After scrolling to the bottom of the page, you should see the Fund Status lookups listed as pictured in the screenshot above.
  5. (Optional) Test the down migration with a command like hasura migrate apply --down 1 and confirm that the funding_status_description field is dropped properly.

Ship list

@@ -0,0 +1,14 @@
ALTER TABLE "public"."moped_fund_status"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept this migration simple since it didn't seem like this table is a prereq for the db views that power the advanced search component on the Projects index page. Since fund status isn't an option as an advanced filter field, this seemed right, but I may be naive.

@@ -75,5 +75,10 @@ export const TABLE_LOOKUPS_QUERY = gql`
project_role_name
project_role_description
}
moped_fund_status(where: { funding_status_id: { _neq: 0 } }) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how we ignore the archived field. Let me know if there's a preferred way to do this. Wish I could've added a comment here for posterity but I don't know if there's comment syntax you can use within the gql template literal string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nvm, I looked it up. # works for commented out lines.

Copy link
Member

@johnclary johnclary left a comment

Choose a reason for hiding this comment

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

I love seeing documentation built into the DB. And it's always nice to see another section added to the data dictionary. Looks goood 🚢 🚢 🚢 🚢 🚢

ALTER TABLE "public"."moped_fund_status"
ADD COLUMN "funding_status_description" text NULL;

COMMENT ON COLUMN "public"."moped_fund_status"."funding_status_description" IS 'Description of the funding status';
Copy link
Member

Choose a reason for hiding this comment

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

🥇

Copy link
Member

Choose a reason for hiding this comment

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

is this the bot doing it's thing? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

canrobotsfeelpain

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup, this is what it looks like when there is formatting done by the bot 🤖 and there isn't a change in the view definition. I think this happened since this branch is behind main? We saw the same formatting change in https://github.com/cityofaustin/atd-moped/pull/1472/files.

moped-editor/src/views/dev/LookupsView/settings.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@mddilley mddilley left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for adding this to the dictionary 📖 🚀 and for the helpful comments. 🙏 I requested a couple small changes, and then this is 🚢

- description for “Funding setup requested”
- alphabetize data dictionary
@mateoclarke mateoclarke requested a review from mddilley December 30, 2024 19:04
Copy link
Collaborator

@mddilley mddilley left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for making the updates 🙌 😎 🚢

@mddilley
Copy link
Collaborator

mddilley commented Jan 2, 2025

@mateoclarke I'm going to merge this to get started on testing this morning. Thanks again!

@mddilley mddilley merged commit 6cdc5d6 into main Jan 2, 2025
5 checks passed
@mddilley mddilley deleted the mateo/19665_fund_status_data_dictionary branch January 2, 2025 16:09
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.

Add fund status table to Data Dictionary with funding status descriptions
3 participants