Hi, I’m working on a proof of concept with the jira:customField module of Forge.
My idea is to render some Select components whose options depend on previous Select components. For instance: select country → select region → select city (values for Select are loaded from an external API Rest). In order to implement that, I’m thinking of two options:
- Create three different jira:customField and when editing dependant Select check the value of previous one in order to load the suitable options (i.e. show only the regions from selected country). For this implementation, I would like to know if it is possible (and how) to access the value of other issue’s fields from within the context of the customField’s code.
- Create just one jira:customField with the three Select in the same React component. In this case I don’t know if it is possible to handle the value of three fields separately (or maybe I should persist just one value with some kind of separator and to populate the three fields from it when rendering the fields, i.e. Spain-Cataluña-Barcelona and them split the value to populate one select with Spain, another one with Cataluña and the last one with Barcelona).
Do you have any advice? Maybe should I use another component from Forge to implement this functionality?
Many thanks!