alfred-clickup-msk
alfred-clickup-msk copied to clipboard
Time being inserted when setting Date with No Time
Describe the bug
When creating a new task using @today
or @tomorrow
- there is an issue with a space afterward, as referenced in #23 - additionally however, it is inserting a time with the due date even when one is not given. Specifically for these 2 dates, it is adding the current Time of Day as the due time. This should not happen as I'm not specifying a time.
To Reproduce Steps to reproduce the behavior:
- Create a new task
- Specify the
@today
tag on your task - In ClickUp the task will appear with a due date of today with the current time of day when the task was created as the due time.
Expected behavior If I do not specify a time, a time should not be added to the due date.
Alfred version Alfred 4.3.2
Debug log
[10:36:21.321] Logging Started...
[10:36:29.847] ClickUp[Script Filter] Queuing argument 'test @today'
[10:36:30.134] ClickUp[Script Filter] Script with argv 'test @today' finished
[10:36:30.136] STDERR: ClickUp[Script Filter] .
10:36:30 workflow.py:2061 DEBUG ---------- ClickUp (1.1.2) ----------
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 workflow.py:2343 DEBUG update check not due
10:36:30 main.py:638 DEBUG [ main() ] - test @today
10:36:30 main.py:220 DEBUG [ firstRun() ]
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 workflow.py:2225 DEBUG last run version: 1.1.2
10:36:30 workflow.py:2225 DEBUG last run version: 1.1.2
10:36:30 main.py:235 DEBUG [ checkConfig() ]
10:36:30 workflow.py:2461 DEBUG got password : com.msk.clickup2.0:clickUpAPI
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 main.py:361 DEBUG [ getNameFromInput() ]
10:36:30 main.py:364 DEBUG inputName: test
10:36:30 main.py:376 DEBUG [ getContentFromInput() ]
10:36:30 main.py:382 DEBUG inputContent:
10:36:30 main.py:394 DEBUG [ getTagsFromInput() ]
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 main.py:408 DEBUG inputTags: []
10:36:30 main.py:435 DEBUG [ getDueFromInput() ]
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 main.py:502 DEBUG Received relative date: 2021-03-09 10:36:30.053677
10:36:30 main.py:503 DEBUG 2021-03-09 10:36:30.054075
10:36:30 main.py:565 DEBUG inputDue: 2021-03-09 10:36:30.053677
10:36:30 main.py:580 DEBUG [ getListFromInput() ]
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 main.py:590 DEBUG inputList: 39716734
10:36:30 main.py:591 DEBUG {}
10:36:30 main.py:603 DEBUG [ getPriorityFromInput() ]
10:36:30 main.py:612 DEBUG inputPriority: None
10:36:30 main.py:275 DEBUG [ addCreateTaskItem() ]
10:36:30 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:30 main.py:311 DEBUG [ formatNotificationText() ]
10:36:30 main.py:350 DEBUG [ formatDate() ]
10:36:30 main.py:250 DEBUG [ checkUpdates() ]
10:36:30 workflow.py:1695 DEBUG loading cached data: /Users/shawnmix/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.msk.clickup2.0/__workflow_latest_version.cpickle
10:36:30 workflow.py:2254 DEBUG set last run version: 1.1.2
10:36:30 workflow.py:2103 DEBUG ---------- finished in 0.051s ----------
[10:36:30.138] ClickUp[Script Filter] {"items": [{"arg": "{\"inputDue\": \"2021-03-09 10:36:30.053677\", \"inputContent\": \"\", \"inputPriority\": null, \"inputName\": \"test\", \"inputList\": null, \"inputTags\": []}", "valid": true, "subtitle": "\ud83d\udcc52021-03-09 10:36 ", "variables": {"isSubmitted": "true"}, "title": "Create task \"test\"?"}]}
[10:36:32.984] ClickUp[Script Filter] Queuing argument 'test @today '
[10:36:33.196] ClickUp[Script Filter] Script with argv 'test @today ' finished
[10:36:33.206] STDERR: ClickUp[Script Filter] .
10:36:33 workflow.py:2061 DEBUG ---------- ClickUp (1.1.2) ----------
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 workflow.py:2343 DEBUG update check not due
10:36:33 main.py:638 DEBUG [ main() ] - test @today
10:36:33 main.py:220 DEBUG [ firstRun() ]
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 workflow.py:2225 DEBUG last run version: 1.1.2
10:36:33 workflow.py:2225 DEBUG last run version: 1.1.2
10:36:33 main.py:235 DEBUG [ checkConfig() ]
10:36:33 workflow.py:2461 DEBUG got password : com.msk.clickup2.0:clickUpAPI
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 main.py:361 DEBUG [ getNameFromInput() ]
10:36:33 main.py:364 DEBUG inputName: test
10:36:33 main.py:376 DEBUG [ getContentFromInput() ]
10:36:33 main.py:382 DEBUG inputContent:
10:36:33 main.py:394 DEBUG [ getTagsFromInput() ]
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 main.py:408 DEBUG inputTags: []
10:36:33 main.py:435 DEBUG [ getDueFromInput() ]
10:36:33 workflow.py:1468 DEBUG reading settings from /Users/shawnmix/Library/Application Support/Alfred/Workflow Data/com.msk.clickup2.0/settings.json
10:36:33 workflow.py:2103 DEBUG ---------- finished in 0.033s ----------
[10:36:33.208] ClickUp[Script Filter] {"items": [{"autocomplete": "test @today ", "valid": false, "subtitle": "Please use 24h time format with a dot - example: 15.00", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"}, "title": "Not a valid time."}]}
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Hi @1activegeek you're right, at the moment it works as you described, there will always be a time added to the due date. I'll flag this as an enhancement as this was the original intention and back then not possible to omit the time. Now that we have the "due_date_time
flag I'll see whether I'm going to add this as an option or change the default.
Will take a bit until I have the time to implement that, but feel free to send in a pull request!
Totally understood, I know things change quickly with ClickUp! This integration is one of the key things for me as I'm coming from Todoist where I had the ability to essentially do the same thing. It's critical to get stuff out of my head and into the app, so thank you for that!
I'll see if I can dig into the workflow at any point and see where the change needs to be made if my feeble coding can change it up I will absolutely setup a PR. Appreciate the great work!
Hi @1activegeek could you take this version for a test drive? Dates/times with a space after should now work as well (as you reported on https://github.com/mschmidtkorth/alfred-clickup-msk/issues/23). I haven't touched this issue's intention, however.
@mschmidtkorth I just pulled it down and it does look like this addresses the space issue after the today/tomorrow tag. It shows proper in the response in the line. However it does still show a time, in this case inserting 00:00. Not sure on your previous message, but sounds like perhaps you knew this.