[1751] in Moira
Re: newish users appearing with bad chfn info
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Fri Mar 16 11:37:12 2001
Message-Id: <200103161637.LAA09842@riff-raff.mit.edu>
To: Garry Zacheiss <zacheiss@MIT.EDU>
cc: Laura Baldwin <boojum@MIT.EDU>, bug-moira@MIT.EDU, mvan@MIT.EDU,
othomas@MIT.EDU
In-Reply-To: Your message of "Fri, 16 Mar 2001 10:37:26 EST."
<200103161537.KAA09683@riff-raff.mit.edu>
Date: Fri, 16 Mar 2001 11:37:04 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
>> It's a staff load issue; the warehouse seems to have changed the
>> capitalization of the data in our view of the employee data. I'll
>> talk to them.
Ha ha, I lied. It looks like this particular bundle of joy has been
with us since the new code base for the staff load got deployed
(beginning of last August). Patch enclosed below.
I'll check this in soon and get it on the server; I've tested it on
ttsp. I'm also coming up with a way to fix all the existing entries
now.
Garry
Index: staff.pc
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/regtape/staff.pc,v
retrieving revision 1.5
diff -u -r1.5 staff.pc
--- staff.pc 2000/07/27 01:08:32 1.5
+++ staff.pc 2001/03/16 16:18:10
@@ -137,7 +137,7 @@
{
static struct entry e;
static char buf[BUFSIZ];
- static char name[LEN_NAME + 1], sname[LEN_NAME + 1], id[LEN_ID + 1];
+ static char name[LEN_NAME + 1], id[LEN_ID + 1];
static char office[LEN_OFFICE + 1], phone[LEN_PHONE + 1];
static char phone2[LEN_PHONE2 + 1], dept[LEN_DEPT + 1], title[LEN_TITLE + 1];
int ends_sr, ends_jr, ends_iii, ends_iv, ends_ii, ends_v;
@@ -154,8 +154,6 @@
strlcpy(dept, &buf[LOC_DEPT], LEN_DEPT + 1);
strlcpy(title, &buf[LOC_TITLE], LEN_TITLE + 1);
- strcpy(sname, name);
- e.name = strtrim(sname);
p = strchr(name, ',');
if (p)
*p = '\0';
@@ -194,6 +192,12 @@
FixCase(e.last);
FixCase(e.first);
FixCase(e.middle);
+
+ e.name = buf;
+ if (*e.middle)
+ sprintf(e.name, "%s %s %s", e.first, e.middle, e.last);
+ else
+ sprintf(e.name, "%s %s", e.first, e.last);
e.id = id;
e.haddr = e.hphone = "";