TK-28: Auto-fill Mandatory Fields from ISA When Creating Knowledge Item#39
Merged
klondikemarlen merged 56 commits intomainfrom Mar 12, 2026
Conversation
Why? We need more actions and varying action menus per-state. Base actions menu code taken from https://github.com/icefoganalytics/wrap/blob/3abe4c91eaf2206578446090dec42ba2dec91ecd/web/src/components/common/BaseActionsMenuBtnGroup.vue
TODO: need to add dedicated back-end endpoint for creation ArchiveItem from ISA namespace.
Groups of items should be plural to denote that they are a group rather than a singular thing.
TODO: Add files and categoryIds to archive item creation.
Should use standardized nesting patterns for nested resources.
i.e.
{ filesAttributes } (if "files" associations on model)
Pattern taken from Rails-verse. Need to implement in back-end.
Why? Help reduce coupling and make it clear that this "integration" interacts with an external entity (Azure Blob Storage).
Why? So we can keep front- and back-end version in sync. (and hopefully process "true" and "false" as booleans correctly)
Files require form-data format.
Always return an object, since this reduces the number of null and type checks we need.
…e objects. Now uses Lodash to do the same thing.
1471811 to
983b29b
Compare
Page level params will always be "string", but and then should be converted to "number".
Why? To hopefully let me use longer identifiers, so I don't have to rename a bunch of stuff.
informationSharingAgreementAccessGrants -> accessGrants. Why? To fix this Sequelize query error: The identifier that starts with 'informationSharingAgreementAccessGrants.ArchiveItemInformationSharingAgreementAccessGrant.informationSharingAgreementAccessGrant' is too long. Maximum length is 128. I'm probably going to need to rename InformationSharingAgreement to SharingAgreement at some point.
983b29b to
9d0d441
Compare
Why? Easier to understand relationship.
0cbad11 to
0ec777f
Compare
How? Instead of relying on complex cascading services, we now do everything directly. This reduces complexity, at the cost of future code maybe going out of sync between services.
Why? Better experience.
Instead log only when job is doing something.
b8c04ac to
bfc39c1
Compare
Otherwise show Create Knowledge Item link.
NOTE: this restriction is UI only.
d47a027 to
fe6af74
Compare
Make primary button dynamic based on whether knowledge item exists. Remove "edit" call-to-action now that you can no longer edit signed agreements. "revert to draft" is still present in the extended actions menu.
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.
Fixes https://yg-hpw.atlassian.net/browse/TK-28
Context
When creating a Knowledge Item, users must first attach it to an Information Sharing Agreement (ISA). The ISA should pre-fill the mandatory fields in the Knowledge Item form, reducing manual entry and ensuring data consistency.
This PR builds the Knowledge Item creation page accessible from the signed ISA view, consolidates ISA state-based actions into a reusable extended actions menu, and wires up the backend endpoint for creating archive items within ISA context.
Implementation
BaseActionsMenuBtnGroupcomponent that combines a primary action button with a chevron-triggered overflow menu, shared across ISA states.Screenshots
Linking Existing Knowledge Item to Unused Sharing Agreement

http://localhost:8080/archive-items/3003/information-sharing-agreements?showAddArchiveItemToInformationSharingAgreementDialog=3003
Knowledge Item linked to Sharing Agreement

http://localhost:8080/archive-items/3003/information-sharing-agreements
Sharing Agreement that does not have an existing Knowledge Item with create call-to-action

http://localhost:8080/information-sharing-agreements/1
Dedicated Knowledge Item creation page pre-filled from Sharing Agreement

http://localhost:8080/information-sharing-agreements/1/archive-items/new
Sharing Agreement with linked Knowledge Item

http://localhost:8080/information-sharing-agreements/1
Testing Instructions
dev test.dev up.Test Case 1: Signed ISA actions menu shows correct options
Test Case 2: Create Knowledge Item from signed ISA with pre-filled fields
/archive-items/:id/information-sharing-agreements.Test Case 3: Create Knowledge Item button is hidden when one already exists
Test Case 4: Draft ISA actions menu
Test Case 5: Delete a Knowledge Item