Versions Compared

Key

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


Info

Required apps

  • Power Custom Fields PRO™ or

  • Power Custom Fields

Setting a default value for one custom field without autocomplete is very simple. All you have to do is to select the necessary option(s). For instance, like in the picture below: 

...

For the select custom fields with autocomplete you need to define a label and an option as well, see KPOption details for reference.

You can use following configuration as an example: 

...

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

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

Code Block
{"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"}}
Note

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

See also

...

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Example+5+-+Setting+default+values+for+PCF+-+15482218
widthauto

In this example, we show you how to set a default value for a custom field. To accomplish this, select the necessary options in the Set Custom Field Defaults (see the image below):

image-20240214-172351.pngImage Added

The result is:

image-20240214-172431.pngImage Added

After you complete these steps and when you create a new issue, the default value, or values, are automatically selected.

See More

Child pages (Children Display)
pageExamples for PCF