web2project: web-based project management

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000329 [v1.2 Release (Closed)] Departments major always 2009-12-10 23:01 2010-01-06 21:52
Reporter Fran View Status public  
Assigned To caseydk
Priority normal Resolution fixed  
Status closed   Product Version 1.2
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.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000640)
blienard (reporter)
2009-12-11 01:34

You can correct this by patching the modules/departments/departments.class.php
line 134 replace
if ($this->dept_id == $this->dept_parent)
by
if ($this->dept_id && $this->dept_id == $this->dept_parent)
has in previous releases.
(0000641)
Fran (reporter)
2009-12-11 01:59

Hi blienard!

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
(0000642)
blienard (reporter)
2009-12-11 02:33
edited on: 2009-12-11 02: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;

add code

        if($company_id && $department->company_name=='')
        {
                $company = new CCompany();
                $company->loadFull($AppUI,$company_id);
                $department->company_name = $company->company_name;
        }

(0000643)
Fran (reporter)
2009-12-11 03:27

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.
(0000644)
caseydk (administrator)
2009-12-11 22:40

If you look at revision 848, I've made the changes that are necessary and added more validation in general.
(0000645)
Fran (reporter)
2009-12-12 20:05

Thanks to caseydk...

As in the solution provided by blienard I can enter new departments now...but Company Name doesn't appear anyway.

Thanks again
(0000674)
caseydk (administrator)
2009-12-20 00:10

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.
(0000685)
caseydk (administrator)
2009-12-24 22:52

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.
(0000728)
caseydk (administrator)
2010-01-06 21:52

In v1.2.1 release.

- Issue History
Date Modified Username Field Change
2009-12-10 23:01 Fran New Issue
2009-12-10 23:02 Fran Issue Monitored: Fran
2009-12-11 01:34 blienard Note Added: 0000640
2009-12-11 01:59 Fran Note Added: 0000641
2009-12-11 02:33 blienard Note Added: 0000642
2009-12-11 02:34 blienard Note Edited: 0000642
2009-12-11 03:27 Fran Note Added: 0000643
2009-12-11 22:40 caseydk Status new => resolved
2009-12-11 22:40 caseydk Resolution open => fixed
2009-12-11 22:40 caseydk Assigned To => caseydk
2009-12-11 22:40 caseydk Note Added: 0000644
2009-12-12 20:05 Fran Status resolved => feedback
2009-12-12 20:05 Fran Resolution fixed => reopened
2009-12-12 20:05 Fran Note Added: 0000645
2009-12-20 00:10 caseydk Status feedback => resolved
2009-12-20 00:10 caseydk Resolution reopened => fixed
2009-12-20 00:10 caseydk Note Added: 0000674
2009-12-24 22:52 caseydk Note Added: 0000685
2010-01-06 21:52 caseydk Note Added: 0000728
2010-01-06 21:52 caseydk Status resolved => closed
2010-01-06 21:52 caseydk Fixed in Version => 1.2.1


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker