creecros / Mailmagik

Kanboard Plugin - Send emails to Kanboard and convert to tasks or comments
MIT License
22 stars 3 forks source link

Task not getting created Unless at least one task is there in the project #16

Closed isvfgs closed 1 year ago

isvfgs commented 1 year ago

First of all good work. This plugin indeed a good required addition to the kanboard.
I would like to inform an issue noticed

When I send email to create the task, it is not getting created t unless there is at least one task already created mannually through the interface.

Steps to create.

  1. Create a new project
  2. Setup all the necessary auto actions.
  3. Note down the project id and send mail to create the task

->Problem : Task is not created. ( mail is not getting the read status )

  1. Create a task in that project through the interface
  2. The task send through mail get created after the first task
alfredbuehler commented 1 year ago

Thank you for your issue. This seems to be a Kanboard feature. If a project doesn't have any tasks, the registered action isn't invoked for that project.

creecros commented 1 year ago

@alfredbuehler is correct, the daily cronjob event is linked to tasks only, so there must be a task to trigger.

I actually never even thought about that. I do wonder, if I can create my own event linked to the project model...and use that to trigger the cron. I have no idea. if I can't figure that out, I'll at least add a mention of this in the readme.

creecros commented 1 year ago

Ok, so, can it be done? Yes. But, I would need to override at least the projectmodel to do it....and I'm not really cool with that, i don't want any overrides, especially the project model. More maintenance down the road. I think the best approach would be to add Project Related events to kanboard itself. So as for this plugin, in KBs current state, I'm going to say, no.

I tried to find any project related events built in, and the only ones were Project File Events, so, that's kind of pointless.

alfredbuehler commented 1 year ago

Although it's a minor limitation, my recommendation is: forget it. I wouldn't change anything. The actions are task bound, if there is none… But it should be mentioned in docs/README.

creecros commented 1 year ago

Yes, %100 agree. I'll update the Readme, want to run a few tests first. Make sure I understand the criteria exactly.

creecros commented 1 year ago

it's good that i tested, noticed an issue with the subject parsing.

But the exact criteria is there must be 1 open task in the project.

isvfgs commented 1 year ago

@creecros I recommend not to put the email polling through the general cron job instead to define a seperate cron job.

Let me explain a problem I encounterd .

The general cron job also used to sent out reminders for tasks that are due , so we could set only daily schdule for it.

But for taks generation through email , should be somthing to be executed at least hourly.

So putting both jobs in same cron will flood up the email inbox if you have enabled the email notifications.

alfredbuehler commented 1 year ago

Yes, this might be an issue. Maybe we should find a reasonable solution for this.

creecros commented 1 year ago

how are the reminders sent? is it another action, or are we talking about built in notifications

isvfgs commented 1 year ago

We talking about built in notifications .. ( when we subscribe to notifications from profile section )

creecros commented 1 year ago

got it, let me think on this.

isvfgs commented 1 year ago

It is possible to have a separate cron job cli path for this plugin ? That will resove this problem

creecros commented 1 year ago

probably, maybe...I have no idea. this possible issue had crossed my mind. just need to think about it.