navapbc / simpler-grants-gov

https://simpler.grants.gov
Other
1 stars 0 forks source link

[Task]: (Backend) Research field population of the legacy system #21

Closed chouinar closed 4 months ago

chouinar commented 5 months ago

Summary

We know how many of the fields are populated on the current detail page, but we should verify several specific fields are populated as expected.

A few fields to specifically call out:

Acceptance criteria

No response

chouinar commented 5 months ago

I believe the HTML is built in SearchResultsDetail.vue for future reference. Following that backwards to the opportunity model.

Original Close Date

This also applies to the original close date description

Legacy logic:

Thoughts:

Version

Currently displays as either Synopsis <version> or Forecast <version> based on whether its a forecast.

Version number is separate from revision number (which is a historical-only value) and is never null.

Generally speaking, version number seems to just be calculated as "every time a synopsis or forecast is created, increment by 1" however that would mean it should just be the same as the revision number + 1. However, that doesn't seem to be what happens in all cases. Take this record for example: https://grants.gov/search-results-detail/317935

There are only two historical records, yet the version number is in the 60s. How that happened, I have no idea. Normally its just off by 1-2, so this is an extreme example.

Agency fields

One detail that is useful to know, agency name info is fetched from a view in their system. They literally have a view called TSYNOPSIS_AGENCY_NAME (why it starts with a T, I'm not sure? They usually start their views with V). This is only used for the name.

When the name is fetched, it uses the agency code from the synopsis, not the opportunity. A quick data analysis of prod data, the values generally match between the two, there are only ~12 that don't match (and most because its not set on the synopsis). One case where it doesn't match can actually be seen, although its very, very minor. https://grants.gov/search-results-detail/345675

The opportunity has an agency of HHS-ACF-FYSB and the synopsis has HHS-ACF. Search uses the first one when you look for this, but I can be certain that the detail page is using the synopsis value because the name it displays is for HHS-ACF. The full name is very slightly different: Administration for Children & Families versus Administration for Children & Families - ACYF/FYSB. In all honesty, we might just be fine going with the opportunity value always and simplifying this a lot. The existing logic looks like it has a fallback if the synopsis is null anyways.

Some other values

UI Element NameOur Field Name
Grantor Contact Descriptionsummary.agency_contact_description - note that they replace any occurrence of \n with < br > Also agency_contact_email + agency_contact_email_description, but it looks like forecasts specifically also adding the agency phone number?
Link to Additional Informationsummary.additional_info_url + summary.additional_info_url_description

Miscellaneous

TODOs:

chouinar commented 5 months ago

Fields that can be HTML (crossed-out fields technically can be, but the data doesn't have them that way):

So, seems like its just the last two fields, which is what I assumed.

chouinar commented 5 months ago

Summarizing the above:

An example of raw HTML. https://grants.gov/search-results-detail/352579 has a pretty uneventful looking description, but in the DB it looks like:

<p>Note:&nbsp;Each funding opportunity description is a synopsis of information in the Federal Register application notice. For specific information about eligibility, please see the official application notice. The official version of this document is the document published in the Federal Register. Free Internet access to the official edition of the Federal Register and the Code of Federal Regulations is available on GPO Access at: <a href="http://www.access.gpo.gov/nara/index.html" target="_blank">http://www.access.gpo.gov/nara/index.html</a>.&nbsp;Please review the official application notice for pre-application and application requirements, application submission information, performance measures, priorities and program contact information.</p> 
<p><span style="color: rgb(51, 51, 51);">&nbsp;</span></p> 
<p><span style="color: rgb(51, 51, 51);">For the addresses for obtaining and submitting an application, please refer to our Revised Common Instructions for Applicants to Department of Education Discretionary Grant Programs, published in the Federal Register on December 7, 2022.</span></p> 
<p><span style="color: rgb(51, 51, 51);">&nbsp;</span></p> 
<p><span style="color: black;">Purpose of Program:&nbsp;The ANNH Program provides grants to eligible institutions of higher education (IHEs) to enable them to improve and expand their capacity to serve Alaska Native and Native Hawaiian students.&nbsp;Institutions may use these grants to plan, develop, or implement activities that strengthen the institution.</span></p> 
<p><span style="color: rgb(51, 51, 51);">&nbsp;</span></p> 
<p><span style="color: rgb(51, 51, 51);">&nbsp;</span></p> 
<p><span style="color: rgb(51, 51, 51);">Assistance Listing Number (ALN) 84.031N.</span></p> 
<p><span style="color: rgb(51, 51, 51);">&nbsp;</span></p>
margaretspring commented 5 months ago

@andycochran - @rishalee & @crystabelrangel Saw this during REfinement, but would you huddle up with them to figure out next steps when you're back, Thank you!

chouinar commented 5 months ago

https://docs.google.com/spreadsheets/d/163cqQy9SdJIPFOBDwJV9fuqG0xougo0O_QMjl0PFod8/edit#gid=0

acouch commented 1 month ago

Issue migrated to hhs/simpler-grants-gov#2085