Resolves issue #1717 , Replace old CNA fields with new generic partner fields across organization APIs.#1718
Merged
david-rocca merged 4 commits intodevfrom Apr 7, 2026
Merged
Resolves issue #1717 , Replace old CNA fields with new generic partner fields across organization APIs.#1718david-rocca merged 4 commits intodevfrom
david-rocca merged 4 commits intodevfrom
Conversation
Collaborator
|
Tested, looks good |
Collaborator
jdalphond-mitre
left a comment
There was a problem hiding this comment.
Tested, working
jdalphond-mitre
previously approved these changes
Apr 7, 2026
cberger8
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes Issue #1717
Summary
This PR replaces the legacy
cna_countryandcna_role_typeidentifier fields withpartner_country,partner_role, andpartner_typestrings. These modifications propagate through the core organization Mongoose models, constant validation configurations, request/response JSON schemas, controller parameter parsing filters, and the OpenAPI documentation.Important Changes
src/model/baseorg.js&src/repositories/baseOrgRepository.js:cna_role_typeandcna_countryinside the Mongoose schema forpartner_role,partner_type, andpartner_country.directRegistryKeyswhitelist.src/constants/index.js:JOINT_APPROVAL_FIELDSto require Secretariat approval for changes on the new partner fields.src/middleware/schemas/BaseOrg.json&schemas/registry-org/*:partner_role,partner_type, andpartner_countryproperties as Strings.list-registry-orgs-response.jsonandget-registry-org-response.json.src/controller/org.controller/org.middleware.js&src/controller/registry-org.controller/registry-org.middleware.js:parsePostParamsand the request body checks to accurately process and allow the new partner fields.src/controller/org.controller/index.js&api-docs/openapi.json:@swaggerdecorators and detailed payload descriptions.test/integration-tests/registry-org/registryOrgCRUDTest.js:partner_role,partner_type, andpartner_country.Testing
Steps to manually test updated functionality:
POST /api/registry/orgpayload to create an org ensuring you provide values inpartner_role,partner_type, andpartner_country.GET /api/registry/org/:shortnameand assert that those partner values properly map into the response.PUT /api/registry/org/:shortnamepayload modifying these partner fields, observing a successful update response.