Closed
Bug 655015
Opened 15 years ago
Closed 15 years ago
Add shirtSize field to phonebook
Categories
(Webtools Graveyard :: Phonebook, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cshields, Assigned: rtucker)
References
Details
Attachments
(2 files)
|
3.93 KB,
patch
|
wenzel
:
review-
|
Details | Diff | Splinter Review |
|
3.75 KB,
patch
|
wenzel
:
review+
|
Details | Diff | Splinter Review |
We have added an ldap attribute to mozComPerson labeled shirtSize. This should be one of the US sizes: XS, S, M, L, XL, XXL, XXXL
We need to add functionality to allow users to modify this entry when they modify their phonebook entry. However, I would suggest that we leave it out of the phonebook entry view. We can export the data from ldap when it is necessary to order shirts/jackets/etc.
The value itself in ldap is just a string so for consistency sake if we could add a drop-down box with just those options above (and maybe 'not assigned' as the default) that would help in sorting the output.
Updated•15 years ago
|
Component: Webdev → Phonebook
Product: mozilla.org → Webtools
QA Contact: webdev → phonebook
Comment 1•15 years ago
|
||
Should denote male/female as well.
So perhaps:
XS (M)
SX (F)
...
| Assignee | ||
Comment 2•15 years ago
|
||
Patch file for changes.
There are a few showing up in here from someone else's uncommited changes.
The changes I didn't make are wrt LDAP_HOST, the list_everyone function, office_cities
| Assignee | ||
Comment 3•15 years ago
|
||
The fix is in place on production. I do not have auth to commit to the repository. I attached a patch for fwenzel to apply. The patch contains some uncommited changes from someone previous to myself.
Fred,
Can you apply the patch or commit from pm-ns01 so I can close this out?
Assignee: nobody → rtucker
Comment 4•15 years ago
|
||
I can review the code for you if that's what you're asking. Please don't change code on a production service just like that, particularly because people are going to file bugs against webdev if something's broken.
Updated•15 years ago
|
Attachment #556833 -
Attachment is patch: true
| Assignee | ||
Comment 5•15 years ago
|
||
Fred,
Can you please point me to the dev box? I had assumed that editing here was status quo as there were uncommited local changes here.
Comment 6•15 years ago
|
||
Comment on attachment 556833 [details] [diff] [review]
Phonebook Patch
Review of attachment 556833 [details] [diff] [review]:
-----------------------------------------------------------------
super-awesome-drive-by-review-because-i-saw-this-cross-my-email. :)
::: templates/edit.php
@@ +162,5 @@
> + if(!isset($user_data['shirtsize'][0])){
> + $user_shirt = '';
> + } else {
> + $user_shirt = $user_data['shirtsize'][0];
> + }
shirtSize, no? I'm not sure how picky PHP and LDAP are about case.
::: constants.php
@@ +18,4 @@
> $editable_fields = array(
> 'cn', 'title', 'telephoneNumber', 'mobile', 'description', 'manager',
> 'other', 'im', 'mail', 'emailAlias', 'physicalDeliveryOfficeName',
> + 'employeeType', 'isManager', 'bugzillaEmail', 'shirtsize'
shirtSize, no?
Comment 7•15 years ago
|
||
Comment on attachment 556833 [details] [diff] [review]
Phonebook Patch
Review of attachment 556833 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good basically, but I had a few comments and questions. Please fix those and then we should be good.
::: config.php
@@ +1,3 @@
> <?php
>
> +define('LDAP_HOST', 'pm-ns01.mozilla.org');
What's this change for, is this the writable LDAP master?
@@ +157,4 @@
>
> public function list_everyone() {
> return $this->query_users(
> + "objectClass=mozComPerson", "dc=mozilla", array("dn")
Why did the o=com go away? Is it to include o=org as well? Are there any people outside o=com that should show up here in the first place?
Also, separate commit please.
::: constants.php
@@ +18,4 @@
> $editable_fields = array(
> 'cn', 'title', 'telephoneNumber', 'mobile', 'description', 'manager',
> 'other', 'im', 'mail', 'emailAlias', 'physicalDeliveryOfficeName',
> + 'employeeType', 'isManager', 'bugzillaEmail', 'shirtsize'
isn't the "S" in "shirtSize" supposed to be capitalized? Not sure if LDAP cares, just want to be sure.
@@ +22,4 @@
> );
>
> $office_cities = array(
> + 'Mountain View', 'San Francisco', 'Auckland', 'Beijing', 'Denmark', 'Paris',
This should be a separate patch, it has nothing to do with shirt sizes.
@@ +41,5 @@
> +$shirt_sizes[] = 'S (F)';
> +$shirt_sizes[] = 'M (F)';
> +$shirt_sizes[] = 'L (F)';
> +$shirt_sizes[] = 'XL (F)';
> +$shirt_sizes[] = 'XXL (F)';
Why do you append these one by one? Just make one array:
$shirt_sizes = array(
'S',
'M',
...
);
Attachment #556833 -
Flags: review-
Comment 8•15 years ago
|
||
(In reply to Rob Tucker [:rtucker] from comment #5)
> Fred,
> Can you please point me to the dev box? I had assumed that editing here was
> status quo as there were uncommited local changes here.
I don't think there's a dev box -- just check out the code and develop locally (or wherever you please, except in production). As long as you can reach the LDAP server (through VPN, presumably), you should be able to use the app.
Regarding the uncommitted local changes, I am not blaming them on you, but they shouldn't be there either.
Comment 9•15 years ago
|
||
I'll check in the unrelated changes to the config for you, so they become separate from your patch.
| Reporter | ||
Comment 10•15 years ago
|
||
(In reply to Fred Wenzel [:wenzel] from comment #8)
> Regarding the uncommitted local changes, I am not blaming them on you, but
> they shouldn't be there either.
Is webdev going to own up and take ownership this site again?
Comment 11•15 years ago
|
||
(In reply to Fred Wenzel [:wenzel] from comment #7)
> ::: config.php
> @@ +1,3 @@
> > <?php
> >
> > +define('LDAP_HOST', 'pm-ns01.mozilla.org');
Landed in r94484.
> @@ +157,4 @@
> >
> > public function list_everyone() {
> > return $this->query_users(
> > + "objectClass=mozComPerson", "dc=mozilla", array("dn")
NOT landed because I don't know (yet) what this change is for.
> @@ +22,4 @@
> > );
> >
> > $office_cities = array(
> > + 'Mountain View', 'San Francisco', 'Auckland', 'Beijing', 'Denmark', 'Paris',
landed in r94485.
| Assignee | ||
Comment 12•15 years ago
|
||
Fred,
I commented with my patch as to the changes I did not make.
I did not change the list_everyone function nor did I change the ldap server. Those changes were already made previous to me, and have been working in production for an unknown time.
As far as the array syntax goes, it's been a while since I've done any php dev, that was the first way that popped into my head to do it. Yes, it's probably not ideal syntax for doing so.
Comment 13•15 years ago
|
||
(In reply to Corey Shields [:cshields] from comment #10)
> (In reply to Fred Wenzel [:wenzel] from comment #8)
> > Regarding the uncommitted local changes, I am not blaming them on you, but
> > they shouldn't be there either.
>
> Is webdev going to own up and take ownership this site again?
Have we ever not? It's an internal web tool like many others. Also, we probably both agree that regardless of who "owns" a particular tool, code changes shouldn't just be dropped into production and never committed to version control.
| Reporter | ||
Comment 14•15 years ago
|
||
(In reply to Fred Wenzel [:wenzel] from comment #13)
> Have we ever not? It's an internal web tool like many others. Also, we
> probably both agree that regardless of who "owns" a particular tool, code
> changes shouldn't just be dropped into production and never committed to
> version control.
I agree with you here, which is why I asked Rob to have you check the patch in.
Anytime we ask about phonebook we are told that nobody owns it and webdev is working on a new one anyway. If the new phonebook is not ready soon, there will be more changes like this that will need to go in to phonebook as we are growing and need to accommodate more options.
Comment 15•15 years ago
|
||
(In reply to Rob Tucker [:rtucker] from comment #12)
> Fred,
> I commented with my patch as to the changes I did not make.
Where? Sorry I don't see it :-/
> I did not change the list_everyone function nor did I change the ldap
> server. Those changes were already made previous to me, and have been
> working in production for an unknown time.
No prob. I landed the patches that I found out what they are for.
> As far as the array syntax goes, it's been a while since I've done any php
> dev, that was the first way that popped into my head to do it. Yes, it's
> probably not ideal syntax for doing so.
No worries. Just change it (and the typos reed and I pointed out), give me a fixed patch, and off we go.
Thanks for your help with adding this feature!
Comment 16•15 years ago
|
||
(In reply to Fred Wenzel [:wenzel] from comment #11)
> > @@ +157,4 @@
> > >
> > > public function list_everyone() {
> > > return $this->query_users(
> > > + "objectClass=mozComPerson", "dc=mozilla", array("dn")
>
> NOT landed because I don't know (yet) what this change is for.
Based on my (probably outdated) knowledge of how Mozilla's LDAP architecture is made, my guess is that change is to allow MoFo folks under o=org to be visible in the phonebook. Another possible explanation is to allow MoMo folks (pre-MoCo transition) to be shown, since they were under o=net.
I'm happy to give this one-line change r=reed based on those possible explanations if nobody has anything better.
| Assignee | ||
Comment 17•15 years ago
|
||
Updated patch with new array syntax.
| Assignee | ||
Comment 18•15 years ago
|
||
Fred,
I've attached the new patch with the revised array syntax. Also regarding reeds comment about the case of shirtSize. For whatever reason, it is coming across as 'shirtsize' and not 'shirtSize'. What I have in place is working correctly.
Updated•15 years ago
|
Attachment #556924 -
Attachment is patch: true
Comment 19•15 years ago
|
||
Comment on attachment 556924 [details] [diff] [review]
Updated Patch
All right, I'll land it. Thanks!
Attachment #556924 -
Flags: review+
Comment 20•15 years ago
|
||
(In reply to Corey Shields [:cshields] from comment #14)
> Anytime we ask about phonebook we are told that nobody owns it and webdev is
> working on a new one anyway. If the new phonebook is not ready soon, there
> will be more changes like this that will need to go in to phonebook as we
> are growing and need to accommodate more options.
I don't have enough information to answer this. CCing Laura: Can you update us on if there's a rewrite of the phonebook in the works, and if you'd rather have your team be in charge of it or Rob Tucker from Corey's team? In the latter case, we need to give him the opportunity to know whom to ask for code reviews when necessary, as well as push access to the repository, obviously. Thanks!
Comment 21•15 years ago
|
||
(In reply to Reed Loden [:reed] (very busy) from comment #16)
> I'm happy to give this one-line change r=reed based on those possible
> explanations if nobody has anything better.
Sounds good. Under the assumption that this change wasn't there on accident, landed as r94486.
(In reply to Fred Wenzel [:wenzel] from comment #19)
> All right, I'll land it. Thanks!
r94487.
Code-wise, this bug is done, but keeping it open for comment 20.
Comment 22•15 years ago
|
||
Phonebook is part of the internal tools suite, and is now the foster child of Webtools. We have an open req for somebody to work on all of these. Haven't got as far as planning any rewrites, for obvious reasons.
In the meantime, if you have patches that want review/landing on phonebook, I suggest asking peterbe or rhelmer as they are the ones doing LDAP training this week.
| Assignee | ||
Comment 23•15 years ago
|
||
Laura,
Thanks for the quick response. I just missed rhelmer and peterbe, as I'm in the training with them :)
So I guess to clarify, it wouldn't offend anyone if I setup my own dev environment and just filed patches for improvements that people want made to phonebook? Then rhelmer or peterb can apply said patches for me?
Comment 24•15 years ago
|
||
rtucker: you should also get commit access. Can you give it to yourself? :)
All code should be reviewed unless completely trivial; but it would be more satisfying for you to land your own stuff!
| Assignee | ||
Comment 25•15 years ago
|
||
The tshirt size feature has been added as requested.
I'm gonna close this out. I'm more than happy to just file patches to fwenzel and have him apply them, if that's too bothersome than I can get write access to the repo.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•