Modify

Opened 12 years ago

Closed 12 years ago

#9989 closed defect (worksforme)

Use of default rule

Reported by: wberry@… Owned by: Rob Guttman
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

I want to modify the cc list based on ticket type or component but I'm not sure I understand how to use the entry in the trac.ini file. I've used you example: type.default_value = (pref) cc.default_value = (pref) cc.append = true

If I want to make defect tickets set the cc to test should I do this:

type.default_value = defect cc.default_value = test cc.append = true???

I've tried this and its not working but want to be sure I understand the useage first.

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by Rob Guttman

Status: newassigned

If you want to modify the cc field (or any field) based on another field's value, you will need to use the Set Rule. Your example above for setting the cc field based on ticket type would become:

[ticket-custom]
cc.set_to_myvalue1_when_type = defect
cc.set_to_myvalue2_when_type = test

Note, however, that the Set Rule will not set any value by default if the field already has a value. To overwrite any existing value no matter what, the above would become:

[ticket-custom]
cc.set_to_myvalue1_when_type = defect (overwrite)
cc.set_to_myvalue2_when_type = test (overwrite)

The Set Rule does not do any appending at this time. Please re-open this ticket if this rule does not work for you.

comment:2 Changed 12 years ago by wberry@…

Resolution: worksforme
Status: assignedclosed

Thank you for the explaination. This rule now works correctly, but as you were already expecting it would benefit from the append option. Tickets with a previously populated cc field would probably not want this field overwritten, but appended. I'll open an enhancement ticket for this option.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Rob Guttman.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.