Downhole valves are widely used in well systems to control flows of well fluid through wellbores. However, several factors such as scale buildup, erosion or corrosion in wells may deteriorate valves and affect valve performance. For example, moving parts of a valve may become hard to move or non-movable if the valve remains at the same position for a long period of time. Therefore, maintenance operations such as valve repair or replacement are needed to prevent valve failures and extend lifetime. Manually scheduling maintenance operations by an operator can be inefficient and ineffective, especially if downhole valve conditions are unknown or there are a large number of valves in a well system.