Hi, Can someone help. (v3.3.58) On a task - the assigned users (usernames) are not getting displayed. Anyone else find this? Do you have a fix? Thanks! Mvd ![alt text][1] [1]: /storage/temp/231-missingusers.jpg

asked 18 Mar '15, 18:53

mved's gravatar image

mved
02912
accept rate: 0%

edited 27 Apr '16, 02:14

opto's gravatar image

opto ♦
83344110132


SOLVED IT!!! In file \"\\modules\\tasks\\tasks.class.php\" change function \"assignees\" with the following code: =================================================================== public function assignees($taskId) { $q = $this->_getQuery(); $q->addTable('users', 'u'); $q->addQuery('u.*, perc_assignment'); $q->innerJoin('user_tasks', 'ut', 'ut.user_id = u.user_id'); $q->leftJoin('contacts', 'co', ' co.contact_id = u.user_contact'); $q->addQuery('u.*, ut.perc_assignment, ut.user_task_priority, contact_display_name, co.contact_last_name, co.contact_first_name, contact_display_name as contact_name, contact_email AS user_email'); $q->addQuery('co.contact_phone AS user_phone'); $q->addWhere('ut.task_id = ' . (int) $taskId); return $q->loadHashList('user_id'); } ================================================================================= The missing part was \"contact_email AS user_email\", so no email was included in the $users array. Now it works fine. I did not change the \"w2p_email\" function to its original code, because I think I better get something on any case instead of an empty string, as was the original bug. Please accept my answer and mark it as solved (unless I am wrong ;) )
permanent link

answered 22 Jul '15, 13:14

Themoulos's gravatar image

Themoulos ♦
217111622
accept rate: 22%

answered 22 Jul '15, 13:14

The system uses the display name of the Users' attached Contact record. If you're not getting the names to display, just edit the Contact record for the User and hit save. The display name will default to the first name and last name with a space in between.
permanent link

answered 04 Apr '15, 01:43

caseydk's gravatar image

caseydk ♦♦
742314248
accept rate: 32%

answered 04 Apr '15, 01:43

I had the same problem and found out that, for the Task Assignees, $row['user_email'] is empty (��), although all persons have both emails and primary Email Address filled (opposite of the http://bugs.web2project.net/view.php?id=1648). A (clumsy) workaround is by changing the \"w2p_email\" function, so that it returns the display name, even if no email is passed:\nAdded:\nelse { $result = $name.'(no email)'; } in the end, before return.\nAt least, I get to show something, not an empty string.\nAny suggestion?
permanent link

answered 16 May '15, 14:17

Themoulos's gravatar image

Themoulos ♦
217111622
accept rate: 22%

answered 16 May '15, 14:17

Same Problem here, For some reason the name doesn't show even after I have edited and saved the contact info. However, 3.3 is running awesome comparatively. Very Very impressed with many of the features that work right out of the box.
permanent link

answered 15 Jun '15, 17:06

gwildgoose's gravatar image

gwildgoose
20102026
accept rate: 0%

answered 15 Jun '15, 17:06

Did you edit the \"w2p_email\" function? It is defined in ....\\web2project\\includes\\main_functions.php The complete function follows: =============================================== function w2p_email($email, $name = '')\n{ $result = ''; if ($email != '') { $name = ('' != $name) ? $name : $email; $result = '' . $name . ''; } else { $result = $name.' (no email)'; // This is what Themoulos added } return $result;\n} ====================================================== I hope it helps you to bypass the problem (not solve it, though).
permanent link

answered 16 Jun '15, 06:58

Themoulos's gravatar image

Themoulos ♦
217111622
accept rate: 22%

answered 16 Jun '15, 06:58

Themoulos Rules the day! Thank you very much for your help on this, I love this script and I don't know why

(16 Jun '15, 09:24) gwildgoose gwildgoose's gravatar image
Awesome job, worked like a charm.
permanent link

answered 24 Jul '15, 16:31

gwildgoose's gravatar image

gwildgoose
20102026
accept rate: 0%

answered 24 Jul '15, 16:31

I put this into 3.4 pre (locally, not uploaded yet), Klaus
permanent link

answered 26 Apr '16, 02:48

opto's gravatar image

opto ♦
83344110132
accept rate: 10%

edited 26 Apr '16, 02:48

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1
×1
×1

question asked: 18 Mar '15, 18:53

question was seen: 1,137 times

last updated: 27 Apr '16, 02:14

Related questions

powered by Bitnami OSQA