MantisBT - v2.1 Release (Closed)
View Issue Details
0000533v2.1 Release (Closed)[All Projects] Generalpublic2010-08-03 12:462010-09-21 23:03
Assigned Totrevormorse 
PlatformOSOS Version
Product Versionv2.1 
Target VersionFixed in Versionv2.1 
Summary0000533: new link button in tasks (everywhere?) should preset project and task ID's
Descriptionthe new link button in tasks should preset project and task:

currently. the url generated is ...&project_id=&task_id=ID

project id should be inserted.

It seems that the addedit link page does not use the two GET's (by manually inserting ID's: nothing is preselected)
TagsNo tags attached.
Attached Files

2010-08-20 21:12   
Any chance you could write a quick patch for this one?
2010-08-22 04:15   
will try.
But I 'll be on a business trip - either tomorrow or Friday in the train, or after 2.1 (?).

2010-08-22 10:01   

And the sooner, the better. 2.1 is still a couple weeks away.
2010-08-28 09:25   
(Last edited: 2010-08-28 09:27)
to get the project id (at the moment not part of get):

add global $project_id in
global $AppUI, $m, $obj, $task_id, $project_id;

in task_tab.view.links.php

in links: addedit:

get id's (at top of file)

if ($link_id==0) //we have an add, no edit
  $link_project= (int) w2PgetParam($_GET, 'project_id', 0);
  $link_task= (int) w2PgetParam($_GET, 'task_id', 0);

preset values if no link_id given
put somewhere below
// load the record data
$link = new CLink();

if ($link_id==0)
  $link->link_task = $link_task;
  $linkTask= new CTask;
  $linkTask->loadFull($AppUI, (int)1);//$link_task);

works in IE8

any more efficient way to get just the name rather than loadFull?

I don't understand:
in \links\index_table.php:
the link button seems to be a post:
        '<form action="?m=links&a=addedit&project_id='.$project_id.'&task_id='.$task_id.'" method="post" accept-charset="utf-8">', '</form>'

but the resulting page in IE8 and the handling in addedit is a get

2010-09-08 15:17   
Hi Klaus,

Thanks for the patch, was very helpful!

I have fixed this bug in my github branch. Should hopefully be in subversion soon and will definitely be in for 2.1.

As a side note, fixing this bug caused a new one for me - Just a heads up. :-)

Issue History
2010-08-03 12:46optoNew Issue
2010-08-03 14:12caseydkProjectPending Requests => v2.1 Release (Closed)
2010-08-20 21:12caseydkNote Added: 0001213
2010-08-22 04:15optoNote Added: 0001216
2010-08-22 10:01caseydkNote Added: 0001217
2010-08-28 09:25optoNote Added: 0001236
2010-08-28 09:27optoNote Edited: 0001236
2010-09-04 23:20caseydkStatusnew => assigned
2010-09-04 23:20caseydkAssigned To => caseydk
2010-09-08 15:17trevormorseNote Added: 0001259
2010-09-08 15:17trevormorseNote Edited: 0001259
2010-09-08 15:19trevormorseAssigned Tocaseydk => trevormorse
2010-09-08 15:19trevormorseStatusassigned => resolved
2010-09-08 15:19trevormorseResolutionopen => fixed
2010-09-21 22:11caseydkStatusresolved => closed
2010-09-21 22:39caseydkStatusclosed => resolved
2010-09-21 22:47caseydkStatusresolved => closed
2010-09-21 22:47caseydkFixed in Version => v2.1
2010-09-21 23:03caseydkProduct Version => v2.1