Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Dynamic Query is a query that contains one or more values of certain issue fields in the WHERE clause.

...

  1. Create the necessary custom fields in Jira and remember their IDs. They should be of the form have a customfield_yyyyy format, where yyyyy is a number. 
    To find out a custom field ID:
    1. Go to the Custom Fields section in Jira administration.
    2. Locate your custom field and click Configure from the actions menu on the right.
      You can see your custom field ID as a parameter in the url:
      /secure/admin/ConfigureCustomField!default.jspa?customFieldId=yyyyy.
  2. After you go through the steps from the Configuration page and the data source configuration page, go to Administration > CPRIME PLUGINS CONFIGURATION > Database Custom Field.
  3. Fill in the Sql Query field for the main database custom field (customfield_xxxxx) with a dynamic clause of the following format:
    "WHERE col1={customfield_yyyyy} AND col2={customfield_zzzzz} OR col2={customfield_ttttt}").
  4. Save the configuration.

...

Note

The dynamic query works on an issue when creating, editing the issue or for transition screens. If for the customfield_xxxxx database custom field the dynamic clause is of has the "WHERE col1={customfield_yyyyy} AND col2={customfield_zzzzz}" form format for instance, then when you change the value for customfield_yyyyy or customfield_zzzzz, the value for customField_xxxxx is cleared, and after that you can select a value from a new list of values determined by re-executing the query and taking into account the new values for customfield_yyyyy and customfield_zzzzz.

Building a query using system fields

...

  • Text Field (< 255 characters)
  • User Picker
  • URL Field
  • Free Text Field (unlimited text)
  • Number
  • Select List
  • Radio Buttons (since v. 2.1.13)

Additional custom field

...