Forum OpenACS Q&A: Problem with intranet customer module...

After setting up a customer and adding a contact, there is the option to add a primary contact. I get a choice of people to select, but after selecting one of them, it makes a completely unrelated user the primary contact.

For example, I select myself as primary contact for a new customer, and in the customer info pages the primary contact is listed as 'anonymous'.

I'm still doing some testing to find out if the previous user_id to the one selected is being grabbed out of the db (just found a great perl web-based interface for postgres called dbengine, which makes debugging a lot simpler!)

Collapse
Posted by Don Baccus on
Where can one find dbengine?

After tracking down the problem further, enter it into the SDM and post a heads-up here, too, if you don't mind.  I've spent a little time fixing intranet bugs in the past and will try to find time to dig  into it over the weekend.

Collapse
Posted by Chris Hardy on
I've also experianced this problem. On a Side note I've been working on getting 3.2.4 running on my machine as well, and I've found misspellings, I've fixed some sysdate stuff,and I'm currently trying to figure out why ACS is insisting on adding a new group_id to a subproject. If I can't figure this one out soon,it'll go into the SDM.. What should I do with my patches though?
Collapse
Posted by Chris Hardy on
I've also experianced this problem. On a Side note I've been working on getting 3.2.4 running on my machine as well, and I've found misspellings, I've fixed some sysdate stuff,and I'm currently trying to figure out why ACS is insisting on adding a new group_id to a subproject. If I can't figure this one out soon,it'll go into the SDM.. What should I do with my patches though?
Collapse
Posted by Don Baccus on
Talk to Ben about access to the CVS tree - how confident are you of your ability to fix bugs in the ACS?  So far, "anyone and everyone" is  pretty much the philosophy...
Collapse
Posted by Chris Hardy on
Well, I've sent him a few e-mails, though I haven't heard from him lately. I've programmed quite a bit before, but never in tcl, but the code is pretty easy to figure out. To date, my fixes have been 1) fixing a few spelling errors, and 2) fixing sysdate call  that was causing problems in the glassroom, and ticket tracker modules.. I've made a patch.. Would one of you be willing to  look at it and see if I'm barking up the wrong tree, or doing something wrong? Let me know and I'll e-mail it you.
Collapse
Posted by Don Baccus on
e-mail me, sure ... Ben's been really busy, probably not checking his e-mail all that frequently.  You sound like a perfectly fine candidate  to have CVS access, though, so ping him some more :)
Collapse
Posted by Grant Schofield on
Don - I'll put it into the SDM with the details.


Re: dbengine - the url is http://www.cis-computer.com/software/dbengine/

Let me know if you find it useful. A hint, you have to install DBI and DBD - don't go with the latest versions, they can be a bit finicky. A couple of versions back is usually a good bet.

Collapse
Posted by Chris Hardy on
Fixed this problem.. The solution is to apply the following patch...

--- view.tcl Thu Aug 10 20:02:04 2000
+++ /opt/acs3-pg/www/intranet/customers/view.tcl Thu
    Jul 20 08:28:50 2000 @@ -12,6 +12,8 @@
set_form_variables # group_id
+validate_integer
    group_id $group_id
+ set return_url [ad_partner_url_with_query] set db [ns_db gethandle] @@
    -54,13 +56,13 @@ g.registration_date, c.note, g.short_name,
- a.first_names||' '||a.last_name as
    primary_contact_name,
+ u.first_names||' '||u.last_name as primary_contact_name,
    primary_contact_id, coalesce(im_cust_status_from_id(customer_status_id),'<-- not
    specified -->') as customer_status -from user_groups g, im_customers c, address_book a

+from user_groups g, im_customers c, users u where g.group_id=$group_id and
    g.group_id=c.group_id
- and c.primary_contact_id=a.address_book_id
+ and
    c.primary_contact_id=u.user_id union select g.group_name, g.registration_date,

    I found that the view code is trying to bring up a users record, which shouldn't be, it should grab
    the correspondance from address_book. So I changed the record to grab from the address_book
    table.. Now, I've still got problem's with the url to the address book entry. I've got to figure out
    some more tcl before I fix that :)

Collapse
Posted by Chris Hardy on
Egads, it's all wrong in /www/intranet/customer/index.tcl as well!! I've fixed that as well.. Will someone please correct me if I'm wrong?
Collapse
Posted by Jade Rubick on
I haven't checked into it, Chris, but it looks like you're on the right track. It's clear there's a problem -- I hope your solution works.
Collapse
Posted by Chris Hardy on
Fixed it, it's in the CVS, and I've been working on other stuff as well (in the Intranet Module), school has reared it ugly head, but I'm hoping to get more patches in before the cut off date.