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

Task fails to save when Start Date is set to anytime before the day after tomorrow #13

Closed
murchu27 opened this issue Aug 29, 2021 · 9 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@murchu27
Copy link

murchu27 commented Aug 29, 2021

Whenever I'm creating a new task, or modifying an existing one, the below error will appear if "Start Date" is set. The task saves successfully as long as "Start Date" is not set.

[UPDATE] This error only appears when "Start Date" is set to some time before the day after tomorrow. I tested this on August 30, and the screenshots below show that the task fails to save when "Start Date" is set to August 31 23:59, but succeeds when set to September 1 00:00. I tried many dates before August 31 23:59, and all failed. I also tried many dates after September 1 00:00, and all succeeded.

[UPDATE 2] Of course, I have also tested doing this through the Kanboard web client, and I can set any date from there.

Expected behaviour is to be able to set "Start Date" to any date, and for the task to save successfully.

I'm using:
Kanboard v1.2.20
Khanos v1.1.3

Screenshot_20210830-103730_1
Screenshot_20210830-104247_1

@Jeoxs Jeoxs self-assigned this Aug 29, 2021
@Jeoxs
Copy link
Owner

Jeoxs commented Aug 29, 2021

Hello! This is happening because of one validation in Kanboard's API Procedures. For what I can see, When you stablish a start date, you must set the Due Date, too. You can check it out here: Kanboard's Github. I couldn't replicate this on my end. My Kanboard instance allowed me to create the task without Due Date when setting a Start Date. Maybe, because of the Version difference (Mine is 1.2.14 while yours is 1.2.20). The other problem I see is that API procedures doesn't return the error message. It only returns false on error.

One workaround here would be to make the Due/Start date a required field when one of the two are set. That way, the Instance won't run into problems when creating or updating the task. I'll put more thinking on this!

@Jeoxs Jeoxs added the bug Something isn't working label Aug 29, 2021
@Jeoxs Jeoxs added this to To do in Khanos via automation Aug 29, 2021
@murchu27
Copy link
Author

Hey @Jeoxs , thanks for the suggestion, but I actually also get this error when Due Date is set. I can also set a Due Date without a Start Date, and this works just fine.

I'll try to dig into my logs whenever I get a chance to see if there's any clues there

@Jeoxs
Copy link
Owner

Jeoxs commented Aug 29, 2021

hey, @murchu27 I see! Then, the real issue is with another field. Yes, if you could check the logs, it would be great.

@murchu27
Copy link
Author

Had a little bit of trouble getting the headers out of my logs to see what was being sent, but I did notice some more specific behaviour around when this fails. I'm going to update the issue description now.

@murchu27 murchu27 changed the title Task fails to save when Start Date is set Task fails to save when Start Date is set to today or tomorrow's date Aug 30, 2021
@murchu27 murchu27 changed the title Task fails to save when Start Date is set to today or tomorrow's date Task fails to save when Start Date is set to anytime before the day after tomorrow Aug 30, 2021
@Jeoxs
Copy link
Owner

Jeoxs commented Sep 1, 2021

Hey! I'm trying to replicate this specifying a start day of Tomorrow at 23:59 but the API allows me to create/update it. I'll keep digging to see why it fails on your end with that specific condition

@murchu27
Copy link
Author

murchu27 commented Sep 1, 2021

That's weird... if I get a chance, I'll try curl my endpoint to see the response that way, as I'm still not sure how to see the headers of requests in my Apache log.

The two API endpoints used are createTask and updateTask, yeah?

@Jeoxs
Copy link
Owner

Jeoxs commented Sep 2, 2021

Hey @murchu27 ! Yes, the API methods are createTask and updateTask. Most of the fields are optional.

@murchu27
Copy link
Author

murchu27 commented Sep 2, 2021

So the methods worked fine when I requested them with curl, and then when I went back to try on the app, all of a sudden that was working fine. No idea what the problem was here.

I'm going to close this. If someone else has the same problem as me later, we can reopen it and review.

@murchu27 murchu27 closed this as completed Sep 2, 2021
Khanos automation moved this from To do to Done Sep 2, 2021
@jtejido
Copy link

jtejido commented Apr 14, 2023

It's a problem with the date format used in the /pages/task_form.dart....the backend api accepts MM/dd/yy but the form is submitting it as dd/MM/yy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants