Tasks: Subtasks don't display properly in "Today" and "Week" Smart Collections

Created on 1 Jun 2017  Â·  3Comments  Â·  Source: nextcloud/tasks

Steps to reproduce

  1. Create Task A without a due date
  2. Create Task A1 as a subtask in Task A with due date of Today (or Tomorrow)
  3. Create Task A2 as a subtask of Task A with due date a month from today
  4. Create Task B with due date of Today
  5. Create Task B2 with due date a month from today
  6. Click on Today or Week Smart Collection icon

Expected behaviour

  1. I would expect Task A not to appear under either Today or Week since there's no due date.
  2. I would expect that Task A1 would appear under both Today and Week since it's got a due date of Today (or Tomorrow)
  3. I would not expect Task A2 to appear under either Today or Week since the due date is neither Today nor Tomorrow
  4. I would expect Task B to appear with under either Today or Week
  5. I would not expect Task B2 to appear under either Today or Week

Actual behaviour

Task A1 doesn't appear when Task A has no due date set.
If Task A is set with a due date (Today or within a week), then Task A and Task A1 will show up
Task B appears along with Task B2

I suspect this is a database query condition that assumes that the top-level task will have a due date set and doesn't cover the possibility of a subtask having a different due date than the parent task (or that the subtask may have a due date later than the parent task... in which case I would consider it reasonable that the parent task's due date is automatically moved to the latest of the subtasks)

One work-around to get it to display properly is to have the query return the nearest future due date of a subtask if the parent task doesn't have a specified due date, or if the subtask's due date is earlier than the task's due date.

Server configuration

Operating system: Linux tf1-owncloud9 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64

Web server: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 5.1.56

PHP version: 7.0.15-0ubuntu0.16.04.4
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imap, intl, json, exif, mcrypt, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 11.0.3 (stable) - 11.0.3.2

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Signing status:


Signing status

[]

List of activated apps:


App list

Enabled:
 - activity: 2.4.1
 - admin_audit: 1.1.0
 - apporder: 0.3.3
 - bookmarks: 0.10.0
 - calendar: 1.5.3
 - comments: 1.1.0
 - contacts: 1.5.3
 - dav: 1.1.1
 - federatedfilesharing: 1.1.1
 - federation: 1.1.1
 - files: 1.6.1
 - files_accesscontrol: 1.1.2
 - files_automatedtagging: 1.1.1
 - files_pdfviewer: 1.0.1
 - files_sharing: 1.1.1
 - files_texteditor: 2.2
 - files_trashbin: 1.1.0
 - files_versions: 1.4.0
 - files_videoplayer: 1.0.0
 - firstrunwizard: 2.0
 - gallery: 16.0.0
 - issuetemplate: 0.2.1
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - nextcloud_announcements: 1.0
 - notifications: 1.0.1
 - onlyoffice: 1.0.4
 - password_policy: 1.1.0
 - provisioning_api: 1.1.0
 - serverinfo: 1.1.1
 - sharebymail: 1.0.1
 - survey_client: 0.1.5
 - systemtags: 1.1.3
 - tasks: 0.9.5
 - templateeditor: 0.2
 - theming: 1.1.1
 - twofactor_backupcodes: 1.0.0
 - updatenotification: 1.1.1
 - weather: 1.3.5
 - workflowengine: 1.1.1

Disabled:
 - encryption
 - external
 - files_external
 - files_retention
 - mail
 - user_external
 - user_ldap
 - user_saml

The content of config/config.php:


Config report

{
    "instanceid": "oc8pncae8r7f",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud.mesozoictech.com"
    ],
    "datadirectory": "\/var\/www\/nextcloud\/data",
    "overwrite.cli.url": "http:\/\/cloud.mesozoictech.com\/",
    "dbtype": "mysql",
    "version": "11.0.3.2",
    "dbname": "tf1_owncloud",
    "dbhost": "192.168.0.39:3306",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "UTC",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "installed": true,
    "theme": "",
    "loglevel": 2,
    "maintenance": false,
    "trashbin_retention_obligation": "auto",
    "updatechecker": false,
    "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
    "preview_max_x": 2048,
    "preview_max_y": 2048,
    "preview_max_scale_factor": 10,
    "preview_max_filesize_image": 50,
    "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown"
    ],
    "mail_from_address": "xxxxxxxxx",
    "mail_smtpmode": "php",
    "mail_domain": "xxxxxxxx",
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

Are you using external storage, if yes which one: files_external is disabled

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Operating system:

Logs

Web server error log


Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)


Nextcloud log
Insert your Nextcloud log here

Browser log


Browser log
```
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
```

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

**Are you using external storage, if yes which one:** local/smb/sftp/...

**Are you using encryption:** yes/no

**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...

#### LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/nextcloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM oc_appconfig WHERE appid = 'user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

### Client configuration
**Browser:**

**Operating system:**

**CalDAV-clients:**

### Logs
#### Web server error log

Insert your webserver log here

#### Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
```

enhancement

Most helpful comment

I plan to show all parent/ancestor tasks when a subtask should appear in the important, today and week smartlists. This should cover the issue.

All 3 comments

I plan to show all parent/ancestor tasks when a subtask should appear in the important, today and week smartlists. This should cover the issue.

Please have a look at #431 and comment there how to do it.

Closed with #431

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smirkybg picture smirkybg  Â·  6Comments

robingenz picture robingenz  Â·  7Comments

gjgd picture gjgd  Â·  6Comments

CordlessWool picture CordlessWool  Â·  8Comments

janvonde picture janvonde  Â·  8Comments