General settings for generic fields

 

For the Generic (editable) field, the following settings are available:

SQL Database Source

Change which data source the field is using. A data source should be preconfigured prior to using this menu. Once configured the data source will be displayed as an option selectable in the SQL Database Source setting.

For more information about settings data sources see https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15486115

In addition to those, you can use any JNDI identifier that was internally configured in Jira, but this will have to be manually filled in.

Auto search triggers the search to occur automatically as soon as the user opens the Search dialog using the values that are already on the field.

Hide Column Labels

If you don’t want the column labels to be visible when rendering the field, make sure to check this toggle. Here is an example of how the field is displayed in Jira so you get a better idea of what it does:

Use Auto-Bind

If you configure your field to depend on another field(s), setting this flag will allow you to intercept changes in that other field and to trigger the recalculation of the values of your field each time the fields it depends on changes.

However, this may not be what you want. A better control of the field may be achieved via the Live Fields feature of Power Scripts https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15488008

Refresh type

The Advanced Database Row Field has the option to refresh the data from the source database. This means that if the data is updated in the database it can also be changed in Jira, if that is the desired behavior. Or, it can be set to never update the data in Jira once the options are established from the database. The available options are:

NEVER - The data in Jira will never update even if the source data in the database is changed.

ALWAYS - The data in Jira will always update. This means that when the custom field is viewed it will query the database every time in order to retrieve the most recent values. This operation can be expensive to your system performance and should only be used if the data can change multiple times in a given day.

EXPIRES - The data in Jira will only be updated once a specified amount of time has occurred. So, for example, if a value of “1w” was entered into the setting the data in Jira would refresh its values from the database once a week. Any value can be used as long as it is in the standard Jira time interval format. This is a much less expensive operation then using the ALWAYS setting if set reasonably (12 hours or 1 day would be a examples of reasonable expiration times).

Security Type

Actions

The Security Type setting controls what actions a user is allowed to perform on a field. The available actions are:

Set - Users are allowed to search and set a value for the field in Jira. If this option is allowed, a specific icon will be available in the field’s Actions panel:

In the subsequent dialog, you will be able to search for values by triggering the https://appfire.atlassian.net/wiki/spaces/PSJ/pages/543031310/Configuring+scripts+for+generic+fields#SEARCH script and, if any search result is selected, it will trigger the script.

Insert - User can enter a new value in Jira and the data will be added into the connected database table. If this option is allowed, a specific icon will be available in the field’s Actions panel:

Finalizing this action will trigger the script.

Update - Users can change the value of the data in Jira and the value will be updated in the connected database table. If this option is allowed, a specific icon will be available in the field’s Action panel:

Finalizing this action will trigger the script.

Delete - Users can remove the data item from Jira and the data will be removed from the connected database table. If this option is allowed, a specific icon will be available in the field’s Action panel:

Finalizing this action will trigger the script.

Security Settings

These actions can be controlled using different settings, the available settings are:

ALLOW ALL - Any user can perform any database actions (set, insert, update, delete).

DENY ALL - No users are allowed to perform all database actions (set, insert, update, delete).

FIXED - Each action can be set independently.

DYNAMIC - A script can be used to determine if specific permissions are given. The scripts can take a variety of inputs from issue or Jira environment so the script can accommodate many special conditions. See Writing Security Scripts for more information.