OrgJQL adds
...
Quick Start
...
integrates your org data with Jira so you can create queries using orgOf
and create manager-specific reports and notifications using Rovo.
Expand | ||
---|---|---|
| ||
Quick Start |
Prerequisites
You’ll need a spreadsheet with the following columns:
First column: Jira display names of users (you don’t need a complete org listing – just add the people that are relevant for your queries)
Second column: Manager display name for each user
Step 1: Create a spreadsheet of the users and managers you want to includeIf you don’t have any headings, the first column will be treated as the users and the second column their managers.
If you do use headings, the user heading must be |
...
Step |
...
2: Click on Update Org Data and add org dataClick on the “Update Org Data” card |
...
...
Then click on the “Add Org Data” button: |
...
Copy your |
...
spreadsheet data and paste into the |
...
editor and click “Save” |
...
NOTE: If you paste the column headers, please use user
and manager
.
...
Step 3: Test your dataClick on the “Test Org Data” tab and enter a query using your org data. OrgJQL defines an
Verify the expansion is correct. |
...
Copy your query from Step 2 and run it in Jira’s issue navigator. Verify the results, and you’re ready to go!
...
Step 4: Leave a review
Let us know if you run into any problems or if you’d like to request a feature by visiting the Forthix JSM Portal
Managing Org Data
In this section, we’ll show you how to add and update organizational data for OrgJQL
Update Org Data Tab
This tab lists what data you currently have set up. The default data is what’s used for the orgOf
JQL function. Non-default data can be used when customizing the fx.users
function. See “Customizing JQL Functions” below.
...
Viewing Org Data
You can view the data for an organization by clicking on its name. For instance, clicking on “Engineering” might show the following:
...
Updating Org Data
The format of the organizational data is an array of user/manager pairs. Note that the names are Jira Display names. Also note that, in OrgJQL, arrays use whitespace as separators instead of commas.
An alternative way to updating org data is to copy and paste it from a spreadsheet. In this case, the first column of the spreadsheet should be user names and the second, the corresponding manager:
...
When adding or updating org data, just add the relevant users and managers. While you can add your entire company, you can always start with a smaller, more relevant set of people.
Default Data
The default data set can be set by ensuring the “Default Data” slider is on for the dataset in question:
...
The default data is used for the orgOf
word and for many of the customized JQL functions.
Testing Org Data
To check your default org data, go to the “Test Org Data” tab and enter a query using the orgOf
JQL function:
...
You can check the query by clicking the “View in Jira” link.
Review JQL Executions
Expand | ||||
---|---|---|---|---|
| ||||
Using Rovo to create manager-specific reportsIn OrgJQL, all one-off reports are built for a given “root manager”. This is the top level manager for the report. Every report has an “Org Chart Control” that allows you to drill up and down into the org: When you select a manager, all issues in the report are filtered to that manager. Creating a basic reportTo get to the OrgJQL Assistant, click on “Chat” at the upper right of the window, then on “Browse Agents”, and then select “OrgJQL Assistant”. To create a basic report for a manager (essentially, just the org information) you can enter the following into the Rovo chat:
The OrgJQL Assistant will return a link that shows you the org control for that manager Adding issues to your reportTo add issues to an existing report, type something like:
The OrgJQL Assistant will create a new link to a report using that JQL to pull issues. If there are issues in your report, you’ll see an “Issues Table” bottom in sidebar at the left: Clicking this will display an issues table filtered by the selected manager. The selected manager is shown in purple at the top of the Issue Table: The shortcut for toggling the issue table is: |
Expand | ||
---|---|---|
| ||
Review JQL ExecutionsIn this section, we'll go over how to view and manage OrgJQL executions. These "expansions" are stored by Jira for performance, but they are updated when issues are created or updated or when org data is changed. You can also force update any or all OrgJQL executions here. Background on JQL ExecutionsWhen a JQL function is executed, it expands into a JQL fragment that is substituted into the query. Jira stores these expansions in a pre-computations database to improve performance. The expansions for OrgJQL are listed in the table of the “Review JQL Executions” page. Searching for clausesYou can filter the table by clauses: Refreshing expansionsYou can click on the “Refresh” control for each clause to force update an expansion: When are Precomputations Updated?The following trigger OrgJQL precomputation updates:
The refresh job is asynchronous and runs from a queue, so only one job is ever running at a time. NOTE: Precomputations are only updated if their values have changed. Stopping a Precomputation Refresh JobYou can stop a running precomputation job by clicking “Force Stop”: |
Expand | ||
---|---|---|
| ||
Customize JQL FunctionsIn addition to the built-in |
...
Function, you can create custom JQL functions in Forthic. The following functions can be customized:
|
...
We'll go through both of these functions in this video.
...
BackgroundOrgJQL was written in Forthic, a language developed at LinkedIn to build hundreds of internal Jira-based tools for program and engineering management. Forthic is also the language that allows Forthic in JiraThe editor for customizing OrgJQL functions is actually a Forthic IDE. You can execute words directly within the IDE and see their effect in the developer pane at the bottom of the editor: You can define new words using this pattern:
For instance, we can extract Example: Customize fx.usersGetting all the users that roll up into a managerLet’s start by showing how to get all the users in a manager’s org. This is actually how the NOTE: This assumes you have some org data set up. See “Managing Org Data” for more info. The
A silly example to get all users whose names are more than 12 charactersThis is an example that does something that you can’t do directly in JQL. It’s a silly example, but it illustrates a useful pattern. We’ll use
We could use this in JQL by defining a new word called
We can then save the code and then test the expansion in the “Test Custom JQL Functions” tab: Get the direct reports for a managerWe can use the
In the case of Customizing fx.issuesWe’ll implement a classic JQL function that returns all Epics that have unresolved Stories. We can do this in 10 lines of Forthic:
(Don’t worry about the syntax just yet – we’ll go over each line) Giving it a tryThe word that gives us the incomplete epics is called…
Passing a parameter to a definitionIf we look at the The
Naming convention: prefix definitions with variable namesWhen a definition uses the value of a variable, we prefix its name with the variable’s name. You can see that in Lines 4 through 9 above. Each of those words relies on the value of Line 3: FIELDSThe NOTE: Forthic arrays start with Line 4: project-EPIC-JQLThe This is what it looks like when Line 5: project-EPICSThe Line 6: project-EPIC-KEYS-STRThe
The Line 7: project-STORY-JQLThe This JQL string pulls all of the unresolved stories that are part of the epics of Line 8: project-UNRESOLVED-STORIESThe Line 9: project-EPICS-w/UNRESOLVEDThe |
...
Going FurtherForthic brings new capabilities to Jira. You can essentially develop applications directly within a Jira instance instead of having to go through a long build and deploy cycle. We’ve only touched on what Forthic can do. To learn more, please sign up for Forthic Office Hours or ask us a question at the Forthix JSM portal. References
|
...
Forthic Words
See the references above for more Forthic words. Ones that are useful for OrgJQL are listed in the table below
...
Word
...
Signature
...
Description
...
FULL-ORG
...
(name -- names
)
...
Given the Jira display name of a user, returns all the users that report into that user (including the user themselves)
...
DIRECTS
...
(name -- names)
...
Given the Jira display name of a user, returns all of their direct reports.
...
SELECT
...
(items forthic -- items)
...
Given an array of items and a forthic predicate, returns a list of items for which the predicate is true
...
!
...
(value variable --)
...
Sets the value of variable
to value
...
@
...
(variable -- value )
...
Retrieves the value of a variable
...
REC@
...
(record field -- value)
...
Retrieves the value of a record’s field
...
MAP
...
(items forthic -- items)
...
Expand | ||
---|---|---|
| ||
Managing Org DataIn this section, we’ll show you how to add and update organizational data for OrgJQL Update Org Data TabThis tab lists what data you currently have set up. The default data is what’s used for the Viewing Org DataYou can view the data for an organization by clicking on its name. For instance, clicking on “Engineering” might show the following: Updating Org DataThe format of the organizational data is an array of user/manager pairs. Note that the names are Jira Display names. Also note that, in OrgJQL, arrays use whitespace as separators instead of commas. An alternative way to updating org data is to copy and paste it from a spreadsheet. In this case, the first column of the spreadsheet should be user names and the second, the corresponding manager: When adding or updating org data, just add the relevant users and managers. While you can add your entire company, you can always start with a smaller, more relevant set of people. Default DataThe default data set can be set by ensuring the “Default Data” slider is on for the dataset in question: The default data is used for the Testing Org DataTo check your default org data, go to the “Test Org Data” tab and enter a query using the You can check the query by clicking the “View in Jira” link. |