Preserve field names for unchanged blocks during schema regeneration (#SKY-7434) (#4535)
This commit is contained in:
@@ -8,6 +8,9 @@ Given a list of input_text, upload_file and select_option actions with their int
|
||||
3. If multiple actions use the same text value, they should map to the same field name
|
||||
4. Field names should be concise but clear about what data they represent
|
||||
5. Avoid generic names like "field1", "input1" - use meaningful names based on the intention
|
||||
{% if has_existing_fields %}
|
||||
6. CRITICAL: Some actions have existing field names that MUST be preserved exactly as specified. These field names are used by cached code and changing them will break the workflow. You MUST use the exact existing field name for these actions.
|
||||
{% endif %}
|
||||
|
||||
## Actions:
|
||||
{% for action in custom_field_actions %}
|
||||
@@ -15,6 +18,8 @@ Action {{ loop.index }}:
|
||||
- Action type: "{{ action.action_type }}"
|
||||
- Value: "{{ action.value }}"
|
||||
- Intention: "{{ action.intention }}"
|
||||
{% if action.existing_field_name %}- EXISTING FIELD NAME (MUST PRESERVE): "{{ action.existing_field_name }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
## Expected Output:
|
||||
@@ -32,7 +37,7 @@ Return a JSON object with the following structure:
|
||||
"description": "Description of what this field represents"
|
||||
},
|
||||
"field_name_2": {
|
||||
"type": "str",
|
||||
"type": "str",
|
||||
"description": "Description of what this field represents"
|
||||
},
|
||||
...
|
||||
@@ -44,5 +49,7 @@ Where:
|
||||
- `field_mappings` maps each action index (1-based) to its corresponding field name
|
||||
- `schema_fields` defines each unique field with its type and description
|
||||
- Actions with the same text value should map to the same field name
|
||||
{% if has_existing_fields %}- Actions with an existing field name MUST use that exact field name in both `field_mappings` and `schema_fields`
|
||||
{% endif %}
|
||||
|
||||
Generate the field names now:
|
||||
|
||||
Reference in New Issue
Block a user