Opened 3 years ago

Closed 23 months ago

# CustomFieldAdmin causes delete of other plugins' settings

Reported by: Owned by: ralf.wohner@… osimons high CustomFieldAdminPlugin major 0.11

### Description

When you use an other plugin (in my case TracDynamicFields 1.1.0) that has settings in the [ticket-custom] block in combination with CustomFieldAdmin, CFA deletes the settings of the other plugin on edited fields.

Example:

[ticket-custom]
...
myfield = select
myfield.label = Funny Field
myfield.options = n/a|an option|another option
myfield.order = 5
myfield.show_when_type = enhancement
myfield.value = n/a
myfield.clear_on_hide = false
...


and then e.g. I add a third option via CFA, the ini file will read

[ticket-custom]
...
myfield = select
myfield.label = Funny Field
myfield.options = n/a|an option|another option|a third option
myfield.order = 5
myfield.value = n/a
...


i.e. the "show_when_type" and the "clear_on_hide" are deleted.

I hope you can patch CFA so that it leaves unknown lines as they are instead of dropping them out. Currently I had to disable CFA, but our non-bash-admins really miss it :-)

If there is any dirty workaround that allows me to keep these ini entries, that would be welcome, too (maybe I can put my additional keys in an include file? I'll try that...).

Ralf

### comment:1 Changed 2 years ago by ralf.wohner@…

If you are still working on this plugin, I'd still be interested in a solution :)

### comment:2 Changed 23 months ago by osimons

• Resolution set to fixed
• Status changed from new to closed

(In [11150]) CustomFieldAdminPlugin: Don't clear additional options when just modifying the field. With tests. Closes #8188.

Thanks a lot!

### comment:4 Changed 23 months ago by osimons

BTW, forgot to add the new file with tests - added in [11152]. They should verify your use-case.

### Modify Ticket

Change Properties