Modify

Opened 2 years ago

Closed 2 years ago

#9989 closed defect (worksforme)

Use of default rule

Reported by: wberry@… Owned by: robguttman
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 2 years ago by robguttman

  • Status changed from new to assigned

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 2 years ago by wberry@…

  • Resolution set to worksforme
  • Status changed from assigned to closed

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.

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 robguttman. 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.