Static Ip hostname insert into comment

### Static IP - Hostname - Comment / script will take host-name of all static IP's that dont have existing comments, and insert host-name into comment. will not overwrite comments.
:foreach leaseId in=[/ip dhcp-server lease find where !comment && !dynamic] do=[
 :local ip [/ip dhcp-server lease get $leaseId address];
 :local hostname [/ip dhcp-server lease get $leaseId host-name];
 :ip dhcp-server lease set $leaseId comment="$hostname" 
 :log info "set Static IP $ip comment to $hostname"]

Just some comment to your script.
No need for ; after each line. Only when there are multiple commands on same line.
Loops are normally in {}, not []. (I see that it works).
If you go to a location like /ip dhcp-server lease, you can skip the path for the rest of the line where its used.

/ip dhcp-server lease
:foreach leaseId in=[find where !comment && !dynamic] do={
	:local ip [get $leaseId address]
	:local hostname [get $leaseId host-name]
	set $leaseId comment="$hostname" 
	:log info "set Static IP $ip comment to $hostname"
}