Skip to content

Set project start date to now and add field in create project form to set the end date#4495

Merged
frjo merged 12 commits into
mainfrom
enhancement/project_start_end_updates
Apr 23, 2025
Merged

Set project start date to now and add field in create project form to set the end date#4495
frjo merged 12 commits into
mainfrom
enhancement/project_start_end_updates

Conversation

@frjo
Copy link
Copy Markdown
Member

@frjo frjo commented Apr 10, 2025

Fixes #4494

  • Set project start date to now and add field in create project form to set the end date
  • Show dates on project detail view.
  • Make it possible to edit the start and end dates on the project detail view.
  • Expose dates in project table.

@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 10, 2025

@sandeepsajan0 Can you see why the create project test is failing? Likely something obvious but I can't see it.

Comment thread hypha/apply/funds/tests/test_views.py Outdated
@frjo frjo added Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Status: Needs testing Tickets that need testing/qa Type: Patch Mini change, used in release drafter Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Apr 17, 2025
@frjo frjo temporarily deployed to test-hypha-app April 17, 2025 07:51 Inactive
Comment thread hypha/apply/projects/tables.py Outdated
model = Project
orderable = True
order_by = ("-created_at",)
order_by = ("-end_date",)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
order_by = ("-end_date",)
order_by = ("end_date",)

I think in their current spreadsheet staff sort by the ascending end dates so this may be a bit closer to that

Comment on lines +25 to +46
{% if request.user.is_apply_staff %}
<a class="transition-opacity hover:opacity-70 is-active"
href="{% url 'apply:projects:project_dates_update' object.submission.id %}"
hx-get="{% url 'apply:projects:project_dates_update' object.submission.id %}"
hx-target="#htmx-modal"
>
{% heroicon_solid "pencil-square" class="inline mt-2 ms-1" aria_hidden=true %}
<span class="sr-only">{% trans "edit dates" %}</span>
</a>
{% endif %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we also put this button on the start date? even though it opens the same modal it might be more intuitive if they wanted to open the start date


<div class="p-4">
{% include 'includes/dialog_form_base.html' with form=form value=value %}
</div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not an important detail at all but the date pickers are different widths - not sure if this can be fixed here because of the include template though

Screenshot 2025-04-17 at 09 42 49

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.

There was custom css to change the width of the last date field, been there for years.

Removed it and we will see if it mess something up, likely not.

@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Apr 17, 2025

worked really well! a few small comments/thoughts but it should be ready to go!

@frjo frjo force-pushed the enhancement/project_start_end_updates branch from aafccc9 to d61b8a1 Compare April 17, 2025 19:29
@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 17, 2025

@wes-otf Good changes I believe. I implemented them and deployed to test.

@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Apr 17, 2025

seems to work great! I think this is exactly what they were asking for, I'll tag this for user testing to confirm if that's cool with you

@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 21, 2025

Test fails because they compare date with time and date without time.

@frjo frjo force-pushed the enhancement/project_start_end_updates branch from 9ace482 to 424039e Compare April 21, 2025 20:12
@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 21, 2025

Rebased after report app refractor.

@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Apr 21, 2025

@frjo I have a few more small tweaks coming based on a some of my code changes, might add a few more unit tests too

@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 Apr 21, 2025
… informative for when `PROJECTS_START_AFTER_CONTRACTING` is enabled
@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Apr 21, 2025

I added an error message for the end date being before the start date in the modal along with some info regarding when the start date will be set if PROJECTS_START_AFTER_CONTRACTING is enabled - should be about ready
Screenshot 2025-04-21 at 18 02 26

@frjo frjo removed Status: Needs testing Tickets that need testing/qa Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Apr 23, 2025
@frjo frjo merged commit d7966fd into main Apr 23, 2025
7 checks passed
@theskumar theskumar deleted the enhancement/project_start_end_updates branch July 20, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the proposed start & end dates on projects more usable and prominent

2 participants