Giter Site home page Giter Site logo

Comments (3)

lpaulsen93 avatar lpaulsen93 commented on June 18, 2024 1

Sorry, this is a bug in the task plugin.

Until the bug is fixed, please try this workaround:

  • Open the file lib/plugins/task/helper.php
  • Starting at line 137 you should find the following code block:
            $result[$task['key']] = array(
                    'id'       => $id,
                    'date'     => $date,
                    'user'     => $task['user']['name'],
                    'status'   => $this->statusLabel($task['status']),
                    'priority' => $task['priority'],
                    'perm'     => $perm,
                    'file'     => $task['file'],
                    'exists'   => true,
                    );
  • Insert some lines in front of this code so that it looks like this:
            // Make sure the key is unique (but not more than 10 tries...
            // ...just a workaround for now)
            $max = 0;
            while (array_key_exists ($task['key'], $result)) {
                $task['key']++;
                $max++;
                if ($max > 10) {
                    break;
                }
            }

            $result[$task['key']] = array(
                    'id'       => $id,
                    'date'     => $date,
                    'user'     => $task['user']['name'],
                    'status'   => $this->statusLabel($task['status']),
                    'priority' => $task['priority'],
                    'perm'     => $perm,
                    'file'     => $task['file'],
                    'exists'   => true,
                    );
  • Save the file

This will automatically do what you did. It does not change the task page content but when the task list is build and the number is the same as for a already listed task page it will simply increasing the number by 1. If there is still another task page with the same number it is increasing it again and so on... after 10 tries it is giving up and in that case you again would lose a task page in the list. That is why this is just a workaround to help you quick.

By the way: a very good examination of the problem. Not sure if I would have found it myself 👍

Worked well for me, please test.

from plugin-task.

lpaulsen93 avatar lpaulsen93 commented on June 18, 2024

@babudro: any news/feedback? Did this solve your problem?

from plugin-task.

ekrister avatar ekrister commented on June 18, 2024

Hi, I just updated the tasks-plugin to the newest version and noticed this bug. My tasks didn't show up. The code above fixed it. Maybe include the code in the next release?

from plugin-task.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.