On Wednesday, May 9, 2012 8:13:31 AM UTC-7, Reinhard Wobst wrote:
>
> I made some experiments with the DynamicFieldsPlugin 
> (http://trac-hacks.org/wiki/DynamicFieldsPlugin) and noticed that the 
> 0.12 branch did not work with Trac 0.12. However, Google found some 
> Twitter message that this branch has some problems and we should use 
> the 
> 0.11 plugin version. Really, it runs. 
>
>
You were looking too hard. The issue is stated at the top of the project 
page ;)
http://trac-hacks.org/wiki/DynamicFieldsPlugin#Dynamicallyhidedefaultcopyclearvalidatesetticketfields

However, I observed a strange behaviour. I created some custom fields 
> X1, X2 etc. and configured like 
>
> X1.show_when_type = task 
>
> This worked as promised (i.e., the X* fields are shown only when the 
> ticket type is "task"), but when I changed the ticket type to e.g. 
> "enhanced", the change log claimed "X1 deleted, X2 deleted" etc. 
> Indeed, 
> when I changed the ticket type back to "task", the values were lost 
> though the field forms were displayed again, the fields were blank. 
>

Assuming I'm following you correctly, the behavior seems correct and 
desirable (at least in the most general sense). If you hide X1 for ticket 
type enhancement, then you want it's field to be empty and not based on 
whatever the user input before they changed the ticket type. It seems like 
it would be difficult and overly complicated to save and restore the value 
for X1 in case that the user changes the type from task -> enhancement -> 
task.

What may be desireable though, is behavior similar to the 
TracTicketTemplatePlugin. If you enter some text in the Description field 
and then change the ticket type, it will warn you that your edits will be 
lost.

http://trac-hacks.org/wiki/TracTicketTemplatePlugin

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/trac-users/-/RT99idst870J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to