Operation Details
Description: Returns a list of task identifiers that have been assigned to the specified user. The list of tasks returned are sorted by the length of time that they have been assigned to that object and then by the priority of the tasks.
Sterotype: nsmulti
SQL
SELECT
  t.taskID,
  t.versionNo
INTO
  :taskID,
  :versionNo 
FROM
  TaskAssignment ta,
  Task t 
WHERE 
  (
    :searchByRelatedIDInd = '0' 
    OR ta.relatedID = :relatedID 
  ) 
  AND 
  (
    :relatedName IS NULL 
    OR ta.relatedName = :relatedName 
  ) 
  AND ta.assigneeType = :assigneeType 
  AND ta.taskID = t.taskID 
  AND t.reservedBy IS NULL 
ORDER BY t.assignedDateTime ASC,
  t.priority ASC