Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
taskfreak.com
Pages: [1]
  Print  
Author Topic: My Projects List  (Read 5751 times)
bpiper

Posts: 1


« on: July 16, 2008, 10:39:25 AM »

I found the need to have a "My Projects" link to show all tasks for which you are the leader of the project.

This comes in very handy when you have to assign a bunch of tasks to different people, you can monitor all of them as long as you are the project leader.
Until this, you had to go to each user in the project and view their tasks independently.

If you are interested in doing this, it is quite a simple modification:

header.php  // add my projects link
Code:
<div id="rightmenu">
  <a href="<?php echo Tzn::concatUrl($_SESSION['linkItems'],'sUser=myprojects'); ?>">My Projects</a> |
  <a href="<?php echo Tzn::concatUrl($_SESSION['linkItems'],'sUser='.$objUser->id); ?>"><?php echo $langMenu['my_tasks']; ?></a> |
  <a href="<?php echo Tzn::concatUrl($_SESSION['linkItems'],'sUser=all'); ?>"><?php echo $langMenu['all_users']; ?></a> |
 

index.php
Change if($pUser){ to an "elseif" and add "if" above it:
Code:
if($_REQUEST['sUser'] == 'myprojects' && $_SESSION['selUser']){
   $objItemList->addWhere('ii.authorId='.$_SESSION['selUser']);
}
elseif ($pUser) {

Now when you click on the "My Projects" link, it will give you a complete list of tasks for which the current user is the project leader.

« Last Edit: July 16, 2008, 11:36:16 AM by bpiper » Logged
Searcher
Global Moderator
Hammerhead shark
*****
Posts: 1766



WWW
« Reply #1 on: July 18, 2008, 05:32:09 PM »

Not bad at all!

I love small and quick sensible upgrades, I added it to my demo with your kind permission I have read somewhere between the lines Cheesy
Logged

thewarden
Anglefish
*
Posts: 11


« Reply #2 on: October 23, 2008, 11:27:03 AM »

Thanks bpiper for posting this cool modification. I'm sure Searcher will correct me here if I'm wrong but the editing done in the header.php should be done the way the rest were. Meaning that actually words of "My Projects" should be placed into the /taskfreak/include/language/en/freak.php starting after line #16 at any point adding a new key/value to the array, 'my_projects' => 'My Projects'. To provide full support to all interface supported languages one would have to edit each freak.php per supported interface language. Of course this is only necessary if you choose to change the interface language.

You can see the full explanation and code before and code after being changed at http://www.adamsdesk.com/be/archives/2008/10/23/taskfreak-v062-add-my-projects-list/.
Logged
angeleyes
Worm
*
Posts: 8


« Reply #3 on: October 29, 2008, 06:23:37 AM »

Sincerely thanks for this useful idea.

We really need it and appreciate your work and the fact you inform us.

Have a nice day,

Angeleyes
Logged
Bernd2009
Anglefish
*
Posts: 18


« Reply #4 on: June 08, 2009, 03:19:39 PM »

Is it possible to create a filter which I can see all task it was created by me ?

http://forum.taskfreak.com/index.php?topic=1538.0
Logged
Maramazza
Batfish
**
Posts: 47


« Reply #5 on: June 18, 2009, 10:50:22 AM »

I made this mod and it run but there is a little problem...
If I click on the link My Project
I click on one of my project and i see all the detail
and then if I crush "F5" (refresh) on my keyboard
the user can see all like the admin...
Is it possible?
Sad
Logged
Maramazza
Batfish
**
Posts: 47


« Reply #6 on: June 29, 2009, 03:47:26 AM »

Not bad at all!

I love small and quick sensible upgrades, I added it to my demo with your kind permission I have read somewhere between the lines Cheesy
Sorry I have still the problem...
I think that the problem is in freak.js but I'm not able to resolve it...
Somebody can help me please?
Logged
Searcher
Global Moderator
Hammerhead shark
*****
Posts: 1766



WWW
« Reply #7 on: June 29, 2009, 04:14:37 AM »

Maramazza, the fountain of problems..

Let's see if we can do something about it. Create a new test user on my demo, click on My Projects, hit F5 and see if it does the same. Let me know.
Logged

Maramazza
Batfish
**
Posts: 47


« Reply #8 on: June 29, 2009, 04:33:45 AM »

Maramazza, the fountain of problems..
Sorry Sad

Let's see if we can do something about it. Create a new test user on my demo, click on My Projects, hit F5 and see if it does the same. Let me know.
I created a new user:
name: test
pass:demo
level:internal
when i click on My Projects i look at the task open by me (title sdf)
then i open the task and i click F5 and i see all the task...
I think that the problem is that the sistem doesn't remember my userid ...
« Last Edit: June 29, 2009, 04:36:01 AM by Maramazza » Logged
Searcher
Global Moderator
Hammerhead shark
*****
Posts: 1766



WWW
« Reply #9 on: June 29, 2009, 05:02:26 AM »

You know I hate the permission system of Taskfreak, don't you Roll Eyes

There are two things you need to look at:
1. My Projects button
2. User select box next to All Users

When you click on my tasks, user 'test' is automatically selected and displayed in the select box #2 and you see NO tasks
When you consequently click on My Projects, you see 'sdf' which belongs to your project, but is not YOUR task
When you choose let's say 'Marco' from that select box you see 1 task which belongs to Marco

I suspect there is a session writing somewhere, but not sure where and when, because after all this I hit refresh 300 times and nothing changed Smiley
So, what's next? Clean cookies and try again?
Logged

Maramazza
Batfish
**
Posts: 47


« Reply #10 on: June 29, 2009, 06:33:25 AM »

There are two things you need to look at:
1. My Projects button
2. User select box next to All Users

When you click on my tasks, user 'test' is automatically selected and displayed in the select box #2 and you see NO tasks
When you consequently click on My Projects, you see 'sdf' which belongs to your project, but is not YOUR task
When you choose let's say 'Marco' from that select box you see 1 task which belongs to Marco

I suspect there is a session writing somewhere, but not sure where and when, because after all this I hit refresh 300 times and nothing changed Smiley
So, what's next? Clean cookies and try again?
I see that if I click on my project and then on the task (..open the pop up..) if I click on F5 the user in the select box change in all user...
so what i must do now? Sad
Logged
Searcher
Global Moderator
Hammerhead shark
*****
Posts: 1766



WWW
« Reply #11 on: June 30, 2009, 06:13:50 AM »

Code:
if($_REQUEST['sUser'] == 'myprojects' && $_SESSION['selUser']) {
   $objItemList->addWhere('ii.authorId='.$_SESSION['selUser']);
}
below add
Code:
else if($_REQUEST['sUser'] == 'myprojects' && !$_SESSION['selUser']) {
   $objItemList->addWhere('ii.authorId='.$objUser->id);
}
Logged

Maramazza
Batfish
**
Posts: 47


« Reply #12 on: June 30, 2009, 06:59:56 AM »

Thank you very much...
If I could do something for you ...
Logged
Searcher
Global Moderator
Hammerhead shark
*****
Posts: 1766



WWW
« Reply #13 on: June 30, 2009, 07:05:39 AM »

You can test my new task manager when it's alpha phase ready, with a bugcreator like yourself it will be a never ending pleasure Grin
Logged

Maramazza
Batfish
**
Posts: 47


« Reply #14 on: June 30, 2009, 07:34:02 AM »

You can test my new task manager when it's alpha phase ready, with a bugcreator like yourself it will be a never ending pleasure Grin
Ok no problem Smiley
Tongue
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Darkz Theme By [S.W.T]