In my use case, I have a dynamic field "SR Number" which stores some external ticket number. The fact is that those ticket numbers are made of digits only and may begin with "0" (zero), like e.g. "01234567".
When I search for tickets whose dynamic field "SR Number" is e.g. "01234567", this fails, because autocast changes the string value "01234567" to the "1234567" int, while I need it just stays as it is (the string "01234567").
I was obliged to modify the autocast function (in otrs/objects.py) by adding the 2 following lines just before the "try" statement:
if s.startswith("0"):
return s
In my use case, I have a dynamic field "SR Number" which stores some external ticket number. The fact is that those ticket numbers are made of digits only and may begin with "0" (zero), like e.g. "01234567".
When I search for tickets whose dynamic field "SR Number" is e.g. "01234567", this fails, because autocast changes the string value "01234567" to the "1234567" int, while I need it just stays as it is (the string "01234567").
I was obliged to modify the autocast function (in otrs/objects.py) by adding the 2 following lines just before the "try" statement:
if s.startswith("0"):
return s