Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task Does Not Remember Percent Complete or Priority On Status Change #2335

Closed
drankinatty opened this issue Sep 8, 2023 · 4 comments · Fixed by #2365
Closed

Task Does Not Remember Percent Complete or Priority On Status Change #2335

drankinatty opened this issue Sep 8, 2023 · 4 comments · Fixed by #2365
Labels
Milestone

Comments

@drankinatty
Copy link

Steps to reproduce

  1. Enter any task
  2. Set the percent complete and/or priority
  3. Change status to needs attention, change back, percent complete and priority lost

Expected behaviour

When a task needs attention, the admin (or responsible party) addresses the issue and then returns the task to in process. The percent complete and priority of the task before the needs attention status was set should be restored.

Actual behaviour

After needs attention is set, and the issue addressed, returning the task to in process causes the percent complete to be reset to the beginning and priority to be reset to 1 (high) - this makes no sense and loses valuable information.

Server configuration

Operating system:

Running on Archlinux: 6.4.12-arch1-1

Web server:

Apache/2.4.57 (Unix) OpenSSL/3.1.2

Database:

mariadb 11.1.2-1

PHP version:

mod_fcgid/2.3.9 PHP/8.1.23

Nextcloud version: (see Nextcloud admin page)

Nextcloud Hub 5 (27.0.2)

Tasks version: (see Nextcloud apps page)

0.15.0

Updated from an older Nextcloud or fresh install:

Fresh install

Signing status:

No clue - cert by Let's Encrypt

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.19.0
  - calendar: 4.4.5
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.3.2
  - dashboard: 7.7.0
  - dav: 1.27.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - groupfolders: 15.0.2
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0

Nextcloud configuration:

{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "default_locale": "en_US",
        "default_phone_region": "US",
        "knowledgebaseenabled": true,
        "apps_paths": [
            {
                "path": "\/usr\/share\/webapps\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/lib\/nextcloud\/apps",
                "url": "\/wapps",
                "writable": true
            }
        ],
        "trusted_domains": [
            "localhost",
            "2pi.3111skyline.com",
            "192.168.6.111"
        ],
        "overwrite.cli.url": "https:\/\/2pi.3111skyline.com\/nextcloud",
        "htaccess.RewriteBase": "\/nextcloud",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "maintenance": false,
        "app_install_overwrite": [
            "issuetemplate"
        ]
    }
}

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

no

Are you using encryption: yes/no

no

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

no

Client configuration

Browser:

Firefox 115.2esr

Operating system:

openSUSE Leap 15.4

CalDAV-clients:

none at the moment

Logs

Web server error log

Nothing relevant unless enabling APCu caching is attempted and then the following error occurs, even though APCu is shown as enabled in php_info(). APCu caching is currently disabled. See New Install 27.0.2 on PHP8.1 Archlinux, APCu fails, .well-known warnings for details.

[Fri Sep 08 00:33:27.163624 2023] [proxy_fcgi:error] [pid 163843] [client XX.XX.XX.XX:60904] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught OCP\\HintException: [0]: Memcache \\OC\\Memcache\\APCu not available for local cache (Is the matching PHP module installed and enabled?)\n\n  thrown in /usr/share/webapps/nextcloud/lib/private/Memcache/Factory.php on line 90'

Nextcloud log (data/nextcloud.log)

