Skip to content
  • Alex Vandiver's avatar
    Move canonicalization into RT::ObjectCustomFieldValue->Create · 9ec3b7df
    Alex Vandiver authored
    Previously, value canonicalization happened for dates and datetimes in
    RT::CustomField->AddValueForObject, and for IP addresses and ranges in
    RT::ObjectCustomFieldValue->Create.  Standardize on the latter, as it is
    lower down and thus harder to skip accidentally.
    
    This requires creating the CustomField object as the current user, not
    as the system user, as Date and DateTime canonicalization cares about
    the time zone of the current user.  This, in turn, requires switching to
    _Value('Type') instead of Type, as the constructed $cf object is not
    guaranteed to have the right context objects for it to be readable by
    the user.
    9ec3b7df