Hi, everyone. I want to develop an Asset Picker but I have no idea about how to realize it.
Before Effort:
I tried to extend SelectCFType but it can just support String instead of insight object.
And I wanted to use AbstractSingleFieldType<ObjectBean>, but then I found it cannot show on the create portal and it'll be set to Hidden fields with preset value by default.
Here's my goal like below.
Any advice will be appreciated greatly. Thanks in advance!
Hi @Wenjing Liu
Insight already provides an object picker field. Why don't you use it and try to implement a new customfield?
Thank you very much! But I was sorry that I didn't find this, could you please specify it? Thanks for your advice very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There should be Assets Object customfield. See this Article.
If this is Data Center, it might be seen as Insight Object/s. You can configure the IQL filter to restrict selectable assets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much! That is very convenient for me. Best wishes for you and it's so kind of you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By the way, I'm curious about how jira realize this asset field, and I want to make a similar one for other uses but I can't find its source code. Do you have some ideas? Any advice will be greatly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case you are aiming to develop an Asset Picker for Jira, my first advice would be to see if you can make do with the Assets Object custom field that comes out-of-the-box. It gives you an object picker and can be customized with an IQL filter to narrow down the assets that users can pick. Developing a custom field might not be necessary here.
In case a completely different kind of picker is required, it might be worth checking Jira's Forge custom field implementation and developing a custom experience using either UI Kit or Custom UI. It all depends on your setup - Jira Cloud or Data Center and the way in which you want to store the selected asset data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.