{"reqId":"sGzGrJjzglRHG4Ab30aG","level":3,"time":"2023-09-08T09:38:47+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"5mYoIxO5BBrhURAzBZfT","level":3,"time":"2023-09-08T09:39:05+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/js/core/merged-template-prepend.js?v=af006de4-5","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"QJr4egZwnA3M58kCEbOE","level":3,"time":"2023-09-08T09:40:13+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/apps/theming/favicon/tasks?v=c973a648","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"rHl5nSVNoPAwRNDZ7auv","level":3,"time":"2023-09-08T09:51:56+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/js/files/merged-index.js?v=af006de4-5","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"sxPjbt03hc0a05NWtb3j","level":3,"time":"2023-09-08T09:52:00+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/core/preview?fileId=188&c=f9d2a66432ec70966b9b34633d0d19a0&x=250&y=250&forceIcon=0&a=1","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"CSXIciKxqYypBSDQqhqj","level":3,"time":"2023-09-08T09:52:07+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/core/preview?fileId=220&c=eba89b115ed5c9ebb9c9fb030cdf596c&x=250&y=250&forceIcon=0&a=1","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"Br4FqeJ1skujBofpgqMJ","level":3,"time":"2023-09-08T09:52:12+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"POST","url":"/nextcloud/apps/text/session/sync","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"arpBGYd6NRFuC31oWOMn","level":3,"time":"2023-09-08T09:52:43+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/apps/theming/icon/settings?v=c973a648","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"5H6K0J66RO6sTWRikSsx","level":3,"time":"2023-09-08T09:58:43+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/apps/theming/theme/opendyslexic.css?plain=0&v=c973a648","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"K12rOiYgNS1yrMn2Gw0y","level":3,"time":"2023-09-08T09:59:04+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/apps/theming/theme/dark-highcontrast.css?plain=0&v=c973a648","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"T8ssZ4IA7w3e5vn13kSW","level":3,"time":"2023-09-08T09:59:09+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/core/preview?fileId=220&x=250&y=250","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"AycNz6jUZLF1cZ3SwvvN","level":3,"time":"2023-09-08T09:59:22+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/apps/files/api/v1/stats?dir=%2FDocuments","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"vp0TAXONQbmC5KbkPcYc","level":3,"time":"2023-09-08T09:59:34+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/core/preview?fileId=218&c=a23773ea816ec1e206ee44bd6603324d&x=250&y=250&forceIcon=0&a=1","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"vCiBFwWCCjpHtHhSdPmf","level":3,"time":"2023-09-08T09:59:34+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/core/preview?fileId=213&c=20619630d86984a97ccbfb73ef5459ca&x=250&y=250&forceIcon=0&a=1","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"tYsL8ifklkpIkRy2jaho","level":3,"time":"2023-09-08T09:59:37+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/core/preview?fileId=199&c=8931fa9f9aaba1a1b5a08e240be668cd&x=250&y=250&forceIcon=0&a=1","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"GbZUeIgAmEWbWzAnAnpm","level":3,"time":"2023-09-08T10:03:37+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/settings/ajax/checksetup","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}
{"reqId":"ZUmOyQpOjPyCkclyYViR","level":3,"time":"2023-09-08T10:04:15+00:00","remoteAddr":"XX.XX.XX.XX","user":"david","app":"PHP","method":"GET","url":"/nextcloud/apps/theming/theme/light-highcontrast.css?plain=0&v=c973a648","message":"Module \"bcmath\" is already loaded at Unknown#0","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"27.0.2.1","data":{"app":"PHP"}}

Browser log

[NoScript]:0 Prompt Hook installation https://2pi.3111skyline.com/nextcloud/apps/tasks/ [log.js:32:13](moz-extension://b16706ae-1a5b-430a-8c9c-651d8b7194b9/nscl/common/log.js)
Content-Security-Policy: The page’s settings blocked the loading of a resource at data: (“media-src”). [tasks](https://2pi.3111skyline.com/nextcloud/apps/tasks/)
JQMIGRATE: Migrate is installed, version 3.4.1 [jquery-migrate.min.js:2:702](webpack:///nextcloud/node_modules/jquery-migrate/dist/jquery-migrate.min.js)
Proxying an event bus of version 3.0.2 with 1.3.0 2 [index.es.js:2337:14](webpack:///nextcloud/node_modules/@nextcloud/axios/node_modules/@nextcloud/event-bus/dist/index.es.js)
session heartbeat polling started [session-heartbeat.js:103:9](webpack:///nextcloud/core/src/session-heartbeat.js)
Proxying an event bus of version 3.0.2 with 1.3.0 [index.es.js:2337:14](webpack:///notifications/node_modules/@nextcloud/notify_push/node_modules/@nextcloud/auth/node_modules/@nextcloud/event-bus/dist/index.es.js)
Registering notifications container as a menu [NotificationsApp.vue:219](webpack:///notifications/src/NotificationsApp.vue)
Notifications permissions granted [NotificationsApp.vue:453](webpack:///notifications/src/NotificationsApp.vue)
Polling interval updated to 30000 [NotificationsApp.vue:416](webpack:///notifications/src/NotificationsApp.vue)
Started background fetcher as session_keepalive is enabled [NotificationsApp.vue:275](webpack:///notifications/src/NotificationsApp.vue)
Got notification data, restoring default polling interval. [NotificationsApp.vue:376](webpack:///notifications/src/NotificationsApp.vue)
@raimund-schluessler
Copy link
Member

Thanks for the report. I can confirm that setting the status to NEEDS-ACTION sets the percent complete to 0. This is due to this line:

this.setComplete(0)

I guess it is up to debate whether that makes sense, and I tend to agree with you that it might be better to not touch percent complete in that case.

However, I cannot confirm that the priority would be affected by setting the status. Could you please double check that this is really the case for you and you didn't accidentally set it yourself or had another client change it?

@drankinatty
Copy link
Author

I've had the priority reset, and I've had it remember its value. Tonight, working with it further, the percent complete is always reset, but the priority remained. I cannot explain why in toggling the status the priority was reset. I will chock that up to a stray mouse movement.

I tested further and if you choose complete, but then need to reopen, the percent complete is lost and set at 99%. So it looks like what needs to be fixed is leaving the priority alone when the status is toggled, in the event it needs to be changed back to in progress. Right now the way it is if you choose needs attention priority goes to 0% if you choose complete, it goes to 100%. When you set it back to in progress it goes to 1% and 99%, respectively.

I see the logic in the way it works, but on returning to in progress, the original percent complete should be restored.

@raimund-schluessler
Copy link
Member

raimund-schluessler commented Oct 7, 2023

I see the logic in the way it works, but on returning to in progress, the original percent complete should be restored.

Unfortunately, this is not possible. We don't have a history of edits that one could go back to. We cannot do that for other values, and we cannot do it for the percent-complete value. If a user sets a parameter, its previous value gets overwritten.

And if a task gets set to completed, of course it should be 100 % completed, otherwise, it shouldn't be considered completed.

However, in #2365 I adjusted the logic in a way that setting the status to NEEDS-ACTION or resetting it, does not set the percent-complete value to 0 anymore. When percent-complete is 100, hence, the task is completed, setting the status to something else than COMPLETED will set percent-complete to 99.

@drankinatty
Copy link
Author

Couldn't you just stuff it into cookie or local browser variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants