Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 17, v 18 is for review

In This article describes column values placeholders and how they can be used in the Table Grid Next Generation, you can create dependencies between the grid columns.

code { color: #c7254e; background-color: #f9f2f4; border-radius: 5px; font-weight: bold; padding: 3px 3px; }
Excerpt
hiddentrue

Create dependent columns like cascading select lists in a grid using column values placeholders.

Style


Column values placeholders allow you to create dependencies between the grid columns.

For example, a cascading list that filters column data based on the value from another column. 

...

'{column:<grid_column_identifier>:<option_attribute_key>}'

column grid  - Grid column element that helps to distinguish the column placeholder from the Jira value placeholder.placeholder 

<grid_column_identifier>  — - the identifier of the column which value you want to use in order to filter data. 

<option_attribute_key> — The key of the option attribute.

...

In the examples below, we will show all formulas with the label option attribute, that is used by default in Single Select List and Multi Select List columns. You can replace label with other option attributes.

...

For example, get a value from the column where the identifier is is user

Code Block
{column:user:label}


SQL query with the column value placeholder to get a summary of all issues assigned to the user, selected in the user column 

Code Block
select summary from jiraissue where assignee = ‘{column:user:label}’


Note

Use Be sure to use quotes as in on the example below to get the correct value. 

...

Panel
borderWidth2
titleSimple cascading list

Use case

You have a grid with two select list columns and you want to display options in the second select list depending on the value in the first column.  

You can add dynamic options to your select list and query data from the custom field using Jira values.


Pre-requisites

  • Single select list column User Group with dynamic options populated from the Jira database 
  • Single select list column User with dynamic options populated from the Jira database and filtered by the value selected in the User Group column.


Solution

Filter options in a User column with the help of column value placeholder

  • SQL query to get the list of user groups from the Jira data source

    Code Block
    select group_name from cwd_group


  • SQL query to get the list of users in a certain group. 

    Code Block
    select child_name from cwd_membership where parent_name='{column:group:label}'





Panel
borderWidth2
titleFilter To Do tasks assigned to a specific user from the selected user group

Use case

Filter tasks assigned to a specific user based on the username selected in another grid column.

You have a grid with 3 select lists columns and you want to display options in the User select list depending on the user group selected in the first column. 

Then based on the user selected in User column populate the list of tasks assigned to this user. 


Pre-requisites

  • Single select list column User Group with dynamic options populated from the Jira database 
  • Single select list column User with dynamic options populated from the Jira database and filtered by the value selected in the User Group column.
  • Multi-select column To Do with dynamic options populated from the Jira database and filtered by the value selected in the User column.


Solution

Display tasks assigned to a specific user in a dynamic multi-select list based on the user group.

First, get a list of user groups from the Jira database using dynamic options for the User Group select list 

Code Block
select parent_name from cwd_membership


Second filter Jira users in Users column, based on the value of the User Group column

Code Block
select child_name from cwd_membership where parent_name='{column:group:label}'


Then populate the To Do list with Jira issues' keys using a dynamic multi-select list based on the User value selected in the previous column. 

Code Block
select concat(p.pkey, ‘-’, ji.issuenum) as key from jiraissue ji inner join project p on ji.project = p.id where ji.assignee=‘{column:user:label}’



Note

Cascading list columns use dynamic options that are dependent on each other. In case you need to avoid the dependency combine status and dynamic options.

...