-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix AddParser #204
Fix AddParser #204
Conversation
return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, | ||
AddCommand.MESSAGE_USAGE)); | ||
} else { | ||
return new AddCommand(args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rachx, a quick fix I made up. Is this valid? Basically, if we don't fit the 2 criteria, just send the entire incoming string directly to AddCommand(Str)
@rachx Updated with quotation support. Can you check? |
Schedule should be fine right? How about the following input
I am thinking if we should save with the inverted commas Instead of using " ", can we use something that the user is unlikely to use and easy to type |
oh ya, you might need to change the add tests in logic manager test |
Schedule is fine. Possible... we could change the delimiter to something else. @INCENDE? |
@rachx for safe, I'll just remove the quotation marks in the screenshots |
@fanwgwg Don't remove them yet. Let's come to a decision first so that you don't need to do double work |
okay that's fine! |
@rachx please verify |
…and to format, update logic manager test to test escape character
if (!dateTimeMap.containsKey(ARGS_FROM) | ||
&& !dateTimeMap.containsKey(ARGS_TO) | ||
&& !dateTimeMap.containsKey(ARGS_BY)) { | ||
if (!hasDeadlineKeyword && !hasStartTimeKeyword && !hasEndTimeKeyword) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@burnflare @fanwgwg @INCENDE I change the escape character from " " to ' ' only (easier to type and people can still use double inverted commas as normal, no need to redo screenshot) so
Some small problems
|
hmmm fix and decide on this and check that everything works after fixing gcal? |
I did some light testing and it looks good. @INCENDE Could you test this too? |
how about add by 8pm? |
Thinking about it.... there's noting wrong with accepting If user inputs |
Okay. Initially, I was thinking of incorrect format since the name is missing. It recognises add from 4pm to 8pm as incorrect format |
Assigning to @rachx as I can't approve my own PR. Feel free to approve and merge when you're ready. |
good to go |
Fixes #202