AttributeURL allows for a custom validation_pattern to be specified, per latest documentation. If not specified, it defaults to what's configured for iTop's config setting "url_validation_pattern".
However: I tried to add "AttributeURL" since it was most fitting, and made the validation pattern less strict than what's in that setting. For the front-end validation (iTop console), I can now enter a URL with a place holder: https://jeffreybostoen.be/$current_user->language$ without any issue.
This is a documented feature with no mention of limitation: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Axml_reference#fields
However, upon saving, it results in this error:
The object cannot be saved : Unexpected value for attribute 'newvalue': Wrong format [https://jeffreybostoen.be/compatibility-with-itop-3-0/$current_user->language$]
I debugged it and it comes from CMDBChangeOpSetAttributeURL's "newvalue" attribute. It enforces the url_validation_pattern, which was NOT explicitly updated to support more characters.
Rather than enforcing the default validation here, there should not be any validation, as the real validation should theoretically have happened on the host class), it should just allow anything.
Actually we fixed something similar in the upcoming 3.0.2, but on the
oldvaluefield, see here.@cisou you might want to check this and if we want to fix it as well.
Discussed with @cisou : we totally agree !
Unfortunately the 3.0.2 is in its last review phase, so we can't add this fix :(
I've added N°5423 for this second fix, and commit with a92b1971
It will be part either of 3.0.3 (but up to this day we're not sure it this version will exist ?) or 3.1.0.