Jira cloud Script runner behaviour js through on Create issue screen Pre populate exisiting custom field drop down (single select value) value based on summary text match when on ticket creation time example code
If summary is HR
Then exisiting custom field drop down value HR value auto populate