Search Inside Feature Files
Several attributes of a Feature as well as its text become searchable using JQL. Being able to search for attributes can be particularly useful for improving your Sprint and Backlog Jira boards.
Search for Feature Text
The name of the field that you need to use is 'Feature.content'. Navigate to the Search for Issues page and use the '~' (tilde) character to search for the required text.
Depending on your preferences menu options the Feature panel might be loaded in Gherkin Text Editor mode rather than Example Mapping, so you will see textual representation rather like below.
Search for issues with Features
Query below can be used to find all Jira issues where the Feature panel has at least some text
Feature.content IS NOT EMPTY
Search for Feature Attributes
The following list of attributes are searchable with JQL:
Feature.userStories
Type - Number
Description: how many User Stories the Feature contains. A User Story in this case means that there are 3 common keywords: ‘As a', ‘I want to’ and ‘So that’ after the Feature keyword and there is some text after each of these keywords. 'In order to’ keyword can be used instead of ‘So that’.
Feature.questions
Type - Number
Description: total number of questions the Feature contains. Questions are comment lines prefixed with “Q:“ keyword, see more in Questions & Answers.
Feature.unansweredQuestions
Type - Number
Description: total number of unanswered questions, i.e. those that do not have the 'A:' keyword on line below, see more in Questions & Answers.
Feature.rules
Type - Number
Description: total number of Rules the Feature contains. There needs to be some text after the Rule keyword in order for the Rule to count towards this number.
Feature.leastScenariosInRule
Type - Number
Description: lowest number of Scenarios contained in any Rule inside the overall Feature
Feature.mostScenariosInRule
Type - Number
Description: highest number of Scenarios contained in any Rule inside the overall Feature
Feature.scenarios
Type - Number
Description: total number of Scenarios the Feature contains. All valid scenario keywords are taken into account i.e. Scenario, Example, Scenario Outline or Scenario Template.
Feature.leastStepsInScenario
Type - Number
Description: lowest number of Steps contained in any of the Scenarios inside the overall Feature
Feature.mostStepsInScenario
Type - Number
Description: highest number of Steps contained in any of the Scenarios inside the overall Feature
Feature.warnings
Type - Number
Description: total number of warnings the Feature contains according to the syntax of Gherkin
Feature.errors
Type - Number
Description: total number of errors the Feature contains according to the syntax of Gherkin
Feature.lines
Type - Number
Description: total lines in a Feature
Feature.lastUpdatedDate
Type - Date
Description: the time and date the last time the Feature was updated by any user
Feature.lastUpdatedBy
Type - User
Description: the user who last updated the Feature
Feature.updatedBy
Type - User
Description: any user that made at least one update to the Feature
Built-in Editor Search
When in Gherkin Text Editor mode use the toolbar button highlighted below to open the built-in search pop up box in the top right of the editor. Type a search phrase and press the Enter key - match results will get highlighted in yellow.
Folded sections are also searched
Using built-in search is superior to using the standard browser find functionally in that it also searches in lines that are currently folded