MantisBT - Third-party Modules
View Issue Details
0000289Third-party ModulesTimecardpublic2009-10-16 01:352014-04-05 17:39
Assigned Topedroa 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000289: Restrict combobox in "Add log" tab in TimeCard to active projects
DescriptionSince project list can grow big in the combo box of add log tab in TimeCard, I would suggest to select only active projects (project_active = 1).
Additional InformationIf you use the getAllowedProjects method on the Projects class, you can have the system get the data for you... respecting permissions of course.
You can see it in action in ./modules/calendar/addedit.php around line 100.
TagsNo tags attached.
Attached Files

2009-11-17 20:38   
This is an easy one. Your code should look something like this:

$prj = new CProject();
$projects = $prj->getAllowedProjects($AppUI->user_id);

It automatically filters according to the permissions and if you don't specify a second parameter, it will default to just getting active projects.
2010-02-26 22:17   
Ping? Any update?

Issue History
2009-10-16 01:35MiraKlimNew Issue
2009-10-16 01:35MiraKlimStatusnew => assigned
2009-10-16 01:35MiraKlimAssigned To => MiraKlim
2009-11-17 20:38caseydkNote Added: 0000592
2010-02-26 22:17caseydkNote Added: 0000762
2011-02-22 01:45pedroaAssigned ToMiraKlim => pedroa
2014-04-05 17:39caseydkCategoryGeneral => Timecard
2014-04-05 17:39caseydkSummaryRestrict combobox in "Add log" tab in TimCard to active projects => Restrict combobox in "Add log" tab in TimeCard to active projects