Tasks, Creators, Teams, & LSFetchToDoJobsCommand

View: New views
3 Messages — Rating Filter:   Alert me  

Tasks, Creators, Teams, & LSFetchToDoJobsCommand

by Adam Tauno Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I noticed something I don't understand when the ToDo lists are
retrieved.

Looking at the SQL ...
SELECT t1.accounting_info, t1.actual_work, t1.associated_companies,
t1.associated_contacts, t1.category, t1.job_comment, t1.completion_date,
t1.creator_id, t1.db_status, t1.end_date, t1.executant_id,
t1.is_control_job, t1.is_team_job, t1.job_id, t1.job_status,
t1.keywords, t1.kilometers, t1.kind, t1.last_modified, t1.name,
t1.notify_x, t1.object_version, t1.parent_job_id, t1.percent_complete,
t1.priority, t1.project_id, t1.sensitivity, t1.source_url,
t1.start_date, t1.timer_date, t1.total_work FROM  job t1 WHERE
((t1.job_status <> '30_archived') AND  ((t1.job_status <> '25_done')
OR(t1.creator_id IN
(445160,423400,949410,1096320,55000,955240,970990,9991,949540,9154000,10597021,9153880,9153790,10003,142780,10100,970730,11530))) AND  (t1.executant_id IN (445160,423400,949410,1096320,55000,955240,970990,9991,949540,9154000,10597021,9153880,9153790,10003,142780,10100,970730,11530)))
... resulting from ...
    qualifier = [qualifier initWithEntity:[self destinationEntity]
                           qualifierFormat:
                                 @"((%A <> '%@') AND "
                                 @" ((%A <> '%@') OR(%A IN (%@))) AND "
                                 @" (%A IN (%@)))",
                                 @"jobStatus", LSJobArchived,
                                 @"jobStatus", LSJobDone,
                                 @"creatorId", s,
                                 @"executantId", s,
                                 nil];

When would the *creator* of a task be a team?  Wouldn't ...

SELECT t1.accounting_info, t1.actual_work, t1.associated_companies,
  t1.associated_contacts, t1.category, t1.job_comment,
  t1.completion_date, t1.creator_id, t1.db_status, t1.end_date,
  t1.executant_id, t1.is_control_job, t1.is_team_job, t1.job_id,
  t1.job_status, t1.keywords, t1.kilometers, t1.kind, t1.last_modified,
  t1.name, t1.notify_x, t1.object_version, t1.parent_job_id,
  t1.percent_complete, t1.priority, t1.project_id, t1.sensitivity,
  t1.source_url, t1.start_date, t1.timer_date, t1.total_work
FROM  job t1
WHERE ((t1.job_status <> '30_archived')
  AND  ((t1.job_status <> '25_done') OR (t1.creator_id = 10100))
  AND  (t1.executant_id IN (445160, 423400, 949410, 1096320, 55000,
                            955240, 970990, 9991, 949540, 9154000,
                            10597021, 9153880, 9153790, 10003,
                            142780, 10100, 970730, 11530)))

... be more correct [assuming 10,100 is the user id].

Is there some use-case where the creator of the team would be a team?
--
          Consonance: an Open Source .NET OpenGroupware client.
 Contact:awilliam@...   http://freshmeat.net/projects/consonance/

--
OpenGroupware.org Developer
developer@...
http://mail.opengroupware.org/mailman/listinfo/developer

Re: Tasks, Creators, Teams, & LSFetchToDoJobsCommand

by Helge Hess :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 07.06.2008, at 19:12, Adam Tauno Williams wrote:
> Is there some use-case where the creator of the team would be a team?


I think you are right, the creator should always be a plain user id.

Greets,
   Helge
--
Helge Hess
http://www.helgehess.eu/
--
OpenGroupware.org Developer
developer@...
http://mail.opengroupware.org/mailman/listinfo/developer

Re: Tasks, Creators, Teams, & LSFetchToDoJobsCommand

by Adam Tauno Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 2008-06-07 at 20:25 +0200, Helge Hess wrote:
> On 07.06.2008, at 19:12, Adam Tauno Williams wrote:
> > Is there some use-case where the creator of the team would be a team?
> I think you are right, the creator should always be a plain user id.

Changed in r2116

Query now looks like -
 SELECT t1.accounting_info, t1.actual_work, t1.associated_companies,
t1.associated_contacts, t1.category, t1.job_comment, t1.completion_date,
t1.creator_id, t1.db_status, t1.end_date, t1.executant_id,
t1.is_control_job, t1.is_team_job, t1.job_id, t1.job_status,
t1.keywords, t1.kilometers, t1.kind, t1.last_modified, t1.name,
t1.notify_x, t1.object_version, t1.parent_job_id, t1.percent_complete,
t1.priority, t1.project_id, t1.sensitivity, t1.source_url,
t1.start_date, t1.timer_date, t1.total_work FROM  job t1 WHERE
((t1.job_status <> '30_archived') AND  ((t1.job_status <> '25_done')
OR(t1.creator_id = 10100)) AND  (t1.executant_id IN
(445160,423400,949410,1096320,55000,955240,970990,9991,949540,9154000,10597021,9153880,9153790,10003,142780,10100,970730,11530)))


--
OpenGroupware.org Developer
developer@...
http://mail.opengroupware.org/mailman/listinfo/developer
LightInTheBox - Buy quality products at wholesale price