Hi Team,
I need to implement dependent text fields in Jira using Forge app.
Requirement:
Field 1: Select List (single choice) custom field
Field 2: Select List (single choice) custom field
Expected Behavior:
- If Country = India is selected,State field should show only Indian states
(Maharashtra, Karnataka, Tamil Nadu, Delhi, Gujarat)
- If Country = USA is selected,State field should show only US states
(California, Texas, New York,Florida, Washington)
- Both fields should be separate
- Both values should be saved
on the ticket after creation
Questions:
1. Is this possible using Forge?
2. Which Forge module to use?
3. Any code examples available?
4. Any workarounds if not directly possible?
Thanks,
Lokesh
In Forge you can do this by creating a custom string field (Country) and a read-only string field (State).
In the view mode you can use two labels to show both values: Country will use the saved field value and for State you can retrieve the value using the rest api.
In the edit mode you can render two dropdowns (Country and State) and apply your logic. When submitting you save the State value into the read-only field and submit the Country value.
I have tried this scenario in ScriptGenie (disclaimer: I am the developer).
It is best to raise topics in relation to development of apps in the Developer Community or there might be already answered topics on your question.
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.