Input must match?

How can I alter this to make more sense to my users? They don’t necessarily
know what [Mandatory] means and, quite frankly, I think it could be a bit
clearer myself. Where in the code do I find it to change it?

Also, if input into a CF is mandatory, wouldn’t it make sense to remove the ‘(no
value)’ option from a Select One type CF?

Mathew

How can I alter this to make more sense to my users? They
don’t necessarily
know what [Mandatory] means and, quite frankly, I think it
could be a bit
clearer myself. Where in the code do I find it to change it?

For this, I modified lib/RT/Interface/Web.pm so that it would set the
failure result manually before attempting to call the
AddCustomFieldValue code:

*** 1218,1223 ****
— 1218,1228 ----
elsif ( $arg =~ /-Values$/ and
!$CustomFieldObj->Repeated) {
my $cf_values = $Object->CustomFieldValues($cf);

  •                   if (!@values and $CustomFieldObj->IsMandatory) {
    
  •                       push( @results, $CustomFieldObj->Name . ":
    

you must have at least one value" );

  •                       next;
    
  •                   }
                      my %values_hash;
                      my @addcfresults = ();
    

For that one, I can’t provide a clean unified diff, since this is my
hacked 3.4.1 code. That should get you close enough to where you need
to be, however.

Also, if input into a CF is mandatory, wouldn’t it make sense
to remove the ‘(no value)’ option from a Select One type CF?

I noticed this, too, and fixed it in
share/html/Elements/EditCustomFieldSelect, just by adding a simple if
statement around that part of the code:

@@ -57,7 +57,9 @@
% }
><% $value->Name%>
% }
+% if (!$CustomField->IsMandatory) {
<option value=“” <% !$selected && ‘SELECTED’ %>><&|/l&>(no
value)</&>
+% }

<%ARGS>
$Object => undef

Eric Schultz
United Online