Skip to content

Custom Form Fields

Rulebooks can be used to add custom fields to topic forms. Every time a topic is opened, the form renderer engine first checks for the existence of form field rules and executes them.


This only works for topics that have its project field assigned. Otherwise, the custom field system would not know which rulebook to apply from many different projects.

If you need a custom field to be applied globally, the project to which your rulebook belongs must be a global project.

Form field rules

Form field rules are made of a sequence of ops, just like any other rule in Clarive. But instead of executing commands or sending files remotely, form field rules output field definitions called fieldlets.

There are special form field events that we can create rules for.

The following list of events may be different, depending on the profile(s) installed in Clarive SE. In Clarive EE the set of customizable form events may be completely different since new events can be defined at the administrators discretion.

Event Description
any_form adds a field to all forms
form_feature adds a field to feature form types
form_bugfix adds a field to bugfix forms
form_sprint adds a field to sprint forms
form_release adds a field to release forms
form_epic adds a field to sprint forms
form_hotfix adds a field to hotfix forms
form_story adds a field to story forms
form_task adds a field to task forms
form_task_template adds a field to task template
form_[custom_category] adds a field to custom category forms

For example, to add different fields to the bugfix topic form, use the following rulebook structure:

name: my custom fields

   - field_text:
        label: "Estimated duration"
        id: estimated_duration

   - field_text:
        label: "Estimated duration"
        id: estimated_duration

For conciseness, you can group field definitions with the def op.

name: grouped custom fields

       - field_text:
             label: "Estimated duration"
             id: estimated_duration
       - field_date:
             label: "Estimated end-date"
             id: enddate

    - time_management:

    - time_management:

You can even parametrize the fields with variables to make it more adaptable.

name: grouped custom fields

   time_management (show_date):
       - field_text:
             label: "Estimated duration"
             id: estimated_duration
       - if: {{ show_date }}
           - field_date:
                 label: "Estimated end-date"
                 id: enddate

    - time_management:
          show_date: false

    - time_management:
          show_date: true

Available Fieldlets

  • field_text - simple text field

  • field_date - simple date field

  • field_time - simple time field

  • field_textarea - a multiline text field

  • field_richtext - rich HTML-based text editor

  • field_combo - a drop-down combo box with a static list of options

  • field_pills - selectable visual options

  • field_grid - a multi-column table

  • field_upload - an attachment field

Getting the form context

In every form event rule, the following variables are available. These variables are useful in making the fields conditional to things like security or topic situation.

