Skip to content

Allow projects to be "parked"#1594

Merged
cpeel merged 1 commit into
DistributedProofreaders:masterfrom
cpeel:proj_parked
Jul 8, 2026
Merged

Allow projects to be "parked"#1594
cpeel merged 1 commit into
DistributedProofreaders:masterfrom
cpeel:proj_parked

Conversation

@cpeel

@cpeel cpeel commented Jul 7, 2026

Copy link
Copy Markdown
Member

A new "parked" state allows projects to be moved outside the usual project workflow to get fixed or worked on.

Projects can be parked from the project page by a site admin. To move projects out of a parked state, the project jump page needs to be used.

Sandbox: https://www.pgdp.org/~cpeel/c.branch/proj_parked/

This PR will need to be rebased after #1592 goes in.

@cpeel
cpeel requested review from bpfoley, jmdyck, srjfoo and windymilla July 7, 2026 14:15
@cpeel cpeel self-assigned this Jul 7, 2026
// Transitions to PROJ_PARKED.

foreach (ProjectStates::get_states() as $from_state) {
if (in_array($from_state, [PROJ_NEW, PROJ_DELETE, PROJ_PARKED, PROJ_COMPLETE, PROJ_SUBMIT_PG_POSTED])) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line dictates the project states that cannot be parked.

@windymilla windymilla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a sign of the good state of the code that implementing this didn't involve many edits, and they are easily understood by someone who doesn't know the code that well. Thanks!

Comment thread pinc/ProjectState.inc Outdated
string $medium_label,
string $label,
int $forum,
?int $forum,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. It's mildly disturbing that PHPStan didn't catch this mismatch in all the callers. I'm guessing it couldn't properly determine that the type of SiteConfig::get()->posted_projects_forum_idx (etc) is public ?int

@bpfoley

bpfoley commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Looks great to me.
I see you can search for parked projects (and Project Parked state is right before Project Deleted in the sort order and in the search state list).
And moving a project from F1 Available to Parked from the project page Just Works, as does moving from parked to F1 Unavailable using the jump page.
And the transitions listed in the project's Project History table make perfect sense.
Looks like all the ProjectState and ProjectTransition machinery works just as intended!

A new "parked" state allows projects to be moved outside the usual
project workflow to get fixed or worked on.
@cpeel
cpeel merged commit 9d19bfd into DistributedProofreaders:master Jul 8, 2026
12 checks passed
@cpeel
cpeel deleted the proj_parked branch July 8, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants