Select box for 'Organization' empty when creating projects, tasks.. shown when creating person. Tested on latest stable and dev versions. Using the most current drupal 6 installation. Tried flushing all caches, still the same. I am attaching the list of my modules.

Any help is completely appreciated :) thank you!
p.s. Storm Rocks!

Comments

marcin-mark’s picture

Status: Needs review » Active
juliangb’s picture

Category: bug » support

Are organisations listed as customers, and active?

phasmaphobic’s picture

I'm having the same issue. I have multiple organizations, but the only ones I can select for Projects are Customers. I'm not sure why this restriction is set. I don't recall the Project module's description implying it was limited to customers. I'm trying to use this module to create projects within parent organizations, such as "Tech Dept" and "Support Dept" and "Dev Dept," which aren't customer-specific.

juliangb’s picture

Note that there is 1 or more previous issue(s) relating to this - can´t find them at the moment but perhaps someone could post links if found.

The customer restriction has previously been treated as ´by design´, but perhaps we should reconsider.

rjgoldsborough’s picture

Hey all. I'm using Storm and am experiencing the same error. When trying to create any content but "Person", the organization select list is not usable. I'm attempting to take a closer look, but was just curious if anyone found out anymore info? Thanks.

***Edit***

After looking through code, it does look like this is by design. There is an SQL query in the sub-modules that retrieve the data to populate that select with organizations. In all of them but "Person", there is some SQL that filters only the customer organizations.

Line 331 - stormproject.module
Change this:
$s_org = "SELECT n.nid, n.title FROM {stormorganization} so INNER JOIN {node} n 
              ON so.nid=n.nid WHERE n.status=1 AND so.iscustomer=1 AND so.isactive=1 AND n.type='stormorganization' ORDER BY n.title";

to this:
$s_org = "SELECT n.nid, n.title FROM {stormorganization} so INNER JOIN {node} n 
              ON so.nid=n.nid WHERE n.status=1 AND so.isactive=1 AND n.type='stormorganization' ORDER BY n.title";

(remove the so.iscustomer=1)
This is also needed a few lines down in the else statement. Line 337

While rethinking the way Storm works, it made sense that you probably wouldn't put the provider organization on every project, but I could see reasons where you might want to, and some people may just want to all the time.

I haven't found any repercussions yet, but will report back if I do. Also, this seems like it could be done for any of the sub-modules you need.

juliangb’s picture

Title: Select box for 'Organization' empty when creating projects, tasks.. shown when creating person » Remove filtering by iscustomer on lists of organisations
Version: 6.x-1.x-dev » 6.x-2.x-dev
Category: support » task

Sounds like this needs to change.

rjgoldsborough’s picture

Hi Julian, I'd be happy to try and roll a patch to remove the customer filter.

juliangb’s picture

Thanks, feel free.

rjgoldsborough’s picture

Ok, so here are patches for the project and task sub modules. The rest to follow. Afaict, the filtering on the sql query just needed to be removed. I've been using Storm with these changes and haven't seemed to find any drawbacks.

rjgoldsborough’s picture

juliangb’s picture

Status: Active » Needs review

CNR so that the test bot looks at the patches.

Status: Needs review » Needs work

The last submitted patch, storm_timetracking_customer_filter_removal.patch, failed testing.

juliangb’s picture

Status: Needs work » Needs review

Needs to be patched from the root of the Storm directory for tests to pass.

That way, all patches can also be included in one...

rjgoldsborough’s picture

I had tried from the module root, but the patch wouldn't apply for some reason. I'll give it another go.

rjgoldsborough’s picture

StatusFileSize
new7.65 KB

Ok, I think this one should do it.

juliangb’s picture

Passes test bot

Seems good from a read through from me.

Can someone else confirm this makes the change as expected?

juliangb’s picture

Status: Needs review » Reviewed & tested by the community
juliangb’s picture

#15: storm_customer_filter_removal.patch queued for re-testing.

Ensuring patch still applies.

juliangb’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 2.x.

Will not be backported to 1.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.