No Code Attached Yet
avatar keep
keep
5 Nov 2024

Steps to reproduce the issue

  • Create a custom field of type "List"
  • Add some options to this list field (e.g., option name 'joomla').
  • Assign this list field with the selected option to an article, saving it so it stores in #__fields_values.
  • Edit the custom field, rename the existing option (e.g., change 'joomla' to 'Joomla!'), and save the changes.

Expected result

The renamed option ('Joomla!') should update for all articles that were previously assigned the original option ('joomla') in #__fields_values.

Actual result

The rename action updates the field itself, but the original assignment in #__fields_values is removed, causing the field to lose its value in the article.

Additional comments

Option modification could be quite common, for instance, when fixing typos, updating names after marriage, or making other adjustments. This issue could impact data consistency, as existing assignments of the modified field value are lost from #__fields_values, which can lead to unintended data removal in articles that depend on these custom fields.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar keep keep - open - 5 Nov 2024
avatar keep keep - change - 5 Nov 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 Nov 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Nov 2024
avatar brianteeman
brianteeman - comment - 5 Nov 2024

This issue could impact data consistency, as existing assignments of the modified field value are lost from #__fields_values, which can lead to unintended data removal in articles that depend on these custom fields.

That is exactly why it works the way that it does. Imagine completing a form that has a field "no you cannot have my money" and someone changes the field to "yes I owe you a million"

avatar keep
keep - comment - 5 Nov 2024

I can understand that, but what if we encounter this scenario:

A news page has multiple editors, and the articles can have several list-type attributes, such as contributors, sources, illustrators, supporters, etc. These are stored as field values.

An editor adds a new value to the "illustrator" field: Jonh Doe, and assigns it to many articles. A few days later, another editor notices the typo—it should be John Doe, not Jonh Doe. What options does he have? Should he add a new option, check all articles (we have over 5,200) to find those with "Jonh Doe" and change it? I think the editor would prefer to simply correct the existing one.

Currently, if he changes the field option, it causes data loss without any notification.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44411.

avatar brianteeman
brianteeman - comment - 5 Nov 2024

If you can think of a way to address both scenarios then a solution might be able to be provided. Currently I cant think of one

Add a Comment

Login with GitHub to post a comment