Download & Extend

Workflow error unless task & ticket permission = view all

Project:Storm
Version:6.x-1.x-dev
Component:Storm Ticket
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I created a workflow on stormticket using the workflow module. When the standard/delivered workflow summary view is executed, I get a php error. Here's the error from the log:

Type php
Date Monday, June 29, 2009 - 10:28
User steve_customer
Location http://www.(mysite).com/workflow
Referrer http://www.(mysite).com/portal.html
Message Unknown column 'node.uid' in 'field list' query: SELECT DISTINCT(n.nid) FROM node n INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'workflow_access') OR (na.gid = 4 AND na.realm = 'workflow_access') OR (na.gid = 11 AND na.realm = 'workflow_access_owner') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 4 AND na.realm = 'forum_access'))) AND (( CASE n.type WHEN 'stormexpense' THEN 0 WHEN 'stormnote' THEN (SELECT IF(n.uid=11 OR sno1.organization_nid=102,1,0) FROM stormnote sno1 WHERE sno1.vid=n.vid) WHEN 'stormorganization' THEN (SELECT IF(n.uid=11 OR sor1.nid=102,1,0) FROM stormorganization sor1 WHERE sor1.vid=n.vid) WHEN 'stormperson' THEN (SELECT IF( n.uid=11 OR spe1.organization_nid=102,1,0) FROM stormperson spe1 WHERE spe1.vid=n.vid) WHEN 'stormproject' THEN (SELECT IF( n.uid=11 OR spr1.organization_nid=102,1,0) FROM stormproject spr1 WHERE spr1.vid=n.vid) WHEN 'stormtask' THEN (SELECT IF( node.uid=11 OR sta1.organization_nid=102,1,0) FROM stormtask sta1 WHERE sta1.vid=node.vid) WHEN 'stormticket' THEN (SELECT IF( node.uid=11 OR sti1.organization_nid=102,1,0) FROM stormticket sti1 WHERE sti1.vid=node.vid) WHEN 'stormtimetracking' THEN 0 ELSE 1 END )=1 ) AND ( n.status = 1 AND n.nid IN (14, 25, 55, 59)) in /usr/srv/(mysite)/www/htdocs/includes/menu.inc on line 1006.
Severity error

This error goes away if I give the user 'view all' permissions in stormtask and stormticket. However, I can't really have my customers looking at the tasks & tickets of other customers.

I don't know for sure if this is a workflow, views, or storm permissions issue - if I need to move it, will be glad to do so.

Comments

#1

The error is coming because somewhere, a the node table is being labelled as 'node' rather than 'n'. From the location in the SQL, I would assume that this is within Storm, but cannot see it at first inspection so will come back to it.

#2

Thanks magnity for the update. Just as a test, I created my own view from scratch (screenprint attached) and got the same error as with the delivered workflow summary view from the workflow module.

AttachmentSizeStatusTest resultOperations
storm_workflow_view.jpg88 KBIgnored: Check issue status.NoneNone

#3

I don't know if this is the cause - but the only difference I can see between the task/ticket functions and the others is the following: - would you be able to try it out?

In stormtask.module at line 122 and stormticket.module at line 123,

Replace:

  if ($conds[$account->uid]) {
    return $conds[$account->uid];
  }

With:

  if ($conds[$primary_table][$account->uid]) {
    return $conds[$primary_table][$account->uid];
  }

Would you be able to report back on that?

Thanks

#4

Then at lines 159, 158 respectively,

Replace:

$conds[$account->uid] = $cond;

With:

$conds[$primary_table][$account->uid] = $cond;

#5

Thanks magnity - those changes solved the problem.

#6

#7

Status:fixed» closed (fixed)
nobody click here