Shared Fields
|
This topic describes the reuse of shared fields. To know more about administering the shared fields, see Shared Fields.
|
Shared fields are globally-defined field types that you can use to group different fields from different trackers. Shared fields can be used to refer to all those fields in a report.
When creating or editing a field you can add one or more shared fields to it. You can select only the shared fields that have the same type as the field itself.
One restriction is that a shared field can be used only once in a tracker (that is only for one tracker field).
|
Shared fields are only supported for custom fields. Currently, there is no connection with built-in fields and custom field business logic.
|
In the field list, you can easily check the fields that have shared fields by hovering over Shared Fields.
You can use shared fields in report criteria. You can add a shared field just like any normal field. For example:
This example matches all items for which a field has the textType as shared fields and it is not empty. You toned not add the individual trackers to the report filters.
Using Shared Field names in calculated fields
You can use the name of shared fields where unified expression language is used.
• In field configuration of trackers:
◦ Hide if.
◦ Mandatory if.
◦ Computed as.
• In conditions of State Transitions.
To use the names of the shared fields, write the following expression in your calculation: sharedField("shared_field_name", TrackerItem(this, or detectedIn[0])) -
The above expression matches the field of the selected tracker item, for which the name of the shared field is set to "shared_field_name".
Example expressions:
• sharedField("text_shared_field", detectedIn[0])
• sharedField("integer_shared_field", this) > 5
| If the name of the shared field changes, the expressions referring the field are automatically updated. Shared field name can be modified only if the shared field is not used in any tracker. |
Creating Shared Fields Codebeamer 21.09 and earlier
In Codebeamer versions 21.09 and earlier, the Manage Shared Fields link can be used to create new Shared Fields.
>
Codebeamer 22.04
Since Codebeamer 22.04 , the Create shared field link is added to New custom field... window, to let users create new Shared Fields without leaving the configuration page.
The Field Type is automatically populated based on the Type field's value. Once all the relevant details are added and saved, the new Shared Field appears in the Shared Field drop-down list.
Displaying Shared Fields while filtering on one or more Trackers
Since Codebeamer 22.04. release, the filtering drop-down list for Shared Fields on the UI has been refined.
The way Shared Fields are displayed in the filtering drop-down list (Reports, Trackers) is different when filtering on a single tracker than filtering on multiple trackers, to make filtering more clear-cut and user-friendly.
1. Filtering on a single Tracker
When filtering on a single Tracker (e.g. in Table View), the Shared Fields are not shown in a separate section of the filtering drop-down list, since those are identical with the fields of the Tracker.
The connected Shared Fields are displayed in parenthesis after the name of the relevant (custom) fields.
2. Filtering on multiple Trackers
By filtering on multiple Trackers (e.g. in Reports), the connected Shared Fields are:
◦ Displayed in a separate section of the filtering drop-down list, as before.
◦ Are also shown in parenthesis after the name of the relevant (custom) fields.