feat: recurring for quick add magic #1105

Merged
konrad merged 6 commits from feature/recurring-nlp into main 2021-12-07 20:08:40 +00:00
Owner

This PR adds support for recurring tasks to quick add magic.
This means you can do something like "Bring out the trash every week" and it will create a task that repeats every week.

It supports all types of repeating amounts you can set on the task detail page.

Relevant forum discussion: https://community.vikunja.io/t/natural-language-for-recurring-tasks/478

This PR adds support for recurring tasks to quick add magic. This means you can do something like "Bring out the trash every week" and it will create a task that repeats every week. It supports all types of repeating amounts you can set on the task detail page. Relevant forum discussion: https://community.vikunja.io/t/natural-language-for-recurring-tasks/478
konrad added 1 commit 2021-11-28 17:17:51 +00:00
continuous-integration/drone/pr Build is passing Details
6bba72fe0c
feat: recurring for quick add magic
konrad requested review from dpschen 2021-11-28 17:17:55 +00:00
konrad added 1 commit 2021-11-28 17:20:09 +00:00
continuous-integration/drone/pr Build is failing Details
4624c1c66e
fix: actually save the repeating amount
Member

Hi konrad!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://1105-featurerecurring-nlp--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi konrad! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://1105-featurerecurring-nlp--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
dpschen approved these changes 2021-11-28 20:16:19 +00:00
dpschen left a comment
Member

There can be a lot of cases added.
Other then that really nice! =)

There can be a lot of cases added. Other then that really nice! =)
@ -135,0 +169,4 @@
const amount = results[3] ? parseInt(results[3]) : 1
let type: RepeatType = RepeatType.Hours
switch (results[4]) {

Missing a lot of cases.
Some inspiration: https://en.wiktionary.org/wiki/Category:English_frequency_adverbs

I guess this is the stuff where Todoist really performes well =)

Missing a lot of cases. Some inspiration: https://en.wiktionary.org/wiki/Category:English_frequency_adverbs I guess this is the stuff where Todoist really performes well =)
Author
Owner

Wow that's a long list! I think including some of them makes sense, some others are a topic for another day. The quick wins like yearly, weekly, monthly etc should be included.

Wow that's a long list! I think including some of them makes sense, some others are a topic for another day. The quick wins like yearly, weekly, monthly etc should be included.
Author
Owner

Added a few more cases. I think this is fine for now.

Added a few more cases. I think this is fine for now.
konrad marked this conversation as resolved
konrad added 1 commit 2021-12-04 19:26:12 +00:00
continuous-integration/drone/pr Build is failing Details
903d02be61
Merge branch 'main' into feature/recurring-nlp
konrad added 1 commit 2021-12-04 20:07:31 +00:00
continuous-integration/drone/pr Build is failing Details
fbeeff6e59
feat: add support for more cases
konrad added 1 commit 2021-12-04 20:14:29 +00:00
continuous-integration/drone/pr Build is passing Details
88a115a6b0
fix: passing null as amount
konrad requested review from dpschen 2021-12-04 20:16:22 +00:00
dpschen reviewed 2021-12-05 22:43:23 +00:00
@ -133,2 +157,4 @@
}
const getRepeats = (text: string): repeatParsedResult => {
const regex = /((every|each) ([0-9]+ )?(hours?|days?|weeks?|months?|years?))|anually|bianually|semiannually|biennially|daily|hourly|monthly|weekly|yearly/ig

I think we should also add written numbers. E.g. 'every two days'

I think we should also add written numbers. E.g. 'every two days'
Author
Owner

Hmm yes. The question is, how much should we include? I don't think we can add all numbers as words. Maybe only up to 10?

You probably will use the other variants anyway, eg instead of saying "28 days" you'd say "4 weeks".

Hmm yes. The question is, how much should we include? I don't think we can add all numbers as words. Maybe only up to 10? You probably will use the other variants anyway, eg instead of saying "28 days" you'd say "4 weeks".

Yes I meant all the words that are not composed. Especially the ones under 10.
At least in German it is usual to write numbers under ten sometimes twenty (😆 ) in letters (as you know), but I guess it's the same for English aswell. So I guess:

One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Eleven
Twelve
Thirteen
Fourteen
Fifteen
Sixteen
Seventeen
Eighteen
Nineteen

Yes I meant all the words that are not composed. Especially the ones under 10. At least in German it is usual to write numbers under ten sometimes twenty (😆 ) in letters (as you know), but I guess it's the same for English aswell. So I guess: One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen
Author
Owner

Added for all numbers up until 10, I think that should be enough.

Added for all numbers up until 10, I think that should be enough.
konrad marked this conversation as resolved
konrad added 1 commit 2021-12-07 19:36:39 +00:00
continuous-integration/drone/pr Build is passing Details
32062b3b82
feat: add support for passing in numbers as words
dpschen approved these changes 2021-12-07 19:39:05 +00:00
konrad merged commit 8b8e413af0 into main 2021-12-07 20:08:40 +00:00
konrad deleted branch feature/recurring-nlp 2021-12-07 20:08:40 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.