Modify

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#8188 closed defect (fixed)

CustomFieldAdmin causes delete of other plugins' settings

Reported by: ralf.wohner@… Owned by: osimons
Priority: high Component: CustomFieldAdminPlugin
Severity: major Keywords:
Cc: Trac Release: 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...).

Thank you in advance,
Ralf

Attachments (0)

Change History (4)

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

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

comment:2 Changed 3 years 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.

comment:3 Changed 3 years ago by ralf.wohner@…

Thanks a lot!

comment:4 Changed 3 years ago by osimons

Your welcome :-)

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from osimons. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.