Added ability to set initial status when creating a project #4390
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 #4388. Adds a new field to the "Create Project" modal that allows for setting the initial status of the project. The default for this field can be set with the
PROJECTS_DEFAULT_STATUS
environment setting, which would also set the initial status whenPROJECTS_AUTO_CREATE
is enabled. This settings needs to match one of the string literals here:hypha/hypha/apply/projects/models/project.py
Lines 75 to 80 in cc174b6
In the modal the statuses of
INTERNAL_APPROVAL
andCOMPLETE
were removed as choices as I didn't see them being useful statuses to be manually set (internal approval would only be approving the items created in theDRAFT
step)Also updated the activity message to reflect what status the project was created with
Screenshots
Create project prompt with


PROJECTS_DEFAULT_STATUS="contracting"
Activity message

Test Steps
Confirm...
PROJECTS_DEFAULT_STATUS
with a valid status results in that being the default option of the project creation promptPROJECTS_DEFAULT_STATUS
when PROJECTS_AUTO_CREATE` is enabled causes projects to be created in the set status