Skip to content

Keep entity facts the person didn't touch when an entity form is saved #2633

Closed

Description

@pournasserian

Part of #2426 (F-FRM). Follow-up to #2619: findings from an independent review of the merged entity forms. They are fixed with #2630, in the same editor.

Findings

  1. Medium: an edit clears the owner of facts owned by a disabled user. The owner list holds active users only, and matching is case-sensitive. A stored owner that isn't listed, or is stored in uppercase, falls back to "None", and the save stores owner: null without a word.
  2. Medium: a boolean on an entity is always saved as an unsourced fact. An unset boolean is read as false, so a name-only edit adds an unsourced {"value": false} fact that wasn't there.
  3. Low: stored times lose their seconds on any save. This is fixed by Keep the entry form's base version, stop rewriting untouched values, and say which draft the form shows #2630's "keep what the person didn't touch".
  4. Low: fact details typed for an empty value are discarded without a message.
  5. Low: an owner id that belongs to no user is accepted from a forged post.
  6. Low: tests miss a re-save of an edit, the selected owner, last verified, and whether errors and the unsourced marker sit next to their field.

Scope

  • The owner list holds every user. A disabled user shows as disabled, so a stored owner stays selected. Owner ids are compared as GUIDs, so case doesn't matter.
  • A boolean that is unchecked and has no stored value is left out, as an empty field is. An unchecked box over a stored true saves false.
  • Fact details given for an empty value are reported next to the field.
  • An owner id that is not a user's is reported as an unknown owner.
  • Tests:
    • A re-saved edit keeps the owner of a disabled user, the seconds of last verified and an untouched boolean's absence.
    • The edit form shows the selected owner and last verified.
    • Errors and the unsourced marker sit inside their field's fieldset.
    • A forged owner is refused.

Acceptance

  • A name-only edit of an entity changes only the name fact, with every other fact byte for byte the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:formsGenerated forms (FRM)type:bugDefectv2FluentCMS v2 (v2 branch)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions