Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.5
-
Component/s: Quality Profile, Web API
-
Labels:None
-
Edition:Community
-
Production Notes:None
Description
How to reproduce
- Create a quality profile A
- Create another quality profile B and set A as parent
- Activate a rule in quality profile A
=> Update date of quality profile B will be updated, but not the update date of quality profile A.
Technical detail
The functional update date of quality profile is stored in RULES_PROFILES#RULES_UPDATED_AT.
This column is updated by org.sonar.server.qualityprofile.RuleActivator#activate, which will have the responsibility to activate rule on every descendant of the quality profile.
The column of the current quality profile is not updated because when reaching org.sonar.server.qualityprofile.RuleActivator#updateProfileDates(DbSession, RuleActivationContext) to update the quality profile, RuleActivationContext#getProfile is set to child quality profile and not to current quality profile.
It seems that the RuleActivationContext#currentProfile is not updated when reaching the quality profile on which a rule was activated.