cdisc-org / conformance-rules-editor

MIT License
6 stars 3 forks source link

Ability to export rules #213

Closed gerrycampion closed 7 months ago

gerrycampion commented 8 months ago

Button should allow author to export all currently filtered rules as a set of yaml files.

RamilCDISC commented 8 months ago

During validation I found a bug.

Description

When downloading large number of files (without or with any filter) editor fails downloading on some files and skip them.

How to Reproduce

First Case

  1. Go to rule editor
  2. Clear any filters if applied
  3. The editor will show in status bar "All 1595 rules loaded"
  4. Click the download button and download the yaml files.
  5. Check the number of files in the downloaded folder. (it shows 1591 files, 4 rule files are missing)

Second Case

  1. Go to rule editor
  2. Clear any filters if already applied and filter the rules as 'Draft' in the Status option.
  3. The editor will show in status bar "All 1180 rules loaded"
  4. Click the download button and download the yaml files.
  5. Check the number of files in the downloaded folder. (it shows 1178 files, 2 rule files are missing)

Observation:

During validation tests I observed that the status bar showing progress of download sometimes turn red and then continue downloading. I think these are the cases where editor fails on downloading the file and skips it.

gerrycampion commented 8 months ago

@RamilCDISC I believe this could be an issue specific to Mac OS. When files are created, they use a filename format like: RuleID.UUID.yml If a rule is missing a RuleID (There are currently 4 such rules), the filename will begin with a dot. MacOS treats these as hidden files.

RamilCDISC commented 8 months ago

Just checked it is as @gerrycampion is saying. MacOS hide thhose filoes. You can view them using " command+shift+. "in the specific folder.

Would like to recommend that either we change the naming convention so it will not cause inconvience for any other users (MacOS, Windows.. etc) or rules which are missing RuleID should be updated if possible.

In both case Issue is clear from Validation

RamilCDISC commented 8 months ago

The validation summary for the issue is complete. The updated code properly implement the new feature of downloading all filtered rule files. Following are the test cases that being covered during the validation process:

  1. download with simple filter (few files only)
  2. download with filter (large number of files)
  3. download with no filter
  4. download with some other rule open in editor and different files in filter
  5. download with mixed combination of filters
  6. Check if get call for download is accessible with authorised login (security check)
  7. Perform regression testing, to see everything works fine with additoon of new button too

The above test cases cover the equired validation for the implemented features

gerrycampion commented 8 months ago

New issue created: https://github.com/cdisc-org/conformance-rules-editor/issues/216