Commit 9be02044 by Jérome Perrin

bt5: fix naming convention for FieldValidator_requireIfDialogConfirmed

FieldValidator is not an acceptable prefix,
Base_validateDialogConfirmation seems better
parent 65305527
......@@ -279,7 +279,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -189,7 +189,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -146,7 +146,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -146,7 +146,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -174,7 +174,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -158,7 +158,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -174,7 +174,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -146,7 +146,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -146,7 +146,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -106,7 +106,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -106,7 +106,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>FieldValidator_requireIfDialogConfirmed</string> </value>
<value> <string>Base_validateDialogConfirmation</string> </value>
</item>
</dictionary>
</pickle>
......
  • Indeed better naming, but this change can break compatibility with projects already using it, so it could worth to check

  • That's a good point, thank you.

    I'm thinking we could address this by extending "coding style" test by a test checking that all fields that all validators defined on fields really exist. It's not really "coding style" here, but this is where we do all this kind of check of configuration. I can do this, let me know what you think about it.

  • It's not really "coding style" here, but this is where we do all this kind of check of configuration.

    indeed it is not. I am not too familiar with this what this test includes, but if you believe it fits there it is ok for me.

    Other idea would be to keep also FieldValidator_requireIfDialogConfirmed logging a deprecation warning. Not that I'd be too happy with duplication, just proposing.

  • Yes this was also one idea I had, to keep a FieldValidator_requireIfDialogConfirmed in the bt for obsolete proxy field compatibility, but it's probably something where we can break compatibility, as long as there's a test failing. This kind of UI things are often not tested, so having a test checking the field configuration looks the most realistic way to have a test failing when this does not work.

  • I started next step, which will be check that ERP5 Form are correctly named ( !1021 ), and I thought about another approach maybe instead of fixing old names we should just add all old names to a list of ignored .

  • This kind of UI things are often not tested, so having a test checking the field configuration looks the most realistic way to have a test failing when this does not work.

    +1

    I started next step, which will be check that ERP5 Form are correctly named ( !1021 ), and I thought about another approach maybe instead of fixing old names we should just add all old names to a list of ignored .

    OK, thanks

  • mentioned in merge request !1031 (merged)

    Toggle commit list
  • This kind of UI things are often not tested, so having a test checking the field configuration looks the most realistic way to have a test failing when this does not work.

    +1

    Thanks for the feedback, I made !1031 (merged)

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment