Here is the script I do use on my DHCP server (DHCP Lease script)
It converts all DHCP lease to static lease and log a message.
# Created Jotne 2019 v1.2
#
# This script converts all DHCP release to static automatically
# It should run on all routerOS version
# Test if this is a Bound session and the lease is a dynamic one. Do not change older reservation
:if (($leaseBound=1) && ([/ip dhcp-server lease find where dynamic mac-address=$leaseActMAC]!="")) do {
# Get the lease number
:local Lease [/ip dhcp-server lease find mac-address=$leaseActMAC]
# Get date and time
:local date [/system clock get date]
:local time [/system clock get time]
# Make the lease static
/ip dhcp-server lease make-static $Lease
# Add date and time as a comment to show when it was seen first time
/ip dhcp-server lease comment comment="$date $time" $Lease
# Send a message to the log
:log info message="script=dhcp_static server=$leaseServerName IP=$leaseActIP MAC=$leaseActMAC"
}