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

Start/End date format, validation bug & date picker overflow issue fix #2915

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

anirudhsk2107
Copy link

Description

  1. Navigate to Other Links → Projects → WBS → Click on WBS name → Add Task
    Bug: When the End Date is set earlier than the Start Date, the error message 'Due Date must be greater than Start Date' appears for both fields, but it should only appear for the End Date.
    Start_Date_Bug_Fix_1

  2. Navigate to Other Links → Projects → WBS → Click on WBS name → Task Edit → Edit
    Bug: When the Start Date and End Date are corrected in the Update Task modal (with the Start Date set earlier than the End Date), error messages are still displayed for both dates.
    Start_Date_Bug_Fix_2

  3. Navigate to Other Links → Projects → WBS → Click on WBS name → Task Edit → Edit
    Bug: When the End Date is updated to a date earlier than the Start Date, I was able to save the incorrect updates despite the error messages being displayed.
    Start_Date_Bug_Fix_3

  4. Navigate to Other Links → Projects → WBS → Click on WBS name → Task Edit → Edit
    Bug: When opening a task for editing with incorrectly set dates(see image above), the End Date appears as unspecified (the default date is shown in the End Date field in the image below).
    The format of the Start Date does not match the format of the End Date in the Edit Task modal.
    Start_Date_Bug_Fix_4

  5. Also Fixed the appearance for the date picker in the modal.
    In the same page, while opening the date picker there used to be additional space added to the modal.

Related PRS (if any):

Preciously PR 2812 was raised for the same bugs. Due to issues in merge conflict, raising a new PR with the updated fix.

Main changes explained:

  • Added error message validation in EditTaskModal.jsx for Start Date and End Date, ensuring users input correct date values.
  • Fixed error messages persisting on closing or minimizing the modal by resetting state and clearing errors using the useEffect hook.
  • Fixed the format issue for start date when clicking on "Edit"
  • Date picker appearance adjusted. The white space is no longer added to the modal.

How to test:

  1. Check into current branch
  2. Do npm install and run this PR locally
  3. Clear site data/cache
  4. Log as owner/admin user
  5. Go to dashboard→ Projects → WBS -> Select Task
  6. Edit any task (Add a new one if no tasks are available)
  7. Check if the edit allows the start date to be more than the end date.

Screenshots or videos of changes:

Start_Date_Bug_Fix.mp4

Note:

The add task page can be navigated to here in this video
This PR is related to front end PR 2335. Same bugs were fixed in the Add Task modal.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 36c1018
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/674f74ef4b7e760008bf82d9
😎 Deploy Preview https://deploy-preview-2915--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ppsahu
Copy link

ppsahu commented Dec 4, 2024

I have tested this PR and all the changes are working as expected. I noticed one minor difference, when the pop up window appears after clicking edit, at the bottom there is a slight UI change in the Endstate section, like the white border changes to transparent. I did not see that in the video above that was put in the description. Otherwise, everything is good. Below is the screen recording for reference. I hope it helps.

Screen.Recording.2024-12-03.at.11.26.06.PM.mov

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.

2 participants