Mailing List Archive

Article name unicity
Dear RT developpers,

I just discovered that articles names must be unique between all
classes, see RT::Article::ValidateName.

I first wrote a patch to enforce uniqueness only in article class.

So far so good, I forget that article may move between classes.

I decided to change my patch so in case of a class change, operation is
refused if an article with same name exists in target class.

Evrything looks ok now, and I'm ready to submit the patch, but ... I see
that it's possible to create articles without name (explicitely
permitted in ValidateName). Who knows the purpose of allowing empty names??

What BPS devs thinks about this?

--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016
Re: Article name unicity [ In reply to ]
On 2016年5月26日 at 8:40:13, Emmanuel Lacour (elacour@easter-eggs.com) wrote:
> Dear RT developpers,

Hiya Emmanuel,

> I see
> that it's possible to create articles without name (explicitely
> permitted in ValidateName). Who knows the purpose of allowing empty names??
>
> What BPS devs thinks about this?

I’m really not sure! Here’s the fifteen-year-old commit that added that comment and code:

https://github.com/bestpractical/rt/commit/8ef2201de4ae5cf240ac5edffc31fc1ddfa0b115

Unfortunately there doesn’t seem to be any additional context in this or nearby commits.

My only guess is that we wanted to support using a custom field as the primary way identify articles instead, and so name would be unnecessary. But I don’t really know.

Sorry I can’t help more.
Shawn
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016