Dependencies Between Different Fields of the Same Item (Cascading Fields)
Besides the dependencies between the same field of parent and child items in a tracker, which are controlled using the field's aggregation and distribution rules, Codebeamer also allows to define dependencies between different Choice or Country or Language or Reference fields (of the same item).
Static field value dependencies
For example, the (values of the) Language field of a contact should depend on (the values of the) Country field:
After selecting the Country field from the dropdown list and clicking OK, depends on Country is displayed in Layout and Content of the Language field.
To define the actual or allowed Country or Language field value combinations, click depends on Country under the Layout and Content column on the Configuration page. In the dialog box that opens, you can then define the allowed value combinations for the combined fields by clicking Add static dependency.
For example, English is spoken in any country, the official language in Germany and Austria is German, and in Switzerland the official languages are German, French, and Italian.
If you now create or edit a contact, the available values for language depend on the selected country.
If the field (for example, country), on which the current field's values depend on, contains multiple values, such as Germany and Switzerland, then the allowed values for the dependent field (for example, language) are the common values that are allowed for all of the super values (intersection), that is, English and German.
To allow the union of allowed values select union in the dependency configuration.
Now the allowed values are the union of the values that are allowed for any of the super values. For example, for Germany and Switzerland the allowed language is any language allowed for Germany and Switzerland: English, German, French, and Italian.
Field dependency chains can be of any length, such as, Field C depends on field B, which depends on field A.
On the GUI, dependent or cascading fields must be placed together, in the inverse dependency order: Dependent fields after the fields they depend on.
Reference field value dependencies between work/configuration items
Codebeamer also allows to define dependencies between work or configuration item reference fields, based on relations of the underlying trackers. There are two cases:
• The reference items are in the same tracker and the items are in a parent-child relationship.
• The reference items are in different trackers and there is a relation between the trackers using references fields.
Dependency with parent-child relationship
For example, countries and languages are defined in a tracker in parent- child relationship. The parent items are countries, and the child items are languages, and they are defined in the same tracker. Some example items in this Language Usage tracker are as follows:
Let's choose another tracker in which we can define the country and language choice fields, such as the team tracker. A team has a country and we define allowed languages for the team depending on the country of the team. The country and language fields are choice fields; both refer to items from the Language Usage tracker.
After defining the country and language fields and setting the language field to depend on country, the field configuration looks like this:
Now if we click on the depends on Country link then there is a new selector called Add reference dependencies that add reference dependencies, in addition to the static field value dependency link explained earlier.
This selector lists all source trackers for the Depends On field (in our example, there is only one: Language Usage). If there is only one source tracker, then a dependency for that will be automatically configured.
If you select a source tracker, a new entry will be added to the dependencies:
That new entry allows to select one or more constraints for the dependent field (Language in our example).
These constraints are the defined relations between the selected source tracker of the Depends On field and the possible source trackers of the dependent field (in our example there is only one: Language Usage).
The resulting reference field value dependency reads as:
• If there is a selected Country item of the Language Usage tracker,
• Then only those Language item(s) are the allowed which are the children of the selected Country item, so the allowed values have the selected Country as their parent.
Reference based dependency
In this example the countries and languages are defined in two different trackers and we have a relation via the Subject field from the Language to the Country tracker.
The field configuration of the Subject field in the Language tracker looks like this:
As in the previous example a team will have a country and we define allowed languages for the team depending on the country of the team. We can define the Country and Language choice fields as follows:
The Language field depends on the Country field.
If you look at the (extract of) the Tracker Class Diagram:
You will see that there is a relation between Language and Country via the reference field Subject.
Now if we browse the field configuration of the Team tracker and click the "depends on Country" link of the Language field then there is the Add reference dependency selector in the Field Dependencies dialog.
If you select a source tracker (Country in our example), a new entry will be added to the dependencies:
If there is only one source tracker, then a dependency for that will be automatically configured.
The resulting reference field value dependency reads as:
• If the selected Country is an item of the Country tracker,
• Then only those Language item(s) are the allowed which refer to the selected Country via their Subject reference field.
If there are multiple possible source trackers for the Depends On field, then you should define constraints for each of them.
| This function is available since Codebeamer 10.0 release. |
Hovering over a value while editing the dependent field displays a tooltip containing information about the dependency relations of the selected value.