I set default values for custom fields for a queue.
In the case where an Unprivileged user sends a mail to the queue to create a new ticket, the custom fields keep empty. Whith a privilileged user it’s OK.
I made different attempts with the new right SetInitialCustomField and it still doesn’t work :
set either on the custom fields, or the queue, or globally
granted either to Requestor, or Everybody, or Unprivileged
Our Unprivileged users do have already a few rights : CreateTicket, ReplyToTicket, SeeCustomField (granted in fact to Everydoby).
So why SetInitialCustomField wouldn’t work for them ? Of course, we don’t want to grant them ModifyTicket nor ModifyCustomField.
Thanks to tell me if I am wrong or if it is the way it works, in that case I’ll have to use a scrip to fullfill the custom fields.
Thanks for your reply,
I’ve made new tests with the debug mode on: no errors but lots of SQL lines (select, insert, update…) which are of no help for me.
Default CF values are meant to be set at creation time
diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm
index 6d24385..97224a2 100644
--- a/rt/lib/RT/Record.pm
+++ b/rt/lib/RT/Record.pm
@@ -2135,6 +2135,7 @@ sub AddCustomFieldDefaultValues {
Field => $cf->id,
Value => $value,
RecordTransaction => 0,
+ ForCreation => 1,
);
push @msgs, $msg unless $status;
}