Feature 103 : Reviewer tags & configurable assignment rules#207
Open
JulesBlanchard wants to merge 10 commits into
Open
Feature 103 : Reviewer tags & configurable assignment rules#207JulesBlanchard wants to merge 10 commits into
JulesBlanchard wants to merge 10 commits into
Conversation
…traints (geodes-sms#103) - Add reviewer_tag, userproject_tag, assignment_constraint tables - Add Assignment_engine_lib replacing duplicated shuffle/round-robin logic - Refactor assignment methods in Screening, Quality_assessment, Data_extraction - Support 5 constraint types: min/max tag per paper, tag combination, same/different user from previous phase - Add CRUD UI for tags and rules, dynamic constraint form, tag badges and active rules panel in assign views - Fully backward compatible: no constraints = original behavior
4ba7212 to
da175fd
Compare
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.
Closes #103
Summary
Adds a flexible assignment control system to ReLiS: project managers can tag reviewers with profile labels (e.g. Junior, Senior, Methodologist) and define rules that the assignment engine respects automatically when distributing papers across screening, validation, QA, and classification.
The whole feature is gated behind a system-wide flag (
assignment_rules_enabled), disabled by default — existing installations see no behavior change until an admin opts in via Settings → Assignment Rules feature.What's new
Database
3 new tables per project (
reviewer_tag,userproject_tag,assignment_constraint), auto-migrated on existing projects via an idempotentrun_assignment_migration_if_needed(). One newadmin_configrow for the feature flag.Per-project database (
relis_dev_correct_*) — 3 new tables added, no existing table modified:reviewer_tagUNIQUE constraint on
tag_name(per project).userproject_tagUNIQUE constraint on
(user_id, tag_id).assignment_constraintThese 3 tables are created via an idempotent migration (
run_assignment_migration_if_needed()), which checks for existence before creating anything. Existing projects pick it up automatically on next load — no manual SQL required, no impact on existing project tables (paper,screening_paper, etc.).System database (
relis_db, shared across the whole installation) — 1 row inserted into the existingadmin_configtable, no column added:config_label = 'assignment_rules_enabled'— controls the feature flag globally.The feature ships disabled by default (
assignment_rules_enabled = '0'), so every existing project sees zero behavior change until an admin explicitly enables it via Settings → Assignment Rules feature.The feature ships disabled by default (
assignment_rules_enabled = '0'), so existing projects see zero behavior change until an admin explicitly enables it via Settings → Assignment Rules feature.Tests
Unit test suite 28 passing tests: regression, CRUD, each constraint type, integration scenarios, and engine edge cases (priority, phase scoping, malformed params, workload balancing).
Security
Server-side permission guards added to all new endpoints (
can_manage_project,can_review_project,has_usergroup(1)).Notes for reviewers