If the embedded suite of attributes for issues, tasks, requirements, and other artifacts is not sufficient for maintenance of the project, you can add your own required attributes.
The full list of custom attributes can be found in dictionary “Attributes" in the project settings. You can also create attributes for an arbitrary entity, or for the subset of this entity, e.g., only for requirements of the given type.
When creating a new attribute, you must specify entity and type of this attribute, enter its name, specify a default value and other attributes that affect its rendering in the input forms. When the attribute is saved, you can immediately proceed to its use. The new attribute is displayed in the forms, and is available for selection in filters, groupings, lists, and boards.
An attribute with “WYSIWYG editor” type allows to form the description of issues, tasks, and any other objects in system using different options of text formatting, as well as lists, tables, and images which are displayed directly in the text. You can select the type of used WYSIWYG editor in the common project settings.
This type of custom attribute is designed for visualization of steps (micro tasks) which are to be done within the execution of a source task.
This type of field can also be used to control the execution of important actions that are necessary for proper task resolution. For example, in Scrum, it can be “Definition of Done” by tasks: “wrote tests”, “checked all”, “updated localization”. In other techniques, you can encounter term “Quality Gates” - these are the quality criteria which can ensure the proper task resolution. You can designate this field as necessary, then transition from one state to another becomes possible only when all tick marks in the checklist field are explicitly set.
You can insert a specific text in field "Default value” that will dynamically load an arbitrary system report parametrized by data of the current project artifact. Using this mechanism, you can, for example, display any report in "Issues" form, e.g., workloads by tasks or related issues, etc.
To do this, switch to the source mode and insert the following HTML code:
<div alm-widget-module="activitiesreport" alm-widget-parms="start=last-month&group=Owner.A&project=all&ids={Связанные заявки.ИД}">Загрузка...</div>
alm-widget-module attribute contains the code name of report, and alm-widget-parms attribute contains its additional attributes. A placeholder of {Related requests.ИД} type is substituted by the specific values similarly to rules for calculated fields.
Links allow to create relationships between entities. Such relationships were not provided by the system initially, but they are required for project management.
In field "Back link" you can specify the name of link for an entity to which the link is created. That allows to display link from both sides - from the side of entity for which the link is created, as well as from the side of entity to which the link is created. Thus, you can implement a two-way association between two entities.
In "Restriction” field, you can specify a search query that will be used to filter out available values for selection.
You can create fields based on calculated attributes which allow to retrieve field values stored in the linked entities. For example, you want to display an estimation of workloads defined for requirements that detail the given function in the function tree.
To do this, create a custom attribute, and specify a path to the required value in its calculation formula:
Then you can enable display of this field in the function tree and see the total estimation by all requirements of the function:
Calculated fields are constructed using simple syntax: you can use any characters, as well as placeholders surrounded by curly braces. Path to the required attribute is specified in curly braces. If an attribute is a link to the entity, you can refer to the attributes of this entity using a dot symbol. For example, a requirement has an attribute “Type” which represents a link to type “Requirement type”. If we want to calculate the brief name of requirement type, we can simply write {Requirement type.Brief name}. You can refer to the entity attributes recursively, e.g, you can calculate an issue attribute called {Requirements.Functions.Importance}. To know the name of attribute or link, you can open the entity card, select the required field, and use it in your expression.
If a formula of the calculated field assumes working on the collection (i.e., it can return several values or links), you can filter this collection using a Query language syntax. For example, you can use the following formula to display only scenarios in the initial state rather than to display all test scenarios related with the requirement:
{TestScenario?State = "submitted"}
In the following example, you can calculate planned workloads only for the completed tasks:
{Tasks?State = "resolved"?.Planned}
To calculate mathematical expression, you must specify an equal sign in the formula text, and write a mathematical expression using attributes of entity or entities linked with it, e.g.,
={Оценка} * 1000 + 20
In other cases, you can use custom field of string type and script automation to set up validation script which can implement any algorithm to calculate the field value.
For example, to calculate the value of attribute (c1) based on the other attributes (a1 и b1), enter the following script on "Validation" tab:
$it->object->getRegistry()->Store( $it, ['c1' => $it->get('a1') + $it->get('b1')] ); return true;
In this example, we execute a low-level operation to modify the value of attribute c1 when any attribute on the entity card is changed.
If the calculation algorithm uses data stored in other system objects, you must implement a more complex script executed by schedule. For example,
// получим объект типа "Компонент" $object = getFactory()->getObject('Component'); // пройдем по всем компонентам с типом "Сущность" и обновим атрибут c1 foreach( getFactory()->getByQuery($component, 'Type = "Сущность"') as $it ) { getFactory()->modifyEntity($it, ['c1' => $it->get('a1') + $it->get('b1')] ); }
To use the described functionality, you must have a license for module "Script automation" and set up the permissions for this module. To monitor results of script execution, use PHP scripts module in the administrative section.
You can develop a PHP script that verifies correctness of values in the given field depending on any required conditions. If the condition is met, script must return true, else it returns false. When the artifact card is saved, or when the value of this custom field is changed, system executes the script and checks the condition. Depending on the execution result, an operation is treated as successful, otherwise system notifies about the violation of validation condition for the field.
You can use the described functionality if you have license for module "Script automation" and set up permissions for this module. To monitor results of script execution, use PHP scripts module in the administrative section.