|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000329||v1.2 Release (Closed)||[All Projects] General||public||2009-12-10 21:01||2010-01-06 19:52|
|Target Version||Fixed in Version||1.2.1|
|Summary||0000329: Trying to add a new department is not possible. Department Company field not populated.|
|Description||Whenever I try to add a new department I get the error message:|
This company is invalid. You cannot add a department.
Reason being I can't assign the department to any company and Department Company name doesn't show up at all.
|Tags||No tags attached.|
You can correct this by patching the modules/departments/departments.class.php
line 134 replace
if ($this->dept_id == $this->dept_parent)
if ($this->dept_id && $this->dept_id == $this->dept_parent)
has in previous releases.
Thanks for your support!
Just tried your solution, but does not work (for me at least). Changing this line 134 in department.class.php has not changed this issue. It keeps showing nothing in Department Company field.
Happens to me even if I download the 1.0, 1.1 or 1.2 release version no matter if I test it locally or in my remote hosted app. In all versions I'm not being able to create Departments
Last edited: 2009-12-11 00:34
Hi Fran !
This is true, Company name is not filled out when you click on "new department" but submit works in my case after this fix.
However if you want company name in the form, even if it is not the best fix, you can add following code in departments/addedit.php
after line 39 : $company_id = $dept_id ? $department->dept_company : $company_id;
if($company_id && $department->company_name=='')
$company = new CCompany();
$department->company_name = $company->company_name;
What you are pointing is also true in my case...Company Department name still doesn't appear but if I enter the name of a new Department, now the application is not giving back the error message any more.
Also tried your piece of code in addedit.php, but at first sight I couldn't figure out what has changed. The issue with the Company Department name still there but at least we can now input new Departments through the GUI.
I wish I could help you more but my php knowledge is so limited, but my ears are wide open to try to get what you are doing. I'll check the effect of the modification in addedit later today.
Thanks in advance.
|If you look at revision 848, I've made the changes that are necessary and added more validation in general.|
Thanks to caseydk...
As in the solution provided by blienard I can enter new departments now...but Company Name doesn't appear anyway.
|This is resolved in trunk as of r871. This fix - along with a number of others - are likely to be rolled into a 1.2.1 release.|
|Merged the relevant changes from r848 and r871 in r883 into the version1.2.x branch in svn. A new release should come early next week.|
|In v1.2.1 release.|
|2009-12-10 21:01||Fran||New Issue|
|2009-12-10 23:34||blienard||Note Added: 0000640|
|2009-12-10 23:59||Fran||Note Added: 0000641|
|2009-12-11 00:33||blienard||Note Added: 0000642|
|2009-12-11 00:34||blienard||Note Edited: 0000642|
|2009-12-11 01:27||Fran||Note Added: 0000643|
|2009-12-11 20:40||caseydk||Status||new => resolved|
|2009-12-11 20:40||caseydk||Resolution||open => fixed|
|2009-12-11 20:40||caseydk||Assigned To||=> caseydk|
|2009-12-11 20:40||caseydk||Note Added: 0000644|
|2009-12-12 18:05||Fran||Status||resolved => feedback|
|2009-12-12 18:05||Fran||Resolution||fixed => reopened|
|2009-12-12 18:05||Fran||Note Added: 0000645|
|2009-12-19 22:10||caseydk||Status||feedback => resolved|
|2009-12-19 22:10||caseydk||Resolution||reopened => fixed|
|2009-12-19 22:10||caseydk||Note Added: 0000674|
|2009-12-24 20:52||caseydk||Note Added: 0000685|
|2010-01-06 19:52||caseydk||Note Added: 0000728|
|2010-01-06 19:52||caseydk||Status||resolved => closed|
|2010-01-06 19:52||caseydk||Fixed in Version||=> 1.2.1|