•  
      request #7912 PHP generating errors from agiledashboardPlugin.class.php
    Infos
    #7912
    Rich Bloch (richbl)
    2015-03-09 20:55
    2015-03-05 22:36
    7925
    Details
    PHP generating errors from agiledashboardPlugin.class.php
    DOES:
    Cron is generating numerous email messages as follows:
    PHP Notice: Use of undefined constant ITEM_PRIORITY_CHANGE - assumed 'ITEM_PRIORITY_CHANGE' in /usr/share/codendi/plugins/agiledashboard/include/agiledashboardPlugin.class.php on line 87

    Notice: Use of undefined constant ITEM_PRIORITY_CHANGE - assumed 'ITEM_PRIORITY_CHANGE' in /usr/share/codendi/plugins/agiledashboard/include/agiledashboardPlugin.class.php on line 87

    SHOULD:
    Recent check-in suggests a syntax error in how the ITEM_PRIORITY_CHANGE hook is created. Note here:
    story #7495 - Manage the perm in the planning v1

    Change-Id: I9fe2bdf3028fea758fd80d0eb4c4e9c1c96cd067

    file:a/plugins/agiledashboard/include/agiledashboardPlugin.class.php -> file:b/plugins/agiledashboard/include/agiledashboardPlugin.class.php

    --- a/plugins/agiledashboard/include/agiledashboardPlugin.class.php
    +++ b/plugins/agiledashboard/include/agiledashboardPlugin.class.php
    @@ -84,6 +84,7 @@ class AgileDashboardPlugin extends Plugi
    $this->addHook(Event::REST_PATCH_PROJECT_BACKLOG);
    $this->addHook(Event::REST_OPTIONS_PROJECT_BACKLOG);
    $this->addHook(Event::GET_PROJECTID_FROM_URL);
    + $this->addHook(ITEM_PRIORITY_CHANGE);
    }

    if (defined('CARDWALL_BASE_URL')) {
    @@ -786,6 +787,37 @@ class AgileDashboardPlugin extends Plugi
    );
    }

    My suspicion is that $this->addHook(ITEM_PRIORITY_CHANGE) should be called as $this->addHook(Event::ITEM_PRIORITY_CHANGE)... note the namespace addition (Event::).
    Agile Dashboard
    7.10
    CentOS 5 + php51
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Declined
    2015-03-09
    Attachments
    Empty
    References
    Referenced by request #7912

    Follow-ups

    User avatar
    Rich Bloch (richbl)2015-03-09 19:08
    Good Day Nicolas,

    Thanks for the logic clarification. I'm very happy to know that the issue was not something overt.

    Since posting this issue, I've since moved to 7.11 and have not been able to reproduce the problem (generating PHP notices). I should also note that I'm using the Tuleap appliance (though I'm not sure if that really would matter).

    If I encounter this issue again, and I can find a good repro case, I'll be happy to report this issue. At the moment, I'm okay if you want to close this out as NOT REPRO.

    Rich
    User avatar
    Hi,

    Thank you for your investigation, however ITEM_PRIORITY_CHANGE is a global constant and is not part of Event class (though it should have been prefixed by TRACKER_* since it is a constant owned by the tracker plugin). Therefore what you are suggesting will not work.

    I cannot reproduce your issue. What is the result of the following query?

    SELECT * FROM plugin\G

    Regards,
    Nicolas Terray