In PR #2548, we dynamically update "Organization type" field when adding a Federal Agency. However, the Federal type field does not update alongside it. This can lead to situations where incorrect data is displayed.
When changing the Federal agency field, we should also update federal type.
Acceptance criteria
[ ] The "Portfolio type" field updates dynamically when Federal agency is changed
[ ] The "Federal type" field updates dynamically when Federal agency is changed
[ ] No error should occur if there is no linked SO
[ ] If an API is used, ensure that only analysts and superusers can use it
Additional context
PR #2548 updated the senior official field via an API so that we could use javascript to make these changes. The lowest lift solution here would be to copy the approach done for get_senior_official_from_federal_agency_json.
Issue description
In PR #2548, we dynamically update "Organization type" field when adding a Federal Agency. However, the Federal type field does not update alongside it. This can lead to situations where incorrect data is displayed.
When changing the
Federal agency
field, we should also update federal type.Acceptance criteria
Federal agency
is changedFederal agency
is changedAdditional context
PR #2548 updated the
senior official
field via an API so that we could use javascript to make these changes. The lowest lift solution here would be to copy the approach done forget_senior_official_from_federal_agency_json
.Links to other issues