Process feedback in Jira

With this feature, users are able to provide feedback directly while navigating through the process. The feedback is created as a Jira item and can be triaged, planned, and tracked within Jira. Every generated Jira item contains a link back to the original process element where the feedback was being created, so full traceability of process change requests is assured.

Configuration

For configuration a Jira project is necessary. In Stages changes in config.xml and metamodel are required.

Jira

First of all, create a Jira project where the feedback will be collected. If you want to collect more information than the summary and a description, you have to add custom fields to your Jira project and add them to your Create Issue Screen. To locate the correct fields, use the Jira assistant “Where is my field?” for more info.

To configure Stages, ids of the Jira custom fields are required. There are several ways to find them out in the Jira documentation. The ids consist of the prefix customfield_ and a number e.g. customfield_10101.

Stages will use the Jira REST interface to create the issue. See here for more info.

Stages config.xml

To enable the following configuration section must be added in the conf/config.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<stages-config>
    <!-- Insert this block to your stages config.xml file -->
    <feedback-system name="jira">
        <host url="https://jira.example.com/jira">
            <!-- Credentials for a (technical) user who is allowed to create issues in the Jira project -->
            <property name="user" value="user" />
            <property name="password" value="secret" />
 
            <!-- Define the project where the issue should be created in -->
            <property name="projectKey" value="FEED" />
            <!-- As alternative to the project key you can specify the project by its id -->
            <!-- <property name="projectId" value="1234" /> -->
 
            <!-- Define the name of the issue type that should be created -->
            <property name="issuetypeName" value="Task" />
 
            <!-- The summary field will always be available and is automatically mapped to the Jira "summary" field  -->
 
            <!--
            The user will be asked to enter the following text fields. All text fields are optional.
            - The "ident" must be unique and is used to identify the right translation property.
            - The "type" defines if the field is a multi-line text ("text") or a single line string ("string").
            - The "target" defines the id of the custom field in Jira (e.g. "customfield_10101").
            -->
            <attributes>
                <attribute ident="description" type="text" target="description" />
                <!-- The following fields could be enabled if you want the users to provide more data with every feedback item: -->
                <!--
                <attribute ident="annual_savings" type="string" target="customfield_10100" />
                <attribute ident="priority" type="string" target="customfield_10101" />
                -->
            </attributes>
 
            <!--
            You can map element specify information to your Jira issue. These sources are available:
            - elementUrl e.g. https://stages.example.com/stages/index.html#/workspace/200/_vv/(process/activity/_wUV9sBbNHr-aicWx33VsQA)
            - workspaceName e.g. "Software Engineering"
            - workspacePath e.g. "Company | Software"
            - creatorFullname "John Doe"
            - creatorUsername "jdoe"
            The "target" defines the id for the custom field in Jira (e.g. "customfield_10101").
            -->
            <system-attribute-mappings>
                <attribute source="elementUrl" target="customfield_10104" />
                <attribute source="workspaceName" target="customfield_10105" />
                <attribute source="workspacePath" target="customfield_10106" />
                <attribute source="creatorFullname" target="customfield_10107" />
                <attribute source="creatorUsername" target="customfield_10108" />
            </system-attribute-mappings>
        </host>
    </feedback-system>
</stages-config>

Stages metamodel

The feedback widget must be added to your Stages metamodel. The XML-Element is:

<widget:feedback/>

For adding the widget to the social section, you can adopt it like this:

<widget:definition id="social">
    <layout:tabbed-card id="info">
        <layout:tab id="feedback" translate="process.feedback">
            <widget:feedback/>
        </layout:tab>
        <layout:tab id="comments" translate="process.comments">
            <widget:comments/>
        </layout:tab>
        <layout:tab id="history" translate="process.history">
            <widget:activity-stream translateNone="none" />
        </layout:tab>
    </layout:tabbed-card>
</widget:definition>

Stages language properties

As last step you have to provide translations for the introduced custom fields. The translation property consists of the prefix process.feedback.mapping. and the ident you defined in the config.xml file. For the example the translations are:

process.feedback.mapping.summary = Summary
process.feedback.mapping.description = Description
process.feedback.mapping.annual_savings = Estimated annual savings
process.feedback.mapping.priority = Priority

After all, don't forget to execute update.bat / update.sh and restart your Stages.