Author Topic: My Projects List  (Read 12306 times)

bpiper

  • Posts: 1
My Projects List
« on: July 16, 2008, 05:39:25 pm »
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: [Select]
<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: [Select]
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, 06:36:16 pm by bpiper »

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: My Projects List
« Reply #1 on: July 19, 2008, 12:32:09 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 :D

thewarden

  • Anglefish
  • *
  • Posts: 12
Re: My Projects List
« Reply #2 on: October 23, 2008, 06:27:03 pm »
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/.

angeleyes

  • Worm
  • *
  • Posts: 8
Re: My Projects List
« Reply #3 on: October 29, 2008, 12:23:37 pm »
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

Bernd2009

  • Anglefish
  • *
  • Posts: 19
Re: My Projects List
« Reply #4 on: June 08, 2009, 10: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

Maramazza

  • Batfish
  • **
  • Posts: 48
Re: My Projects List
« Reply #5 on: June 18, 2009, 05:50:22 pm »
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?
:(

Maramazza

  • Batfish
  • **
  • Posts: 48
Re: My Projects List
« Reply #6 on: June 29, 2009, 10: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 :D
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?

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: My Projects List
« Reply #7 on: June 29, 2009, 11: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.

Maramazza

  • Batfish
  • **
  • Posts: 48
Re: My Projects List
« Reply #8 on: June 29, 2009, 11:33:45 am »
Maramazza, the fountain of problems..
Sorry :(

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, 11:36:01 am by Maramazza »

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: My Projects List
« Reply #9 on: June 29, 2009, 12:02:26 pm »
You know I hate the permission system of Taskfreak, don't you ::)

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 :)
So, what's next? Clean cookies and try again?

Maramazza

  • Batfish
  • **
  • Posts: 48
Re: My Projects List
« Reply #10 on: June 29, 2009, 01:33:25 pm »
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 :)
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? :(

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: My Projects List
« Reply #11 on: June 30, 2009, 01:13:50 pm »
Code: [Select]
if($_REQUEST['sUser'] == 'myprojects' && $_SESSION['selUser']) {
   $objItemList->addWhere('ii.authorId='.$_SESSION['selUser']);
}
below add
Code: [Select]
else if($_REQUEST['sUser'] == 'myprojects' && !$_SESSION['selUser']) {
   $objItemList->addWhere('ii.authorId='.$objUser->id);
}

Maramazza

  • Batfish
  • **
  • Posts: 48
Re: My Projects List
« Reply #12 on: June 30, 2009, 01:59:56 pm »
Thank you very much...
If I could do something for you ...

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: My Projects List
« Reply #13 on: June 30, 2009, 02:05:39 pm »
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 ;D

Maramazza

  • Batfish
  • **
  • Posts: 48
Re: My Projects List
« Reply #14 on: June 30, 2009, 02:34:02 pm »
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 ;D
Ok no problem :)
:P