Canh, apologies for not responding sooner - been one of those weeks.  There are 
two problems with your config;


1. You can only user lowercase for ini file options - so this rule:

cust_field1.set_to_Yes_when_cust_field2 = Yes

needs to change to:

cust_field1.set_to_yes_when_cust_field2 = yes

That obviously has implications for our custom field option values.  This is a 
limitation in standard ini files and therefore this plugin.  If you can live 
with lowercase "yes" and "no" then proceed to issue #2.  :)


2. You need to append "(overwrite)" to the rule if you want to overwrite 
non-empty values. 

So your overall config should look like this:

[ticket-custom]
cust_field1 = select
cust_field1.label = "Field # 1"
cust_field1.options = yes | no
cust_field1.value = no
cust_field1.set_to_yes_when_cust_field2 = yes (overwrite)
cust_field2 = select
cust_field2.label = "Field # 2"
cust_field2.options = yes|no
cust_field2.value = no


I've tested above and it works for me.

Cheers.
- Rob

PS: Thanks to Reinhard and Ryan for your assistance.


On Jun 15, 2012, at 3:37 PM, RjOllos wrote:

> 
> 
> On Friday, June 15, 2012 9:22:00 AM UTC-7, TRAN, CANH T PW wrote:
> Since the system was deployed in production for some time, renaming the 
> internal field names will affect older tickets saved in trac.db. 
> I prefer not to rename.  If the DynamicFieldsPlugin has parse issue with 
> underscore, I will see if I know how to tweak its source. 
> 
> You could open a ticket (1) for this; Rob is usually very responsive. It 
> would suggest that the issue should at least be documented on the project 
> page, since underscores in trac.ini field names are very common in my 
> experience. 
> 
> -- 
> 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/-/3eyCunpcbDIJ.
> 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.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
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