Painless fieldtype change of a field. #657
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#657
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
Create a field as text, set a field name, a label and a description.
Decide to change from text to List and all existing fields get reset, field name becomes list, name becomes mylist, description get's emptied.
Expected result
Additional fields to be added such as class=list_class, option=0|Option 1 etc
Actual result
All fields get reset
System information (as much as possible)
Additional comments
Looking at the source, the only reference to mylist which is what the field name gets changed to is in an sql query. It looks like changing the field type just overwrites all of the fields with default one's from the database. Would it be possible to only update fields that haven't been changed?
Sorry that is currently the normal behavior. The way this area works it basically rebuilds the whole sub-from each time you change the field_type.
I can understand that is a pain if you don't know that... and I can understand that it would be great to at least try to carry the current data across. So we could add this to a feature request and start looking at the path.
This is a fully ajax driven area, and yes what we do is absolutely crazy (once you see how it works). But if you know the history of JCB then you will understand why the way I build this area was needed... I tried to keep backward compatibility while moving forward to better GUI.
We are closing this, until we get to code it then we will open this back up.
I added the code to fix this... please test if you can...