Variable Description
username id of the user opening the topic
category name of the topic category
topic_mid mid of the topic (not available if it's a new topic)
    - if: "{{ ctx.status('name') == 'In Progress' }}"
         - field_text:
              label: Assigned Tester
              id: tester

Common Arguments

Every field_* type op has a set of common arguments that can be used to configure the form field.

Argument Required? Type Default
id required string -
label required string -
colspan optional num (1-12) 12 (max width)
rowspan optional num ( >2 ) (according to field)
default optional any -
required optional bool false
edit optional bool true
view optional bool true
active optional bool true
readonly optional bool false

label (required)

Label is the text that show up next to the field.

id (required)

When the topic data is stored in the database, it's stored with a field id.

Field ids are important as you may want to use them later in other event or pipeline rules to extract configuration data from them.

Field ids have to be all lowercase, start with alpha characters (from a to z) and be followed by any character from alphanumeric characters and underscore.

Example ids:

  • my_field (ok)

  • _my_field (not ok)

  • 2017field (not ok)

  • someField (not ok)


Prefix all your fields with a recognizable identifier so that you can easily remember them while keeping the database organized. Also, use snake notation (underscore separators) for more clarity.

For instance, if your fields were related to work estimates they could be prefixed with the string estimate_, such as estimate_date, estimate_description etc.


Number of columns that the field will occupy in the edit mode, a number from 1 to 12.


Number of rows that the field will occupy in the edit mode, minimum is 2.

The form grid layout manager will try to accomodate the fieldlet within the grid, which also takes into consideration the rows of other fields visible.


Default value for the field.


If a field is required (set to true or to 1, the topic can only be saved if the field has data.


Boolean that determines if the field can be seen in the topic editor panel.

Set edit to false if the field should not be visible in the editor panel. Default is true.


Boolean that determines if the field can be seen in the view panel of the topic (main panel). Default is true.


Boolean that determines if the field can be modified in the edit mode. Default is false, meaning a field can always be modified.

Field ops


This field will create a simple, one line text field.

    - field_text:
        id: next_version
        label: Next Version String


A text field that is multi-line. The text has no formatting. For a formatted text field, use the field_richtext op instead.

Use the rowspan parameter to configure the field height.

    - field_textarea:
          id: test_description
          label: Test Case Description
          rowspan: 8


This opens a rich HTML-based text editor, which supports text and paragraph formatting, visual queues, such as lists and image pasting.

    - field_richtext:
          id: test_description
          label: Test Case Description
          rowspan: 8


A date field which opens a calendar.

    - field_date:
          id: target_date
          label: Target Date


A time field.

    - field_time:
          id: target_date
          label: Select Delivery Time


Pills are option buttons that are highlighted in color and shown as badges.

Pills are great for short selection lists (from 2 to 4) that are also very easy to see and click. Each option should have at least the parameter name: and optionally color:.

    - field_pills:
          id: issue_type
          label: Issue Type
           - name: High
             color: e0a0a0
           - name: Low
             color: a0a0e0


Grids are a multi-column table that holds sub-fields. You can define from one to many columns, but try to limit columns to 4 or 5 max, otherwise it may not fit into users screen properly and may become difficult to read.

    - field_grid:
         label: Testing Issues Detected
         id: testing_issues
             - name: "By Whom"
               type: users
             - name: "Which Project"
               type: projects
             - name: Verified?
               type: checkbox
               default: true
               width: 20
             - name: Verified?
               type: checkbox
             - name: "Problem Type"
               type: combo
               default: "Translations"
                   - Code
                   - Documentation
                   - Translations

Each column accepts these common parameters:

Parameter Description Default
id The column id used to store into the db If no id set, name is converted to id
name The column header text (required)
type Type of field for the column (list of types below) textfield
width The column width in pixels 100
default The default value for the field (none)
sortable If the column is sortable or not true
readonly If the column is readonly false

This is the set of column types to pick from:

Column Type Description Additional Options
textfield single line text none
textarea multi line text none
checkbox A simple checkbox none
combo A simple checkbox options: [ 'column1', 'column2' ]
date A date picker none
projects Drop-down list of all projects in the system none
users Drop-down list of all users in the system none
environments Drop-down list of all environments in the system none

To set a default value to a column field, just add default: to the list of options.

    # ...

    - field_grid:
         label: Testing Issues Detected
         id: testing_issues
             - name: "Issue Type"
               type: combo
               default: "External"
                  - "Internal"
                  - "Documentation"
                  - "External"


This is a drop-down combo with a fixed set of values passed as an array in the parameter options.

To set a default value, use the name of the option.

    - field_combo:
        label: Select Speed
        default: Faster
            - Faster
            - Slower


This field enables users to upload one or more files. Files uploaded are attached to the topic and are stored in the database.

    - field_upload:
        label: Upload Evidence Files
        id: evidence_files

Additional Form Ops

There are also a few additional form ops that allow your rulebook to control existing fields, like removing predefined fields from view or make them readonly.


The remove_fields op will take the selected field out of the edit and view topic panels, so that the field will be invisible for the user.

The remove_fields op accepts an array as argument with the labels (or ids) of the individual fields to be removed.

    - remove_fields:
          - Reviewer


The readonly_fields op will make one or more fields readonly, meaning the user will be able to see it, but not change its value.

The readonly_fields op accepts an array as argument with the labels (or ids) of the individual fields to be changed into readonly mode.

    - readonly_fields:
          - Reviewer
          - Assigned