I have a custom listener script on ScriptRunner (for Jira Server version 8.13.8) that basically listens for issuetype "A" and whenever its checkbox custom field gets selected, it then clones issue "A" and creates a new issuetype "B" with a few other custom fields pre-filled.
Script works fine, except now issue "B" also clones the created date from issue "A". So it looks like "B" was created months ago when really it was created today, and we query based on created dates.
Cloning on the issue's view screen (More > Clone) doesn't reflect this problem, it's only when the listener script triggers, using the event Issue Created and Issue Updated. On my script, it also has the ImportUtils set reindex in place.
What do I need to add to my current script so that created date (and possible update date) doesn't get copied over?