Skip to end of banner
Go to start of banner

Example 5 - Setting default values for Power Custom Fields PRO fields

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Setting a default value for one custom field without autocomplete (checkbox, radio buttons, single or multi select)  is very simple. All you have to do is to check/select the desired option(s).

You can see this in the picture below: 

 

Setting the values for the select custom fields with autocomplete is not that easy, as the options are of type KPOption, so they need to have defined a label and an options.

You can use following configuration for such field: 

In the example above, custom field is rendered as an issue picker and the value is the id of the issue you want to select.

After the value is set to default, the configuration is updated according to the renderer. You can see example below:

{"option":{"label":"","value":"10000"},"meta":{"longLabel":"TST-1 - update the documentation","tooltip":"update the documentation","shortLabel":"TST-1","iconUrl":"/secure/viewavatar?size=xsmall&avatarId=10310&avatarType=issuetype","href":"http://localhost:8070/browse/TST-1","labelOverride":"TST-1"}}

If you want to set multiple values to a field, the values should be separated with #|# separator. Example: {"label":"","value":"10000"}#|#{"label":"","value":"10001"}

  • No labels