hashgraph / hashgraph/guardian

Schema replacement in policy blocks

Open
#6,345 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
146
Forks
186
Avg merge
2d 20h
Merged PRs (30d)
126

Description

When using the policy blocks from a policy as a template/starting point for a new policy, and updating the policy blocks to reference new sub-schemas, I want a way to identify the previous schema by name so that the new sub-schema reference can be easily located and updated

### Problem description
Presently it is not possible to search for a sub-schema by reference id and it is not possible to see the sub-schema name in the policy block json. This makes it challenging / tedious to update the schema references when schemas are changed for a given policy requiring special tooling / technical expertise that does not align with the policy author user type.

Reusing the policy blocks to create a new policy could be an accelerator — allowing policy authors to leverage the approved or well defined policy block designs as a template or starting point. The requirements below are one way to make this possible.

Another possible solution would be to allow the policy author to 're-link' schmas at the time they are imported by displaying the 'current schema reference' and the 'new schema reference'.

### Requirements
The following ui changes would make it easier to perform the job of 'updating policy block sub-schema references'

- update policy block json to include a 'schemaName' property associated with the schema reference which would be overwritten whenever the schema id is changed / saved
- update the schema selection drop down of the policy block to be alphabetically sorted, to include a text filter, and to be vertically taller to make it much easier to link schmas
- update the schema search of the 'manage schema view' table to include search by schema reference to rapidly identify a schema by reference id

### Definition of done
policy author user acceptance testing

### Acceptance criteria
easier to replace schema references

Contributor guide

Open the contributing guide

Research direction

Start by locating the policy block JSON handling, the policy block schema-selection dropdown, and the manage schema view table. Trace how schema references are displayed, changed, and searched before checking whether existing UI tests cover these areas. Done means schema names remain associated with references, selection is sorted, filterable, and taller, schema reference search works, and policy-author user acceptance testing confirms replacement is easier.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.