You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When re-importing a NOFO, we are currently creating entirely new sections and subsections and then assigning them over the old ones.
This means we lose all the updates to the old subsections, if any.
Some of the metadata fields which would be easy for us to preserve on re-imports are:
subsection classnames
whether or not something is a callout box
The classnames are a string, and the callout box information is a boolean.
Matching the subsections to each other is not an exact science here though, so we will have to use a best-guess for this.
There are 2 ways to approach this, both of which should be the same thing:
exact match for subsection.section.name and subsection.name, or
match html_id after removing the counter number
The subsection.html_id is created (see here) by combining a counter (for uniqueness), the section name, and the subsection name. The counter can't be relied on to be the same, but if the other two line up, we are 99% sure they are the same subsection.
If there is a match, transfer the html_class (if exists) and callout_box (either value) to the new subsection before replacing them.
This is an easy first step we can take to make reimporting a little bit easier.
The text was updated successfully, but these errors were encountered:
Demoed to our HRSA users this morning and they generally loved the idea but make a request that we also add a confirmation checkbox, and then in chatting to Adam it sounds like we should reverse course on callout boxes.
Add a checkbox on the reimport page
We heard from HRSA that keeping page breaks is usually a good idea, but that sometimes they want them to go away. Their suggestion was to add a checkbox that defaults to checked and says something like “Keep page breaks from current NOFO”
If the checkbox is checked, preserve page breaks.
If the checkbox is not checked, overwrite everything (current behaviour)
Also, some of our Django forms are Django form classes, but the reimport forms are raw HTML, so we don't need to faff around with that.
Do not carry over callout boxes
Adam and I talked afterwards about the callout boxes. Unlike page breaks, callout boxes can’t be easily edited in the NOFO UI, so there is a low chance that people managed to change callout box information after importing (although callout boxes can be created when you add a new section).
So we discussed not overwriting the callout box field, just page breaks.
I’ve asked in the NOFO Builder channel for a recco, but I think we are probably going to not carry these over.
When re-importing a NOFO, we are currently creating entirely new sections and subsections and then assigning them over the old ones.
This means we lose all the updates to the old subsections, if any.
Some of the metadata fields which would be easy for us to preserve on re-imports are:
The classnames are a string, and the callout box information is a boolean.
Matching the subsections to each other is not an exact science here though, so we will have to use a best-guess for this.
There are 2 ways to approach this, both of which should be the same thing:
subsection.section.name
andsubsection.name
, orhtml_id
after removing thecounter
numberThe
subsection.html_id
is created (see here) by combining a counter (for uniqueness), the section name, and the subsection name. The counter can't be relied on to be the same, but if the other two line up, we are 99% sure they are the same subsection.If there is a match, transfer the
html_class
(if exists) andcallout_box
(either value) to the new subsection before replacing them.This is an easy first step we can take to make reimporting a little bit easier.
The text was updated successfully, but these errors were encountered: