You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Cheong Chung Onn <ch...@greenfossil.com> on 2009/01/26 04:54:28 UTC

Is TelephoneNumberMatch - 2.5.13.20 broken?

Hi,

Is telephoneNumber match broken? If I would to search for a telephone 
number say telephoneNumber=1-801-555-1212, would this search yield a 
match if the entry's telephoneNumber is 1 801 555 1212?

I have tested it in the SevenSeas example,  using the entry 
cn=JSmith,ou=people,o=sevenSeas.  Searching for a telephoneNumber 
1-801-555-1212 would yield false. Match will only be true, if the number 
is exactly the same as what is registered in the entry. Is this an 
expected behavior or is it broken?


There is a Jira closed with a test case in place on a similar issue 
https://issues.apache.org/jira/browse/DIRSERVER-311

Regards
chung-onn

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
Cheong Chung Onn wrote:
> Hi Chris,
>
> Thanks for helping to explain the issue.
>
> Emmanuel : Please let me know if you need any info from me. Btw, the 
> telephoneNumberMatch is not working since i started using version 1.5.1

I confirm, this is a bug. We don't have a matching rule for 
TelephoneNumber. Nothing that can't be fixed in a few hours, though.

Can you fill a JIRA ?

Many thanks !


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
Cheong Chung Onn wrote:
> Hi Emmanuel,
>
> Sorry for the delay, my time zone 8 hours ahead of GMT. Just read your 
> email about raising the Jira and I found you already has raised it 
> http://issues.apache.org/jira/browse/DIRSERVER-1304
>
> Fantastic work and response!
This was an easy one. I'm afraid we will have many other attributes 
without correct comparators, and we will have to add them.

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Cheong Chung Onn <ch...@greenfossil.com>.
Hi Emmanuel,

Sorry for the delay, my time zone 8 hours ahead of GMT. Just read your 
email about raising the Jira and I found you already has raised it 
http://issues.apache.org/jira/browse/DIRSERVER-1304

Fantastic work and response!

Cheers.
chung-onn



Emmanuel Lecharny wrote:
> Cheong Chung Onn wrote:
>> Hi Chris,
>>
>> Thanks for helping to explain the issue.
>>
>> Emmanuel : Please let me know if you need any info from me. Btw, the 
>> telephoneNumberMatch is not working since i started using version 1.5.1
>
> Ok, I have fixed the server so that you can now look for "0123456789" 
> when you injected "0-123   4-56  7-8-9". I also have added a test to 
> check that it works fine.
> It will be released in 1.5.5.
>
>>
>> Regards
>> chungonn
>>
>>
>
>

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
Cheong Chung Onn wrote:
> Hi Chris,
>
> Thanks for helping to explain the issue.
>
> Emmanuel : Please let me know if you need any info from me. Btw, the 
> telephoneNumberMatch is not working since i started using version 1.5.1

Ok, I have fixed the server so that you can now look for "0123456789" 
when you injected "0-123   4-56  7-8-9". I also have added a test to 
check that it works fine.
It will be released in 1.5.5.

>
> Regards
> chungonn
>
>


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Cheong Chung Onn <ch...@greenfossil.com>.
Hi Chris,

Thanks for helping to explain the issue.

Emmanuel : Please let me know if you need any info from me. Btw, the 
telephoneNumberMatch is not working since i started using version 1.5.1

Regards
chungonn


Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
You are totally right, Chris !

I should get some more sleep, and read mails more carefuly !


On Mon, Jan 26, 2009 at 12:12 PM, Chris Trobridge
<ch...@aepnetworks.com> wrote:
> Emmanuel Lecharny wrote:
>>
>> There must be something wrong somwhere else. The syntaxChecker works
>> well with all the phone number you gave (I checked).
>>
>> I will investigate tonite..
>
> I may have missed something but I think you may be at cross-purposes.
>
> My impression is that Cheong isn't saying that the numbers are failing the
> syntax check.
>
> He wants to be able to get telephone number matches without having to match
> the value stored in LDAP character by character.
>
> He wants to be able to store the number "1 801 555 1212" in LDAP and have it
> be matched by "1-801-555-1212" or "18015551212".
>
> This is an issue to do with matching telephone numbers rather than the
> regexp for accepting the numbers as valid at all.
>
> Regards
> Chris
>
>



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Chris Trobridge <ch...@aepnetworks.com>.
Emmanuel Lecharny wrote:
> There must be something wrong somwhere else. The syntaxChecker works
> well with all the phone number you gave (I checked).
>
> I will investigate tonite..

I may have missed something but I think you may be at cross-purposes.

My impression is that Cheong isn't saying that the numbers are failing 
the syntax check.

He wants to be able to get telephone number matches without having to 
match the value stored in LDAP character by character.

He wants to be able to store the number "1 801 555 1212" in LDAP and 
have it be matched by "1-801-555-1212" or "18015551212".

This is an issue to do with matching telephone numbers rather than the 
regexp for accepting the numbers as valid at all.

Regards
Chris


Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On Mon, Jan 26, 2009 at 11:32 AM, Cheong Chung Onn
<ch...@greenfossil.com> wrote:
> Hi Emmanuel,
>
>>> Your regex has a typo, a missing dot at the beginning  .*[+]? *((\([0-9-
>>> ]+\))|[0-9- ]+)+
>>>
>>
>> It's not a dot, AFAICR, but a space.
>>
>
> Yes, a space will definitely correct compared to a dot :)

Here is the real regexp :

private static final String DEFAULT_REGEXP = "^ *[+]? *((\\([0-9-
]+\\))|[0-9- ]+)+$";


>>>
>>> I checked against your regex and it does work. However, when i searched
>>> for
>>> a telephoneNumber=1-801-555-1212, it fails. Below is the entry i used for
>>> my
>>> testing.
>>>
>>
>> Strange ... I will check that and come back to you when done.
>>
>
> I just ran another test -  using telephoneNumber=18015551212 does not work
> too.

There must be something wrong somwhere else. The syntaxChecker works
well with all the phone number you gave (I checked).

I will investigate tonite...

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Cheong Chung Onn <ch...@greenfossil.com>.
Hi Emmanuel,

>> Your regex has a typo, a missing dot at the beginning  .*[+]? *((\([0-9-
>> ]+\))|[0-9- ]+)+
>>     
>
> It's not a dot, AFAICR, but a space.
>   
Yes, a space will definitely correct compared to a dot :)
>> I checked against your regex and it does work. However, when i searched for
>> a telephoneNumber=1-801-555-1212, it fails. Below is the entry i used for my
>> testing.
>>     
>
> Strange ... I will check that and come back to you when done.
>   
I just ran another test -  using telephoneNumber=18015551212 does not 
work too.

Thanks for looking into the matter

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On Mon, Jan 26, 2009 at 10:50 AM, Cheong Chung Onn
<ch...@greenfossil.com> wrote:
> Hi Emmanuel,
>
> Your regex has a typo, a missing dot at the beginning  .*[+]? *((\([0-9-
> ]+\))|[0-9- ]+)+

It's not a dot, AFAICR, but a space.


> I checked against your regex and it does work. However, when i searched for
> a telephoneNumber=1-801-555-1212, it fails. Below is the entry i used for my
> testing.

Strange ... I will check that and come back to you when done.

Thanks !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Cheong Chung Onn <ch...@greenfossil.com>.
Hi Emmanuel,

Your regex has a typo, a missing dot at the beginning  .*[+]? *((\([0-9- 
]+\))|[0-9- ]+)+
I checked against your regex and it does work. However, when i searched 
for a telephoneNumber=1-801-555-1212, it fails. Below is the entry i 
used for my testing.

dn: cn=JSmith,ou=people,o=sevenSeas
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: James Smith
cn: Jim Smith
cn: Jimmy Smith
cn: JSmith
givenname: James
givenname: Jim
givenname: Jimmy
mail: JSmith@Acme.com
sn: Smith
telephonenumber: 1 801 555 1212
userpassword:: bmV3cGFzc3dvcmQ=


Emmanuel Lecharny wrote:
> Cheong Chung Onn wrote:
>> Hi,
>>
>> Is telephoneNumber match broken? If I would to search for a telephone 
>> number say telephoneNumber=1-801-555-1212, would this search yield a 
>> match if the entry's telephoneNumber is 1 801 555 1212?
>>
>> I have tested it in the SevenSeas example,  using the entry 
>> cn=JSmith,ou=people,o=sevenSeas.  Searching for a telephoneNumber 
>> 1-801-555-1212 would yield false. Match will only be true, if the 
>> number is exactly the same as what is registered in the entry. Is 
>> this an expected behavior or is it broken?
>>
>>
>> There is a Jira closed with a test case in place on a similar issue 
>> https://issues.apache.org/jira/browse/DIRSERVER-311
> Here is the regexp used to check telephoneNumber syntax :
> *[+]? *((\([0-9- ]+\))|[0-9- ]+)+
>
> Your number should pass.
>

Re: Is TelephoneNumberMatch - 2.5.13.20 broken?

Posted by Emmanuel Lecharny <el...@gmail.com>.
Cheong Chung Onn wrote:
> Hi,
>
> Is telephoneNumber match broken? If I would to search for a telephone 
> number say telephoneNumber=1-801-555-1212, would this search yield a 
> match if the entry's telephoneNumber is 1 801 555 1212?
>
> I have tested it in the SevenSeas example,  using the entry 
> cn=JSmith,ou=people,o=sevenSeas.  Searching for a telephoneNumber 
> 1-801-555-1212 would yield false. Match will only be true, if the 
> number is exactly the same as what is registered in the entry. Is this 
> an expected behavior or is it broken?
>
>
> There is a Jira closed with a test case in place on a similar issue 
> https://issues.apache.org/jira/browse/DIRSERVER-311
Here is the regexp used to check telephoneNumber syntax :
*[+]? *((\([0-9- ]+\))|[0-9- ]+)+

Your number should pass.

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org