"create task from email" option should not be there when Tasks app is not installed
Steps to reproduce
- have mail app installed but not tasks
- in a received email, click the ... menu > more actions > create task
- modal shows, you enter details
- error: could not create task
Expected behavior
the option "create task" should only be there when Tasks app is installed
Actual behavior
- error: could not create task
Mail app version
3.7.5
Mailserver or service
No response
Operating system
No response
PHP engine version
None
Web server
None
Database
None
Additional info
NC 29.0.1
This is debatable. I don't use the Tasks app at all, I don't have it installed. But I use jtxboard on my Android phone with tasks. So for me it still makes sense to have Create task in Mail.
This is debatable. I don't use the Tasks app at all, I don't have it installed. But I use jtxboard on my Android phone with tasks. So for me it still makes sense to have Create task in Mail.
Hm, but that seems like quite a corner case. AFAIK Nextcloud tries to use sane defaults for 90% or 99% of users. And my take would be that 99% of users only need this button if Tasks is installed, otherwise it clutters the interface.
In your setup, if my proposal is implemented, you could just install Tasks and never use it in the browser, and continue with jtxboard like before.
An alternative could be to leave the button, but to show a warning "Tasks App is not installed. Ask your Administrator. Continue anyway? YES/NO". But I still believe my original proposal is the best way to go.
@jancborchardt what shall be done?
Why is the "error: could not create task" shown? Since the DAV backend is there, the task could just be created, right?
I agree with @ChristophWurst that this functionality is nice to keep even if the Tasks app is not enabled, also because other apps like Deck or mobile/desktop clients as Christoph said use the same backend.
Why is the "error: could not create task" shown? Since the DAV backend is there, the task could just be created, right?
Good question. @alexanderdd could you check the browser console for details?
Possible reasons are
- Lack of permission (calendar shared by someone and Mail didn't check ACLs)
- Lack of component type support (calendar does not support VTODO and Mail didn't check)
- Network error
- Maintenance mode/upgrade
Browser console output after clicking "create task" in an email:
14:14:44.612 [ERROR] mail: Creating event from message failed
Object { app: "mail", uid: "admin", level: 2, error: TypeError }
​
app: "mail"
​
error: TypeError: e.calendar.dav is undefined
​
level: 2
​
uid: "admin"
​
<prototype>: Object { … }
​​
__defineGetter__: function __defineGetter__()
​​
__defineSetter__: function __defineSetter__()
​​
__lookupGetter__: function __lookupGetter__()
​​
__lookupSetter__: function __lookupSetter__()
​​
__proto__:
​​
constructor: function Object()
​​
hasOwnProperty: function hasOwnProperty()
​​
isPrototypeOf: function isPrototypeOf()
​​
propertyIsEnumerable: function propertyIsEnumerable()
​​
toLocaleString: function toLocaleString()
​​
toString: function toString()
​​
valueOf: function valueOf()
​​
<get __proto__()>: function __proto__()
​​
<set __proto__()>: function __proto__()
ConsoleLogger.js:74:18
value ConsoleLogger.js:74
value ConsoleLogger.js:100
onSave TaskModal.vue:201
VueJS 33
Can reproduce with stable3.7.
Seems fixed with main.