[Rt-commit] rt branch, 5.0/articles-unique-only-within-own-class, updated. rt-5.0.1-6-g710eaefa95
Steve Burr
steve at bestpractical.com
Tue May 18 14:55:36 EDT 2021
The branch, 5.0/articles-unique-only-within-own-class has been updated
via 710eaefa951e1051bc1e5b4642760d0d2a7bc60b (commit)
from 56ac13ff5b55c11349d891d89353ce6cb80f6928 (commit)
Summary of changes:
lib/RT/Article.pm | 4 ++++
1 file changed, 4 insertions(+)
- Log -----------------------------------------------------------------
commit 710eaefa951e1051bc1e5b4642760d0d2a7bc60b
Author: Steven Burr <steve at bestpractical.com>
Date: Tue May 18 14:55:27 2021 -0400
Allow multiple articles with empty names
diff --git a/lib/RT/Article.pm b/lib/RT/Article.pm
index 5e99391bc3..90484a0013 100644
--- a/lib/RT/Article.pm
+++ b/lib/RT/Article.pm
@@ -247,6 +247,10 @@ sub ValidateName {
my $name = shift;
my $class_id = shift || ($self->ClassObj && $self->ClassObj->id) || $self->{'_creating_class'};
+ if ( !name ) {
+ return (1);
+ }
+
if ( $class_id ) {
my $articles = RT::Articles->new($RT::SystemUser);
$articles->Limit( FIELD => 'Name', OPERATOR => '=', VALUE => $name ); # cannot use LimitName() as it hardcodes 'LIKE'
-----------------------------------------------------------------------
More information about the rt-commit
mailing list