Greetings,
To use Google places API on CREATE and EDIT screens in Jira Cloud, I need to insert a script onto the page - as per Google Guidelines:
The Places service is a self-contained library, separate from the main Maps JavaScript API code. To use the functionality contained within this library, you must first load it using the
libraries
parameter in the Maps API bootstrap URL:
<script async
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY**&libraries=places** &callback=initMap">
</script>
I have a custom field defined in my manifest.yml as:
jira:customFieldType:
- key: customfield-key
name: Name of Field
description: Description of Field
type: string
function: renderField
This is a very basic example, but the custom field returns something like:
return (
<>
<CustomField>
<Text content={`${fieldValue}`}/>
</CustomField>
<script async
src="https://maps.googleapis.com/maps/api/js?key=abc123&libraries=places&callback=initMap">
</script>
</>
);
but when the field is rendered, it gives this error:
TypeError: Cannot convert a Symbol value to a string
Is there a proper way to add this Google script to a custom field in Jira Cloud / Forge / React?
Thank You