Bug 1: When creating a new script with a custom field, a value for the custom field can't be saved to the preset immediately.
Steps to reproduce
[ol]
[li]Open the rename dialog[/li]
[li]Click Edit to open the script editor[/li]
[li]Copy the following to the bottom of the script:
Function OnGetCustomFields(ByRef getFieldData)
getFieldData.fields.a_custom_field = "from script"
End Function[/li]
[li]Press Refresh Preview to make the custom appear[/li]
[li]Change the text in the custom field to "from preset"[/li]
[li]Save the preset with the name "Bug 1a"[/li]
[li]Close the rename dialog
[/li]
[li]Open the rename dialog[/li]
[li]Double click Bug 1a[/li]
[li]Error:The custom field says "from script"[/li]
[li]Expectation:The custom field should say "from preset"[/li]
[li]Close the rename dialog[/li][/ol]
The following is a working version:
[ol]
[li]Open the rename dialog[/li]
[li]Click Edit to open the script editor[/li]
[li]Copy the following to the bottom of the script:
Function OnGetCustomFields(ByRef getFieldData)
getFieldData.fields.a_custom_field = "from script"
End Function[/li]
[li]Save the preset with the name "Bug 1b"[/li]
[li]Reopen the preset by double clicking "Bug 1b"[/li]
[li]Change the text in the custom field to "from preset"[/li]
[li]Save the preset[/li]
[li]Close the rename dialog
[/li]
[li]Open the rename dialog[/li]
[li]Double click Bug 1b[/li]
[li]Correct:The custom field says "from preset"[/li]
[li]Close the rename dialog[/li][/ol]
Bug 2: When using a custom fields in a rename script and saving a value for that field to the preset, the value isn't read from the preset if you have already had another rename preset opened with a custom field with the same name.
Steps to reproduce
[ol]
[li]Open the rename dialog[/li]
[li]Click Edit to open the script editor[/li]
[li]Copy the following to the bottom of the script:
Function OnGetCustomFields(ByRef getFieldData)
getFieldData.fields.a_custom_field = ""
End Function[/li]
[li]Save the preset with the name "Bug 2a"[/li]
[li]Reopen the preset by double clicking "Bug 2a"[/li]
[li]Change the text in the custom field to "first preset"[/li]
[li]Save the preset[/li]
[li]Close the rename dialog
[/li]
[li]Open the rename dialog[/li]
[li]Click Edit to open the script editor[/li]
[li]Copy the following to the bottom of the script:
Function OnGetCustomFields(ByRef getFieldData)
getFieldData.fields.a_custom_field = ""
End Function[/li]
[li]Save the preset with the name "Bug 2b"[/li]
[li]Reopen the preset by double clicking "Bug 2b"[/li]
[li]Change the text in the custom field to "second preset"[/li]
[li]Save the preset[/li]
[li]Close the rename dialog
[/li]
[li]Open the rename dialog[/li]
[li]Double click Bug 2a[/li]
[li]Correct: The custom field says "first preset"[/li]
[li]Close the rename dialog
[/li]
[li]Open the rename dialog[/li]
[li]Double click Bug 2b[/li]
[li]Correct: The custom field says "second preset"[/li]
[li]Close the rename dialog
[/li]
[li]Open the rename dialog[/li]
[li]Double click Bug 2a[/li]
[li]Double click Bug 2b[/li]
[li]Error:The custom field says "first preset"[/li]
[li]Expectation:The custom field should say "second preset"[/li]
[li]Close the rename dialog[/li][/ol]