(Grid Custom Field) Multiple Sales Teams using a Booking Details Custom Field
This document describes how to use a single Grid Custom Field to manage all Booking Details across multiple Sales spaces within the company.
Each booking request is represented by a Jira issue. By using one centralized and maintainable Grid Custom Field with multiple contexts, organizations can standardize booking information while allowing different configurations per context, ensuring data consistency and enabling efficient querying.
You will also learn how to use several features of the TGNG app, such as:
Grid Custom Field
- 1 Introduction
- 2 Prerequisites
- 3 What you will build
- 4 Use Case Flow Diagram
- 5 Use Case Flow
- 5.1 Step 1: Create the Booking Details Grid Custom Field
- 5.2 Step 2: Add the Field to Field Configuration Schemes
- 5.3 Step 3: Configure the Tour Booking Sales Context
- 5.4 Step 4: Configure the Hotel Booking Sales Context
- 5.5 Step 5: Add the Field to Issue Screens
- 5.6 Step 6: Using the Field on Issues
- 5.6.1 Tour Booking Sales
- 5.6.2 Hotel Booking Sales
- 5.7 Step 7: Search Across Booking Issues with JQL
- 6 Error Conditions
- 7 Conclusion
Introduction
This use case shows how a single Grid Custom Field manages booking data across multiple sales teams in Jira Cloud - without duplicating fields or fragmenting configuration.
Each booking request is a Jira issue. The Booking Details grid custom field is shared across projects, but configured independently per project context. The Hotel Booking Sales space captures room types, check-in/out dates, and nightly rates. The Tour Booking Sales space captures passenger types and tour pricing. Both use the same field, centrally maintained.
What this gives you
One field to manage instead of many - updates propagate across all contexts
Consistent, structured booking data on every issue
Cross-project JQL queries, reports, and automation rules against a single field
Context-specific column configurations without field duplication
Prerequisites
User logged into their account, installed Table Grid Next Generation App
User had the Jira administrator permission
User created two Jira spaces: Hotel Booking Sales (HBS) and Tour Booking Sales (TBS)
Two native Jira custom fields added to corresponding spaces: Hotel Code (Type : Single Select List) and Tour Code (Type : Single Select List)
User had a database system such as: MySQL, Postgres, SQL Server, etc.
A data source configured in Table Grid Next Generation pointing to that database - refer to documentation Data sources
What you will build
By the end of this guide, the Booking Details field will behave as follows:
In Tour Booking Sales: users select a passenger type (Adult, Child, Infant) dynamically loaded from the database based on the selected Tour Code, enter a quantity, and see unit price and total price calculated automatically.
In Hotel Booking Sales: users select a room type loaded from the database based on the selected Hotel Code, pick check-in and check-out dates, enter a quantity, and see nights, unit price, and total calculated automatically.
Both configurations share the same custom field and the same data source connection.
Use Case Flow Diagram
Use Case Flow
Step 1: Create the Booking Details Grid Custom Field
In Jira admin settings, go to Work items → Fields
Click Create new field
Set Field type to Grid Field and enter “Booking Details” as the name
Click Create button
Step 2: Add the Field to Field Configuration Schemes
The field must be associated with the field configuration schemes used by both projects before to appear on any screens.
After you click Create button, the Add Booking Details to field configuration schemes will display.
Tick the checkboxes to select the schemes used by HBS and TBS
Click Add to {n} field configuration scheme(s) button
Step 3: Configure the Tour Booking Sales Context
The default context generated by Jira will become the Tour Booking Sales configuration.
3a. Scope the Context to Tour Booking Sales
Click Actions → Contexts and default values on the Booking Details field
Click Edit context on the default context
Set the label to “Configuration Scheme for Tour Booking Sales”
Under Choose applicable issue types, select the issue types used in TBS
Under Choose applicable context, select Tour Booking Sales as the project
Click Modify
3b. Config Grid Columns for Tour Booking
Click Edit custom field config on the Tour Booking Sales context to open grid configuration
Booking Details grid for Tour Booking Sales project will contain these columns:
Column | Type | Source |
|---|---|---|
Passenger Type | Single Select List | Database - filtered by Tour Code |
Quantity | Integer | User input |
Unit Price | Formula | Return from Price attribute of selected Passenger Type |
Total Price | Formula | Return from Quantity and Unit Price |
Please follow the configuration details below to configure the grid columns:
Column | Configuration |
|---|---|
Passenger Type | This column presents a dropdown of passenger types loaded dynamically from the database, filtered by the Tour Code selected on the Jira issue.
Data in table tour_pricing Tour Code is a native Jira custom field. Replace
|
Quantity |
|
Unit Price | This column reads the price attribute from the selected Passenger Type option automatically.
return $(jtype).price;
|
Total Price |
return $(jquantity) * $(jprice);
|
3c. Save the Configuration
Click Save button
Step 4: Configure the Hotel Booking Sales Context
4a. Add a New Context
On the Contexts and default values page for Booking Details, click Add new context
Set the label to “Configuration Scheme for Hotel Booking Sales”
Under Choose applicable issue types, select the issue types used in HBS
Under Choose applicable context, select Hotel Booking Sales
Click Add button
4b. Config Grid Columns for Hotel Booking
Click Edit custom field config on the new Hotel Booking Sales context to open grid configuration
Booking Details grid for Hotel Booking Sales project will contain these columns:
Column | Type | Source |
|---|---|---|
Room Type | Single Select List | Database - filtered by Hotel Code |
Check In | Date | User select form Calendar picker |
Check Out | Date | User select from Calendar picker |
Nighhts | Formula | Return from Check Out and Check In |
Quantity | Integer | User input |
Unit Price | Formula | Return from Price attribute of selected Room Type |
Total Price | Formula | Return from Nights, Quantity and Unit Price |
Please follow the configuration details below to configure the grid columns:
Column Name | Configuration |
|---|---|
Room Type | Options are loaded from the database based on the Hotel Code selected on the issue.
In this example, writer used: “Product Management” for Data Source SQL query: Select room_type, price_per_night from hotel_pricing where hotel_code = {customfield:12896};In Mapping, type “room_type” for label and “price_per_night” for price (because this column represents for Room Type and its price in Database) Data in table hotel_pricing Hotel Code is a native Jira custom field. Replace
|
Check In |
|
Check Out |
|
Nights | This column calculates the number of nights between check-in and check-out automatically.
if (!$(jcheckin) || !$(jcheckout)) return 0;
var checkIn = new Date($(jcheckin));
var checkOut = new Date($(jcheckout));
var diff = (checkOut - checkIn) / 86400000;
if (diff <= 0) return "Invalid";
return diff;
|
Quantity |
|
Unit Price |
|
Total |
|