(Grid Custom Field) Multiple Sales Teams using a Booking Details Custom Field

(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:

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

  1. In Jira admin settings, go to Work items → Fields

image-20260212-020004.png
  1. Click Create new field

image-20260212-020232.png
  1. Set Field type to Grid Field and enter “Booking Details” as the name

image-20260304-033645.png
  1. Click Create button

image-20260304-033749.png

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.

  1. Tick the checkboxes to select the schemes used by HBS and TBS

  2. Click Add to {n} field configuration scheme(s) button

image-20260225-020353.png

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

  1. Click Actions → Contexts and default values on the Booking Details field

image-20260212-021253.png
  1. Click Edit context on the default context

image-20260212-021403.png
  1. Set the label to “Configuration Scheme for Tour Booking Sales”

  2. Under Choose applicable issue types, select the issue types used in TBS

  3. Under Choose applicable context, select Tour Booking Sales as the project

  4. Click Modify

image-20260212-023059.png

3b. Config Grid Columns for Tour Booking

  1. Click Edit custom field config on the Tour Booking Sales context to open grid configuration

image-20260212-022840.png
image-20260212-030254.png

Booking Details grid for Tour Booking Sales project will contain these columns:

Column

Type

Source

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

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.

  1. Click Add new column

  2. Set Column type to Singe Select List

  3. Set Identifier to jtype

  4. Set Title to Passenger Type

image-20260212-165004.png
  1. In Option attributes, click the + button and add Price attribute

image-20260212-165101.png
  1. In Dynamic options, choose Data Source and type SQL query

    In this example, writer used:

    • Product Management” for Data Source

    • SQL query:

      select passenger_type, price from tour_pricing where tour_code={customfield:12858};
    image-20260212-165253.png

    In Mapping, type “passenger_type” for label and “price” for price (because thess columns represent for Passenger Type and Price in Database)

Data in table tour_pricing

image-20260212-040653.png

Tour Code is a native Jira custom field. Replace 12858 with the actual custom field ID of your Tour Code field. Find this on the Fields page.

image-20260212-034530.png
  1. Click to save the dynamic options

  2. Click Add button to save the column information

Quantity

  1. Click Add new column

  2. Set Column type to Integer

  3. Set Identifier to jquantity

  4. Set Title to Quantity

  5. Click Add button

image-20260212-165709.png

Unit Price

This column reads the price attribute from the selected Passenger Type option automatically.

  1. Click Add new column

  2. Set Column type to Formula

  3. Set Identifier to jprice

  4. Set Title to Unit price

image-20260212-165838.png
  1. Enter this formula expression:

return $(jtype).price;
  1. Click Add button

Total Price

  1. Click Add new column

  2. Set Column type to Formula

  3. Set Identifier to jtotal

  4. Set Title to Total Price

  5. Enable Index data to make this column searchable via JQL

image-20260304-035135.png
  1. Enter this formula expression:

return $(jquantity) * $(jprice);
image-20260212-165926.png
  1. Scroll to Aggregation operation and select Sum

image-20260304-035335.png
  1. Click Add button

3c. Save the Configuration

Click Save button

image-20260212-170647.png

Step 4: Configure the Hotel Booking Sales Context

4a. Add a New Context

  1. On the Contexts and default values page for Booking Details, click Add new context

image-20260212-040743.png
  1. Set the label to “Configuration Scheme for Hotel Booking Sales”

  2. Under Choose applicable issue types, select the issue types used in HBS

  3. Under Choose applicable context, select Hotel Booking Sales

  4. Click Add button

image-20260212-041830.png

4b. Config Grid Columns for Hotel Booking

  1. Click Edit custom field config on the new Hotel Booking Sales context to open grid configuration

image-20260304-045756.png
image-20260304-050006.png

Booking Details grid for Hotel Booking Sales project will contain these columns:

Column

Type

Source

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

Column Name

Configuration

Room Type

Options are loaded from the database based on the Hotel Code selected on the issue.

  1. Click Add new column

  2. Set Column type to Single Select List

  3. Set Identifier to jtype

  4. Set Title to Room Type

image-20260212-085845.png
  1. Add a price option attribute

image-20260212-091826.png
  1. In Dynamic options, choose Data Source and type SQL query

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

image-20260212-085635.png

Hotel Code is a native Jira custom field. Replace 12896 with the actual custom field ID of your Tour Code field. Find this on the Fields page.

image-20260212-085807.png
  1. Click to save the dynamic options

  2. Save dynamic options and click Add button

Check In

  1. Click Add new column

  2. Set Column type to Date, Identifier to jcheckin, Title to Check In

  3. Click Add button

image-20260212-090207.png

Check Out

  1. Click Add new column

  2. Set Column type to Date, Identifier to jcheckout, Title to Check Out

  3. Click Add button

image-20260212-090340.png

Nights

This column calculates the number of nights between check-in and check-out automatically.

  1. Click Add new column

  2. Set Column type to Formula, Identifier to jnights, Title to Nights

image-20260213-044926.png
  1. Enter this formula:

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;
image-20260213-045645.png
  1. Click Add button

Quantity

  1. Click Add new column

  2. Set Column type to Integer, Identifier to jquantity, Title to Quantity

  3. Click Add button

image-20260212-091211.png

Unit Price

  1. Click Add new column

  2. Set Column type to Formula, Identifier to jprice, Title to Unit Price

image-20260212-091406.png
  1. In Formula expression, fill in the formula using JavaScript

    In this example, writer used:

    return $(jtype).price;
    image-20260212-092117.png
  2. Click Add button

Total

  1. Click Add new column

  2. Set Column type to Formula, Identifier to jtotal, Title to Total

  3. Enable Index data

image-20260212-092301.png
  1. In Formula expression, fill in the formula using JavaScript

    In this example, writer used:

    return $(jnights) * $(jquantity) * $(jprice);
    image-20260212-092445.png

    In Aggregation operation, click to show the dropdown list and select Sum option: