模板内的任务完成通知警报


Task Completion Notification Alert within a template

if  ($this->id == NULL AND ($this->status_id == '62' OR $this->status_id = '63'))
    {
        $notify_url = Route::get('applications')->uri(array('controller' => 'calibration', 'action' => 'details', 'id' => $this->id));
        Notify::create(Kohana::$config->load('tip.top'), 'Calibration',
            $this->id.': '.$this->description,
            Route::get('applications')->uri(array('controller' => 'calibration', 'action' => 'details', 'id' => $this->id))
        );
    }

,你好

我有这个代码,当记录的ID不是NULL时,记录的状态不是"正在进行中",记录的状态是"完成",它应该只向我发送通知。

它会给我发送完全相反的通知。当我刷新一个空白记录& &;当我添加一条记录时,当状态为"In Progress"时,它会发送通知

如有任何帮助,我将不胜感激。

您的条件是错误的:

$this->id == NULL =>当为NULL时,您输入".."当记录的ID不是 NULL时…"

根据您的指示,您的条件将是:

if  ($this->id != NULL AND ($this->status_id == '62' OR $this->status_id = '63'))

问候。