Limiting Lifecycle Extend Days

We are just starting to use lifecycles with our VM guest systems. When a new system is built, I will give the user 90 days until retirement.

After 60 days, they are getting notifications that their system will expire in 30 days. Using a button with vm_retire_extend_days, they can extend their system for another 60 days. However, there is nothing stopping them from hitting the button to add 60 days on top of 60 days, etc.

How does one limit the button to extend on top of today only and not the current retirement date?

You are already using a Custom Button?

There is a “discovered” attribute, which tells you when the VM was provisioned/discovered. If the user presses the button twice just don’t set the retirement date to more than 150 days