Add multiple "tasks" at once

My partner typically texts me her grocery list with each item on a new line.

Would it be difficult to make it so that I could paste this whole list into the command bar and have it separate into separate items based on a delimiter (new line or comma?).

This would be a great time saver for quickly doing lots of entries in general, to be honest. You could quickly generate entries in something like excel and then bulk import them from the command bar.

1 Like

I havenā€™t tried this, but you can try and insert it directly using SQL as a workaround.

From a software perspective it doesnā€™t sound too difficult to add this. UX-wise, Iā€™m not sure where to put this. Maybe something like pressing shift-enter in the task input field would open it up to be multiline, then one task per line?

While you can do that, itā€™s probably a better idea to just use the api for this directly. I bet you even could build a vba script that directly inserts tasks from an excel sheet.

Iā€™m not even concerned about the visuals to be honest. If it was simply a single-line field the same as it currently is, where the text overflows off the end of the text box thatā€™s fine by me. :smiley: Iā€™d only be using the input field for ā€œpasteā€ > ā€œenterā€ when trying to do multiple tasks, assuming the input field can correctly identify separate tasks based on new line or break tags.

Trying to split into a multi-line field could get messy if you try and create 10+ ā€œtasksā€ at once. It also kinda defeats the purpose and you might as well just enter them separately.

The only real use case for this that I can think of is for quickly pasting content in. It would be nice to just be able to ā€œSelect allā€ > ā€œCopyā€ > ā€œPasteā€ > ā€œEnterā€ to get things in. Bonus points if it can strip common bullet point formatting (eg. ā€œ-ā€) and numbering from the start of each task. :smiley:

Could you automatically convert new-line or break tags into a delimiter of some sort (eg ā€œ;ā€) when itā€™s pasted into the field? This could make it easy to spot and allow the user to move sideways through the text to edit if required.

My shopping lists, I just have a task with the shop name and use a markdown list for the items.

Obviously you cant check those off though. I wonder if itā€™s possible to have ā€˜checkableā€™ list within the text areas?

Like this
EDIT: Oooh that already works! There is just no button in the edit toolbar for itā€¦and the ā€˜checkedā€™ status doesnā€™t save if you just click (as opposed to edit).

Markdown syntax example:

- [ ] item 1
- [ ] item 2
- [x] item 3

UI wise this feels right to me? Not sure it helps with the past to nice checklist conversion though.

I mean, that does work but itā€™s not much different to just reading the SMS my partner sends me with details of what to get aha. I donā€™t know if itā€™s worth the effort to format every grocery list in such detail vs just trying to decipher the plain text. Which is why a simple list based on pasting preformated text would be incredible. :slight_smile:

That said, I can totally understand that it might not be worth the dev time if they have more important things to work on. Iā€™d definitely make use of it if you added it though :smiley:

Itā€™s not entirely beyond possible that you could paste a space or comma separated list into the text area, select it, then tap a ā€˜checklistā€™ button to have it automatically formatted.

Just made this list below by writing each animal on a new line, selecting all lines and clicking on the ordered list button.

  1. horse
  2. monkey
  3. pig
  4. cow

But yeah, the functionality isnā€™t there right now for checklists, I was just pointing out that the basis of it is. But Iā€™m not a devā€¦

Related: Lists, but not lists of tasks

1 Like

Thanks for all of your input! Iā€™ve added this to the backlog and will try put something together. Low priority though.

@adrinux if you use * instead of - for your checkbox list, it will recognise and update when you click on a checkbox.

1 Like

Enjoying finding little bits of Vikunja I havenā€™t learnt yet :slight_smile:

2 Likes

Iā€™ve actually implemented this a few days ago in 442e6b12e0. You can now either paste a block of text with multiple lines or create new lines with shift + enter in the ā€œnew taskā€ input box in the list view. Vikunja will then create a new task for each line of text input.

Already in unstable and on try, please test and tell me what you think!

Finally got around to trying that on try and it doesnā€™t seem to work.

Both pasting text with new lines into an edit textarea and using soft return in the add new task input box just put everything on one line. Even when I added list formatting. (Well, pasting into a textarea with list formatting works, just no the add new task input.)

Ah you mean that it creates multiple tasks with all lines in one line?

That looks like a recently introduced bug.

I wasnā€™t paying enough attention, but yes, thatā€™s exactly what happens :slight_smile:

Should be fixed in 6394485524. The CI is currently in the process of releasing a new version, please try once thatā€™s ready in ~30 min on try.

1 Like

@kolaente I have just tried this amazing feature where I can add a list of tasks by just pasting a list of data.

One problem:
All tasks have the same task ID. Please see here from try.vikunja.io:

If the list is longer, say 60+ lines, then every 10 or so tasks get new ID.

This might be a bug with parsing?

It might actually be unrelated to parsing. I suspect a race-condition because all of these tasks are created in parallel, will look into a fix.

1 Like

The problem where multiple tasks get the same ID is now fixed in 55dd7d2981, please check with the next unstable build (should be ready for deployment in ~45min, also on try).

1 Like

@kolaente thank you! It works on try.vikunja.io. I will test it on my side later.

1 Like