Whenever we clone issue , we want only specific fields to be copied to it.
Is it possible using listener or any other solution can be done.
Please provide sample script.
The idea behind a clone is to be an almost identical copy. That's what cloning is about. :D
If you need something more specific I recommend working with Automations for Jira. Create an Automation that is triggered by manual Trigger and have it create a new issues as action. Have it copy the desired fields from the initial issue in a branched action.
I don't think this can be solved easily with listeners in Jira Server and Data Center. This might need custom development or another Marketplace App working with listeners.
My choice is creating an Automation.