Feng Forum

Other Topics => Development => : Markus March 10, 2011, 01:21:19 PM

: make 'unique ID' of workspace (project) visible
: Markus March 10, 2011, 01:21:19 PM
Feng office allows to search for projects/workspaces by their ID. Unfortunately you can't find it in the application.

Below you find a rough modification in the script to find the ID on the dashboard -> Workspace Information.

any feedback is welcome.

cheers
markus


ROOT/application/views/dashboard/widget_dashboard_info.php
insert at line 89
:
<?php 
?>

<tr><td><?php echo lang('unique id'?>:</td>
<td style="padding-left:10px"><?php 
echo $project->getUniqueObjectId();
 ?>
</td></tr>

: Re: make 'unique ID' of workspace (project) visible
: supadoctor March 11, 2011, 05:53:03 AM
Hmm... Code is simple but I can't  run it on my FO instance...
No errors and no any results :(
: Re: make 'unique ID' of workspace (project) visible
: Markus March 14, 2011, 06:18:30 AM
I give you some more lines, what's above and below the insertion, so you can check the syntax in detail.

markus

:
[...]
$datetime = format_datetime($project->getUpdatedOn(), $date_format, logged_user()->getTimezone());
echo lang('user date', $project->getUpdatedByCardUrl(), $username, $datetime, clean($project->getUpdatedByDisplayName()));
}
?></td></tr>
<?php 
?>

<tr><td><?php echo lang('unique id'?>:</td>
<td style="padding-left:10px"><?php 
echo $project->getUniqueObjectId();
 ?>
</td></tr>
<?php ?>
<tr><td colspan="2">
<?php echo render_custom_properties($project); ?><br/>
</td></tr>
[...]
: Re: make 'unique ID' of workspace (project) visible
: supadoctor March 16, 2011, 05:08:30 AM
Yes, code and modification are correct. But I do not see any project id in dashboard. Sorry... May be I blind? If you don't mind pls attach a screenshot with marked project id.
: Re: make 'unique ID' of workspace (project) visible
: Markus March 16, 2011, 06:54:27 AM
This is what I get
: Re: make 'unique ID' of workspace (project) visible
: supadoctor March 16, 2011, 10:05:59 AM
My fault... Just forget about config option of visibility this widget  ;D

Thanx!!!
: Re: make 'unique ID' of workspace (project) visible
: Captain_FLAM July 18, 2011, 11:29:06 AM
By the way, i found a serious limitation about generating "unique id"

only 3 significant numbers are generated ...

to change this behaviour, i did this :

in -->  application\models\ApplicationDataObject.class.php , line ~ 283

:
<?php
......
function getUniqueObjectId()
{
//****    © Captain FLAM - 06/2011    ****//

$oid str_pad($this->getObjectId(), 6'0'STR_PAD_LEFT);

//****************************************//

return $this->objectTypeIdentifier $oid;
}
......
?>

: Re: make 'unique ID' of workspace (project) visible
: donaldjack59 February 03, 2012, 02:50:54 PM
Feng office allows to search for projects/workspaces by their ID. Unfortunately you can't find it in the application.

Below you find a rough modification in the script to find the ID on the dashboard -> Workspace Information.