Skip to content

Sequential Subject Selection: automated updates of Designator-facing priority values #4582

@lcjohnso

Description

@lcjohnso

Current Assumed Behavior: When project teams configure a workflow for sequential subjects (see this StackOverflow entry), they include the #priority keyword in subject metadata as part of subject upload/creation & linking to subject set.

Current Failure Mode: If a team forgets to include the #priority metadata, they could add the key-value pair to existing subjects via the Python Client, but the priority values don't automatically propagate to the Designator-facing priority column in the SetMemberSubjects table. Propagation from Subjects to the SetMemberSubjects table is executed via the SubjectMetadataWorker, which is triggered when the Subject is linked to a SubjectSet.

Current workarounds: a) link subjects to new subject set and delete old subject set (or unlink+relink subjects to existing subject set); b) Zoo dev manually runs SubjectMetadataWorker via Rails console.

Proposed Enhancement Ideas:

  1. Detect subject metadata update (via Subjects controller) and run a SubjectMetadataWorker for each update (or when #priority specifically is updated). Downside: this might trigger heavy API load to accomplish a relatively rare use case.
  2. Create admin-accessible button that would run the SubjectMetadataWorker over all subjects linked to the relevant workflow -- i.e., as part of activating prioritized setting on that workflow, also create accessible button to sync current state. Upside: no need for Rails console intervention, making task accessible to any Zoo team member via admin page.

Thoughts? @yuenmichelle1 -- as dev who implemented sequential subject selection in Designator, any comments or backstory on why Designator-facing priority values are stored in the SetMemberSubject table (as opposed to being pulled fresh from the subject metadata)?

Priority: not high, given rare need for sequential selection configuration and acceptable workarounds (that are now documented in StackOverflow).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions