[PDI-6532] scratch added
[PDI-6532] fix with unit tests added, [PDI-7241] unavailable option
disabled.