[OGo-Developer] referredPerson in tasks
Adam Tauno Williams
developer@opengroupware.org
Tue, 13 May 2008 09:26:04 -0400
> not sure whether its what you are looking at, but there is some
> 'preferred job executant' facility which is turned off per default. It
> somehow connects a 'preferred' account to a contact, the contact
> viewer is extended with a 'new task' button.
Nope, that isn't the feature referred to here. "Preferred Job
Executant" is document in WMOGAG and we use it in production.
This is "referredPerson".
Mon Oct 27 17:01:12 2003 Jan Reichmann <jr@skyrix.com>
* v5.0.24
* LSWJobViewer.m: fetch job history
* LSWJob: referred person and preferred account support
Referred person: The person viewer got a new link [new job]. If
this link is used, you will get a job editor for a new job
with the person as 'referred person'.
Preferred account [enable with JobPreferredExecutantsEnabled=YES]:
If a new job is created and a team is choosen as executant,
you can select preferred accounts for this job. This accounts will
see a new tab in their job-overview who display this jobs.
So it somehow relates to the Preferred Executant functionality. I guess
the above explains it, but when I tried it, it looked pretty weird
(visually, in the UI).
> I don't remember the exact behaviour, but I have written it down
> somewhere. I think the functionality wasn't too bad, though the
> implementation is a bit weird.
> Besides that I was playing with an InReply link, maybe thats what you
> want:
> ---snip---
> SELECT * FROM Job BASE
> WHERE BASE.job_id IN
> (SELECT source_id FROM obj_link
> WHERE target_id = 10160 AND link_type = 'InReply');
> ---snap---
> We could always set this if some object was created 'in reply' to
> another object. Eg if you create a task for a contact or something.
I do like that.
But as far as tasks go I really need those tasks to appear in the users
"delegated" list (which is "where creatorId == me";
LSFetchDelegatedJobsCommand). We have numerous widgets that show a
user their task list both their to-do list and jobs they have delegated.
Help desk creates tasks for a user and delegates them to some team or
user,
I suppose I could create a Logic command that retrieves myDelegated
+myReplyTasks....
SELECT * FROM Job BASE
WHERE ((BASE.job_id IN
(SELECT source_id FROM obj_link
WHERE target_id = 10100 AND link_type = 'InReply'))
OR (creator_id = 10100))
AND job_status <> '30_archived'
That isn't so bad.
Or I maybe it is better to use the object link manager somewhat like the
WebUI does for preferred executant tasks -
links = [lm allLinksTo:(EOKeyGlobalID *)[account globalID]
type:@"Preferred Job Executant"];
[self _fetchJobs:@selector(_setToDoList)];
links = [links map:@selector(sourceGID)];
res = [NSMutableArray array];
Then I can build the functionality into zOGI and not touch Logic. I
suppose for my own needs that is a better and less invasive answer.
Downside is I'll have to put the two lists together (delegated +
InReply).