[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-users] Company Directory (HR) app
From: |
Dave Hall |
Subject: |
[Phpgroupware-users] Company Directory (HR) app |
Date: |
Tue, 01 Oct 2002 17:46:18 +1000 |
Ok here is the info people have been after. I have broken this into two
parts. The first is for new users. While the other is for those who
have a broken setup of the app.
>From scratch
1 Install the app as per normal
2 Create a all user group (if you have not already)
3 Add a addressbook ACL entry for this group so the "all users" group
can read "all user" group entries in the addressbook.
4 Create a users called "global" with a name of "Global Info" (you'll
see why later)
5 Add them to you all users group
6 Create a global addressbook category called "Company Directory"
7 Login as this user
8 Go into the hr app
9 Select the first user in your list
10 Click the Add button - in the line profile
11 Fill out all the relevant info
12 user ++
13 while more users to be done goto 9 //yes i know this is bad code ;)
14 Rejoice you have complete the process
NOTE: the names above have been changed to protect the innocent. You
can change them again to what ever you want.
How to fix it if you have a broken install
NOTE: this is designed for contacts installed in (my)SQL. It will not
work for LDAP contacts and may need changing for pgsql.
Step 0 BACKUP YOUR PHPGW DB - this is common sense ... but just to make
sure you don't forget ... backup your phpgw db!!!!!!
FIX METHOD 1 - this is if you have scattered hr entries already
1 Fire up a mysql session
2 Check you have a broken install with this SQL:
SELECT COUNT (*)
FROM phpgw_addressbook
WHERE lid IS NOT NULL;
If result is 0 then use new install instructions
3 Follow steps 2-6 from new install instrcutions above
4 Get the Company Directory cat id using this SQL:
SELECT cat_id
FROM phpgw_categories
WHERE cat_appname = 'addressbook'
AND cat_name = 'Company Directory';
Write down the result (i will call this $MY_CAT_ID from now on)
5 Get the 'global data' user id with this SQL:
SELECT account_id
FROM phpgw_accounts
WHERE account_lid = 'global';
Write down the result (I will call this $G_USER_ID from now on)
6 Reassign ownership with this SQL:
UPDATE phpgw_addressbook
SET owner = $G_USER_ID,
cat_id = $MY_CAT_ID
WHERE lid IS NOT NULL;
7 Find any duplicates with this SQL:
SELECT addressbook_id, lid
WHERE owner = $G_USER_ID
AND cat_id = $MY_CAT_ID;
NOTE: You may want to use extra fields here you choice
8 Delete duplicates from the addressbook using this SQL:
DELETE FROM phpgw_accounts
WHERE account_id IN ($DUP_ID_1, $DUP_ID_2, etc);
Note $DUP_ID_x is the account_id you wish to delete
9 Rejoice you have fixed your install.
FIX METHOD 2 - You have all your users in the addressbook but not in the
company directory.
1 Follow steps 3-6 from FIX METHOD 1
2 Find all your user ids using this SQL:
SELECT account_lid
FROM phpgw_accounts
WHERE account_type = 'u';
2b Print this out
3 Find all your staff in the addressbook using this SQL:
SELECT addressbook_id, fn
FROM phpgw_accounts;
4 Using the print copy of your accounts from step 2 match the
addressbook ids against your account list - Write the addressbook id
next to the account entry
5 Update your addressbook data using this SQL and you print off
UPDATE phpgw_addressbook
SET owner = $G_USER_ID,
cat_id = $MY_CAT_ID,
lid = '$USER_LID'
WHERE addressbook_id = $ADDRESSBOOK_ID;
The values are the pairs you wrote down in step 4
6 Goto 5 until all users are assigned
7 Rejoice you have fixed it.
These suggestions should work for fixing the various problems with the
Company Directory/HR app.
Cheers
skwashd
PS - If they don't work for you restore your data and you are no worse off.
dave.hall.vcf
Description: Card for <dave.hall@mbox.com.au>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-users] Company Directory (HR) app,
Dave Hall <=