Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to set initial status when creating a project #4390

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

wes-otf
Copy link
Contributor

@wes-otf wes-otf commented Feb 11, 2025

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 when PROJECTS_AUTO_CREATE is enabled. This settings needs to match one of the string literals here:

DRAFT = "draft"
INTERNAL_APPROVAL = "internal_approval"
CONTRACTING = "contracting"
INVOICING_AND_REPORTING = "invoicing_and_reporting"
CLOSING = "closing"
COMPLETE = "complete"

In the modal the statuses of INTERNAL_APPROVAL and COMPLETE 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 the DRAFT step)

Also updated the activity message to reflect what status the project was created with

Screenshots

Create project prompt with PROJECTS_DEFAULT_STATUS="contracting"
Screenshot 2025-02-11 at 17 35 40
Screenshot 2025-02-11 at 17 35 52

Activity message
Screenshot 2025-02-11 at 17 36 14

Test Steps

Confirm...

  • ...the project creation prompt allows for setting of initial status
  • ...setting PROJECTS_DEFAULT_STATUS with a valid status results in that being the default option of the project creation prompt
  • ...setting PROJECTS_DEFAULT_STATUS when PROJECTS_AUTO_CREATE` is enabled causes projects to be created in the set status

@wes-otf wes-otf added Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter labels Feb 11, 2025
@wes-otf
Copy link
Contributor Author

wes-otf commented Feb 11, 2025

would it be beneficial to gray out specific items in the project details too depending on the initial status? ie. if a project was created with the initial status of contracting, should we gray out project documents with a message of why they aren't populated?

@wes-otf wes-otf force-pushed the feature/set-initial-project-state branch from ed60d01 to 0b64cd9 Compare February 11, 2025 23:15
Copy link
Member

@frjo frjo left a comment

Choose a reason for hiding this comment

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

Works perfectly in my testing.

@frjo
Copy link
Member

frjo commented Feb 12, 2025

Notices that we do not have a message for when PROJECTS_AUTO_CREATE is on so created #4391

@frjo frjo added Status: Needs testing Tickets that need testing/qa Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Feb 12, 2025
@wes-otf wes-otf added Status: Tested - approved for live ✅ and removed Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team Status: Needs testing Tickets that need testing/qa labels Feb 12, 2025
@wes-otf
Copy link
Contributor Author

wes-otf commented Feb 12, 2025

@frjo what's closing state used for? should that also be excluded from the initial status options?

@frjo frjo merged commit 06b7f61 into main Feb 12, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Tested - approved for live ✅ Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When creating project, add option to set state
2 participants