Custom field object type

We are happy to announce a new Forge custom field data type - object. :partying_face:
It enables developers to create complex custom fields with properties.
For example currency field with properties like currency and amount. :fr: :es: :it: :jp:

Please note that a custom field object type requires formatter, a property that contains a Jira expression that returns a string used to represent the value in places where the rendering function is not supported. For example the column view in the Global Issue Navigator. Formatter works for all custom field data types.

Delivered

  • search inside object in JQL (“Development cost” ~ “USD”)
  • schema JSON schema that is used to validate values stored in the field
  • REST API for dynamic configuration for schema
  • validation support
  • formatter support on pages where the Forge rendering function is not supported

Incoming

  • search for properties in JQL (“Development cost”.currency ~ “USD”)
  • formatter for fields export
  • a possibility to dynamically set the schema in each custom field context
  • example app

Doc and additional information is here.

9 Likes

@JakubMierzewski I have a two questions regarding this:

schema property: Could you clarify what exactly the accepted values are? I gave this a try and I assume it only accepts a subset of the JSON schema spec (only object types?). I have a use case where I would like to accept a distinct number of different object types, hence I have tried to specify conceptually a schema like the following. Unfortunately, when using the field Jira complains that the schema is invalid.

Distinct objects schema (oneOf)
{
    "title": "Data",
    "oneOf":
    [
        {
            "title": "Object Type 1",
            "type": "object",
            "required": [ "type" ],
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "ObjectType1"
                    ]
                },
                //...
            }
        },
        {
            "title": "Object Type 2",
            "type": "object",
            "required": [ "type" ],
            "properties":
                {
                    "type": { "type": "string", "enum": [ "ObjectType2" ] },
                    //...
                }
        }
    ]
}

issue view rendering: Currently the issue view renders the JSON value. I would have expected that without a custom renderer it should at least fall back to the required formatter. Is this the expected behavior?

image

2 Likes

When it comes to issue view rendering: thanks for pointing this out :+1:, we plan to improve in the next incoming version. You are correct that schema property right now supports only simple object schemas. Adding support for composite schemas should be doable. We will look into it. Stay tuned :grinning:

1 Like

Hi @JakubMierzewski,

This is awesome news! Are new components to be used in the CustomField module also coming? Being able to use collections and object type open up new opportunities. Unfortunately as of now, we can only use Avatar, AvatarStack, Code, Image, Text, Tooltip, Tag, TagGroup.

Ideally, I’m rooting for CustomUI support :sweat_smile:

Cheers,

Tom

Hi @TomMoors :wave: Custom UI support for edit custom fields is coming we plan to release it at the end of the first week of August. All work-related to custom fields could be tract on trello When it comes to UI kit what it would be great if you could share your use case and write what you need.

1 Like