used_profile="[false]"/>
<!-- java -->
- <active_rules id="1" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="1" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<!-- php -->
- <active_rules id="2" profile_id="3" rule_id="100" failure_level="4" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="3" rule_id="100" failure_level="4" inheritance="[null]"/>
</dataset>
*/
public class DatabaseVersion implements BatchComponent, ServerComponent {
- public static final int LAST_VERSION = 535;
+ public static final int LAST_VERSION = 536;
public static enum Status {
UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('533');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('534');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('535');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('536');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
"PROFILE_ID" INTEGER NOT NULL,
"RULE_ID" INTEGER NOT NULL,
"FAILURE_LEVEL" INTEGER NOT NULL,
- "INHERITANCE" VARCHAR(10),
- "NOTE_CREATED_AT" TIMESTAMP,
- "NOTE_UPDATED_AT" TIMESTAMP,
- "NOTE_USER_LOGIN" VARCHAR(40),
- "NOTE_DATA" CLOB(2147483647)
+ "INHERITANCE" VARCHAR(10)
);
CREATE TABLE "NOTIFICATIONS" (
a.rule_id as ruleId,
a.failure_level as severity,
a.inheritance as inheritance,
- a.note_data as noteData,
- a.note_user_login as noteUserLogin,
- a.note_updated_at as noteUpdatedAt,
- a.note_created_at as noteCreatedAt,
active_rule_parent.id as parentId
</sql>
</sql>
<insert id="insert" parameterType="ActiveRule" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
- INSERT INTO active_rules (profile_id, rule_id, failure_level, inheritance, note_created_at, note_updated_at, note_user_login, note_data)
- VALUES (#{profileId}, #{ruleId}, #{severity}, #{inheritance}, #{noteCreatedAt}, #{noteUpdatedAt}, #{noteUserLogin}, #{noteData})
+ INSERT INTO active_rules (profile_id, rule_id, failure_level, inheritance)
+ VALUES (#{profileId}, #{ruleId}, #{severity}, #{inheritance})
</insert>
<update id="update" parameterType="ActiveRule">
profile_id=#{profileId},
rule_id=#{ruleId},
failure_level=#{severity},
- inheritance=#{inheritance},
- note_created_at=#{noteCreatedAt},
- note_updated_at=#{noteUpdatedAt},
- note_user_login=#{noteUserLogin},
- note_data=#{noteData}
+ inheritance=#{inheritance}
WHERE id=#{id}
</update>
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.rule.Severity;
-import org.sonar.api.utils.DateUtils;
import org.sonar.core.persistence.AbstractDaoTestCase;
import java.util.List;
.setProfileId(1)
.setRuleId(10)
.setSeverity(Severity.BLOCKER)
- .setInheritance(null)
- .setNoteData("text");
+ .setInheritance(null);
dao.update(dto);
assertThat(result.getRulId()).isEqualTo(10);
assertThat(result.getSeverityString()).isEqualTo(Severity.MAJOR);
assertThat(result.getInheritance()).isEqualTo("INHERITED");
- assertThat(result.getNoteData()).isEqualTo("some note");
- assertThat(result.getNoteUserLogin()).isEqualTo("henry");
- assertThat(result.getNoteCreatedAt()).isEqualTo(DateUtils.parseDate("2013-12-18"));
- assertThat(result.getNoteUpdatedAt()).isEqualTo(DateUtils.parseDate("2013-12-18"));
}
@Test
assertThat(result.getRulId()).isEqualTo(10);
assertThat(result.getSeverityString()).isEqualTo(Severity.MAJOR);
assertThat(result.getInheritance()).isEqualTo("INHERITED");
- assertThat(result.getNoteData()).isEqualTo("some note");
- assertThat(result.getNoteUserLogin()).isEqualTo("henry");
- assertThat(result.getNoteCreatedAt()).isEqualTo(DateUtils.parseDate("2013-12-18"));
- assertThat(result.getNoteUpdatedAt()).isEqualTo(DateUtils.parseDate("2013-12-18"));
}
@Test
assertThat(dao.selectAllParams()).hasSize(3);
}
- private ActiveRuleDto find(final Integer id, List<ActiveRuleDto> dtos){
- return Iterables.find(dtos, new Predicate<ActiveRuleDto>(){
+ private ActiveRuleDto find(final Integer id, List<ActiveRuleDto> dtos) {
+ return Iterables.find(dtos, new Predicate<ActiveRuleDto>() {
@Override
public boolean apply(ActiveRuleDto input) {
return input.getId().equals(id);
<dataset>
<!--<active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>-->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!--<active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>-->
<!--<active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>-->
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <!--<active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>-->
+ <!--<active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>-->
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
<!--<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>-->
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
<!--<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>-->
<!--<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>-->
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="4" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="text"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="4" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
</dataset>
import org.apache.commons.lang.builder.ToStringBuilder;
import org.sonar.api.profiles.RulesProfile;
+import javax.annotation.CheckForNull;
import javax.persistence.*;
import java.util.ArrayList;
@Column(name = "inheritance", updatable = true, nullable = true)
private String inheritance;
- @Lob
- @Column(name = "note_data", updatable = true, nullable = true)
- private String noteData;
-
- @Column(name = "note_user_login", updatable = true, nullable = true)
- private String noteUserLogin;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "note_created_at", updatable = true, nullable = true)
- private Date noteCreatedAt;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "note_updated_at", updatable = true, nullable = true)
- private Date noteUpdatedAt;
-
/**
* @deprecated visibility should be reduced to protected or package
*/
/**
* @since 4.2
+ * @deprecated in 4.4. Feature dropped.
*/
+ @CheckForNull
+ @Deprecated
public String getNoteData() {
- return noteData;
+ return null;
}
/**
* @since 4.2
+ * @deprecated in 4.4. Feature dropped.
*/
+ @CheckForNull
+ @Deprecated
public String getNoteUserLogin() {
- return noteUserLogin;
+ return null;
}
/**
* @since 4.2
+ * @deprecated in 4.4. Feature dropped.
*/
+ @CheckForNull
+ @Deprecated
public Date getNoteCreatedAt() {
- return noteCreatedAt;
+ return null;
}
/**
* @since 4.2
+ * @deprecated in 4.4. Feature dropped.
*/
+ @CheckForNull
+ @Deprecated
public Date getNoteUpdatedAt() {
- return noteUpdatedAt;
+ return null;
}
@Override
public static final String FIELD_ACTIVE_RULE_PARENT_ID = "activeRuleParentId";
public static final String FIELD_PARAMS = "params";
- public static final String FIELD_NOTE = "note";
- public static final String FIELD_NOTE_DATA = "data";
- public static final String FIELD_NOTE_USER_LOGIN = "userLogin";
- public static final String FIELD_NOTE_CREATED_AT = "createdAt";
- public static final String FIELD_NOTE_UPDATED_AT = "updatedAt";
-
public static final String FIELD_PARAM_KEY = "key";
public static final String FIELD_PARAM_VALUE = "value";
.field(ActiveRuleDocument.FIELD_SEVERITY, activeRule.getSeverityString())
.field(ActiveRuleDocument.FIELD_PROFILE_ID, activeRule.getProfileId())
.field(ActiveRuleDocument.FIELD_INHERITANCE, activeRule.getInheritance());
- if (activeRule.getNoteData() != null || activeRule.getNoteUserLogin() != null) {
- document.startObject(RuleDocument.FIELD_NOTE)
- .field(ActiveRuleDocument.FIELD_NOTE_DATA, activeRule.getNoteData())
- .field(ActiveRuleDocument.FIELD_NOTE_USER_LOGIN, activeRule.getNoteUserLogin())
- .field(ActiveRuleDocument.FIELD_NOTE_CREATED_AT, activeRule.getNoteCreatedAt())
- .field(ActiveRuleDocument.FIELD_NOTE_UPDATED_AT, activeRule.getNoteUpdatedAt())
- .endObject();
- }
if (!params.isEmpty()) {
document.startArray(ActiveRuleDocument.FIELD_PARAMS);
for (ActiveRuleParamDto param : params) {
}
}
- public void updateActiveRuleNote(int activeRuleId, String note, UserSession userSession) {
- validatePermission(userSession);
- SqlSession session = myBatis.openSession(false);
-
- try {
- ActiveRuleDto activeRule = findActiveRuleNotNull(activeRuleId, session);
- String sanitizedNote = Strings.emptyToNull(note);
- if (sanitizedNote != null) {
- Date now = new Date(system.now());
- if (activeRule.getNoteData() == null) {
- activeRule.setNoteCreatedAt(now);
- activeRule.setNoteUserLogin(userSession.login());
- }
- activeRule.setNoteUpdatedAt(now);
- activeRule.setNoteData(note);
- activeRuleDao.update(activeRule, session);
- session.commit();
-
- reindexActiveRule(activeRule, session);
- }
- } finally {
- MyBatis.closeQuietly(session);
- }
- }
-
- public void deleteActiveRuleNote(int activeRuleId, UserSession userSession) {
- validatePermission(userSession);
-
- SqlSession session = myBatis.openSession(false);
- try {
- ActiveRuleDto activeRule = findActiveRuleNotNull(activeRuleId, session);
-
- activeRule.setNoteData(null);
- activeRule.setNoteUserLogin(null);
- activeRule.setNoteCreatedAt(null);
- activeRule.setNoteUpdatedAt(null);
- activeRuleDao.update(activeRule);
- session.commit();
-
- reindexActiveRule(activeRule, session);
- } finally {
- MyBatis.closeQuietly(session);
- }
- }
-
private void notifyParamsDeleted(ActiveRuleDto activeRule, List<ActiveRuleParamDto> params, SqlSession session, UserSession userSession) {
ProfilesManager.RuleInheritanceActions actions = new ProfilesManager.RuleInheritanceActions();
for (ActiveRuleParamDto activeRuleParam : params) {
private final Integer activeRuleParentId;
private final String severity;
private final String inheritance;
- private final RuleNote activeRuleNote;
private final List<QProfileRuleParam> params;
// TODO move this in a parser class
activeRuleId = null;
severity = (String) ruleSource.get(ActiveRuleDocument.FIELD_SEVERITY);
inheritance = null;
- activeRuleNote = null;
activeRuleParentId = null;
} else {
activeRuleId = (Integer) activeRuleSource.get(ActiveRuleDocument.FIELD_ID);
severity = (String) activeRuleSource.get(ActiveRuleDocument.FIELD_SEVERITY);
inheritance = (String) activeRuleSource.get(ActiveRuleDocument.FIELD_INHERITANCE);
activeRuleParentId = (Integer) activeRuleSource.get(ActiveRuleDocument.FIELD_ACTIVE_RULE_PARENT_ID);
-
- if (activeRuleSource.containsKey(ActiveRuleDocument.FIELD_NOTE)) {
- Map<String, Object> ruleNoteDocument = (Map<String, Object>) activeRuleSource.get(ActiveRuleDocument.FIELD_NOTE);
- activeRuleNote = new RuleNote(
- (String) ruleNoteDocument.get(ActiveRuleDocument.FIELD_NOTE_DATA),
- (String) ruleNoteDocument.get(ActiveRuleDocument.FIELD_NOTE_USER_LOGIN),
- RuleDocumentParser.parseOptionalDate(ActiveRuleDocument.FIELD_NOTE_CREATED_AT, ruleNoteDocument),
- RuleDocumentParser.parseOptionalDate(ActiveRuleDocument.FIELD_NOTE_UPDATED_AT, ruleNoteDocument)
- );
- } else {
- activeRuleNote = null;
- }
}
params = Lists.newArrayList();
return params;
}
- @CheckForNull
- public RuleNote activeRuleNote() {
- return activeRuleNote;
- }
-
@Override
public String toString() {
return new ReflectionToStringBuilder(this).toString();
activeRuleOperations.revertActiveRule(activeRuleId, UserSession.get());
}
- public void updateActiveRuleNote(int activeRuleId, String note) {
- activeRuleOperations.updateActiveRuleNote(activeRuleId, note, UserSession.get());
- }
-
- public void deleteActiveRuleNote(int activeRuleId) {
- activeRuleOperations.deleteActiveRuleNote(activeRuleId, UserSession.get());
- }
-
@CheckForNull
public QProfileRule parentProfileRule(QProfileRule rule) {
return rules.findParentProfileRule(rule);
render :partial => 'rule_note', :locals => {:rule => rule}
end
-
- def update_active_rule_note
- verify_post_request
- require_parameters :active_rule_id, :note
-
- rule = nil
- call_backend do
- Internal.quality_profiles.updateActiveRuleNote(params[:active_rule_id].to_i, params[:note])
- rule = Internal.quality_profiles.findByActiveRuleId(params[:active_rule_id].to_i)
- end
- render :partial => 'active_rule_note', :locals => {:rule => rule}
- end
-
-
- def delete_active_rule_note
- verify_post_request
- require_parameters :active_rule_id
-
- rule = nil
- call_backend do
- Internal.quality_profiles.deleteActiveRuleNote(params[:active_rule_id].to_i)
- rule = Internal.quality_profiles.findByActiveRuleId(params[:active_rule_id].to_i)
- end
- render :partial => 'active_rule_note', :locals => {:rule => rule}
- end
-
def show_select_tags
rule = Internal.quality_profiles.findByRule(params[:rule_id].to_i)
tags = tag_selection_for_rule(rule)
+++ /dev/null
-<% #locals = rule, profile
- note = rule.activeRuleNote
- active_note_detail_div_id = "and_" + rule.activeRuleId.to_s
- add_active_note_button_id = "aanb_" + rule.activeRuleId.to_s
- edit_active_note_link_id = "eanl_" + rule.activeRuleId.to_s
- delete_active_note_link_id = "danl_" + rule.activeRuleId.to_s
- active_note_form_div_id = "anf_" + rule.activeRuleId.to_s
- active_note_textarea_id = "ant_" + rule.activeRuleId.to_s
- submit_active_note_update_button_id = "sanub_" + rule.activeRuleId.to_s
-%>
-
-<div id="<%= active_note_detail_div_id -%>">
- <% if !note.nil? %>
- <blockquote class="spacer-bottom">
- <cite>
- <b><%= User.find_active_by_login(note.userLogin).name -%></b> (<%= distance_of_time_in_words_to_now(Time.at(note.updatedAt.time/1000)) -%>)
- <% if profiles_administrator? %>
- |
- <a href="#" id="<%= edit_active_note_link_id -%>" class="link-action"
- onclick="$j('#<%= active_note_detail_div_id -%>').hide();$j('#<%= active_note_form_div_id -%>').show();$j('#<%= active_note_textarea_id -%>').focus();return false;"><%= message('edit') %></a>
-
- <a class="link-action"
- onclick="if(confirm('<%= escape_javascript(message('rules_configuration.confirm_delete_note')) -%>')){
- $j.ajax({
- url: '<%=ApplicationController.root_context-%>/rules_configuration/delete_active_rule_note?active_rule_id=<%=rule.activeRuleId-%>',
- type: 'post',
- success:function(response){$j('#active_rule_note_<%= rule.activeRuleId -%>').html(response);}
- });};return false;"
- href="#!"><%=message('delete')-%></a>
- <% end %>
- </cite>
- <p><%= html_text(note.data) -%></p>
- </blockquote>
- <% elsif profiles_administrator? %>
- <a href="#" onclick="$j('#<%= active_note_form_div_id -%>').show();$j('#<%= active_note_detail_div_id -%>').hide();$j('#<%= active_note_textarea_id -%>').focus(); return false;"
- class="link-action spacer-right" id="<%= add_active_note_button_id -%>"><%= message('rules_configuration.add_note') -%></a>
- <% end %>
-</div>
-
-<% if profiles_administrator? %>
- <form onsubmit="$j.ajax({
- url:'<%= ApplicationController.root_context -%>/rules_configuration/update_active_rule_note?active_rule_id=<%=rule.activeRuleId-%>',
- data: $j(this).serialize(),
- type:'post',
- success:function(response){$j('#active_rule_note_<%= rule.activeRuleId -%>').html(response);}
- });
- return false;"
- method="post"
- action="<%= ApplicationController.root_context -%>/rules_configuration//update_active_rule_note?active_rule_id=<%=rule.activeRuleId-%>">
- <table id="<%= active_note_form_div_id -%>" style="display: none" class="admin table width100">
- <tbody>
- <tr>
- <td class="width100" colspan="2">
- <textarea name="note" id="<%= active_note_textarea_id -%>" rows="10" style="width:100%"
- onkeyup="if (this.value=='') $j('#<%= submit_active_note_update_button_id -%>').prop('disabled', true); else $j('#<%= submit_active_note_update_button_id -%>').prop('disabled', false);"><%= h(plain_text(note.data)) unless note.nil? -%></textarea>
- </td>
- </tr>
- <tr>
- <td>
- <input type="submit" value="<%= note ? message('update_verb') : message('rules_configuration.add_note') -%>" name="submit-active-note" id="<%= submit_active_note_update_button_id -%>" disabled="disabled"/>
- <a href="#" onclick="$j('#<%= active_note_detail_div_id -%>').show();$j('#<%= active_note_form_div_id -%>').hide();return false;"><%= message('cancel') %></a>
- </td>
- <td align="right">
- <%= render :partial => 'markdown/tips' -%>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
-<% end %>
</table>
<% end %>
- <% if is_activated %>
- <div id="active_rule_note_<%= rule.activeRuleId -%>">
- <%= render :partial => 'active_rule_note', :locals => {:rule => rule} %>
- </div>
- <% end %>
-
<% if profiles_administrator? %>
<% if rule.template? %>
<%= link_to message('rules_configuration.copy_rule'), {:action => 'new', :id => profile.id, :rule_id => rule.id}, :id => "copy-#{u rule_key(rule)}", :class => 'link-action spacer-right' %>
--- /dev/null
+#
+# SonarQube, open source software quality management tool.
+# Copyright (C) 2008-2014 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# SonarQube is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# SonarQube is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+#
+# SonarQube 4.4
+# SONAR-5064
+#
+class RemoveActiveRuleNotes < ActiveRecord::Migration
+
+ def self.up
+ remove_column('active_rules', 'note_created_at')
+ remove_column('active_rules', 'note_updated_at')
+ remove_column('active_rules', 'note_user_login')
+ remove_column('active_rules', 'note_data')
+ end
+
+end
verifyZeroInteractions(profilesManager);
verifyZeroInteractions(esActiveRule);
}
-
- @Test
- public void update_active_rule_note_when_no_existing_note() throws Exception {
- ActiveRuleDto activeRule = new ActiveRuleDto().setId(5).setProfileId(1).setRuleId(10).setSeverity(Severity.MINOR).setNoteCreatedAt(null).setNoteData(null);
- when(activeRuleDao.selectById(5, session)).thenReturn(activeRule);
-
- List<ActiveRuleParamDto> activeRuleParams = newArrayList(new ActiveRuleParamDto());
- when(activeRuleDao.selectParamsByActiveRuleId(eq(5), eq(session))).thenReturn(activeRuleParams);
-
- long now = System.currentTimeMillis();
- doReturn(now).when(system).now();
-
- operations.updateActiveRuleNote(5, "My note", authorizedUserSession);
-
- ArgumentCaptor<ActiveRuleDto> argumentCaptor = ArgumentCaptor.forClass(ActiveRuleDto.class);
- verify(activeRuleDao).update(argumentCaptor.capture(), eq(session));
- assertThat(argumentCaptor.getValue().getNoteData()).isEqualTo("My note");
- assertThat(argumentCaptor.getValue().getNoteUserLogin()).isEqualTo("nicolas");
- assertThat(argumentCaptor.getValue().getNoteCreatedAt().getTime()).isEqualTo(now);
- assertThat(argumentCaptor.getValue().getNoteUpdatedAt().getTime()).isEqualTo(now);
-
- verify(session).commit();
- verify(esActiveRule).save(eq(activeRule), eq(activeRuleParams));
- }
-
- @Test
- public void not_update_rule_note_when_empty_note() throws Exception {
- ActiveRuleDto activeRule = new ActiveRuleDto().setId(5).setProfileId(1).setRuleId(10).setSeverity(Severity.MINOR).setNoteCreatedAt(null).setNoteData(null);
- when(activeRuleDao.selectById(5, session)).thenReturn(activeRule);
-
- operations.updateActiveRuleNote(5, "", authorizedUserSession);
-
- verify(activeRuleDao, never()).update(any(ActiveRuleDto.class), eq(session));
- verify(session, never()).commit();
- verifyZeroInteractions(esActiveRule);
- }
-
- @Test
- public void update_active_rule_note_when_already_note() throws Exception {
- Date createdAt = DateUtils.parseDate("2013-12-20");
- ActiveRuleDto activeRule = new ActiveRuleDto().setId(5).setProfileId(1).setRuleId(10).setSeverity(Severity.MINOR)
- .setNoteCreatedAt(createdAt).setNoteData("My previous note").setNoteUserLogin("nicolas");
- when(activeRuleDao.selectById(5, session)).thenReturn(activeRule);
-
- List<ActiveRuleParamDto> activeRuleParams = newArrayList(new ActiveRuleParamDto());
- when(activeRuleDao.selectParamsByActiveRuleId(eq(5), eq(session))).thenReturn(activeRuleParams);
-
- long now = System.currentTimeMillis();
- doReturn(now).when(system).now();
-
- operations.updateActiveRuleNote(5, "My new note", MockUserSession.create().setLogin("guy").setName("Guy").setGlobalPermissions(GlobalPermissions.QUALITY_PROFILE_ADMIN));
-
- ArgumentCaptor<ActiveRuleDto> argumentCaptor = ArgumentCaptor.forClass(ActiveRuleDto.class);
- verify(activeRuleDao).update(argumentCaptor.capture(), eq(session));
- assertThat(argumentCaptor.getValue().getNoteData()).isEqualTo("My new note");
- assertThat(argumentCaptor.getValue().getNoteUserLogin()).isEqualTo("nicolas");
- assertThat(argumentCaptor.getValue().getNoteCreatedAt()).isEqualTo(createdAt);
- assertThat(argumentCaptor.getValue().getNoteUpdatedAt().getTime()).isEqualTo(now);
-
- verify(session).commit();
- verify(esActiveRule).save(eq(activeRule), eq(activeRuleParams));
- }
-
- @Test
- public void delete_active_rule_note() throws Exception {
- Date createdAt = DateUtils.parseDate("2013-12-20");
- ActiveRuleDto activeRule = new ActiveRuleDto().setId(5).setProfileId(1).setRuleId(10).setSeverity(Severity.MINOR)
- .setNoteData("My note").setNoteUserLogin("nicolas").setNoteCreatedAt(createdAt).setNoteUpdatedAt(createdAt);
- when(activeRuleDao.selectById(5, session)).thenReturn(activeRule);
-
- List<ActiveRuleParamDto> activeRuleParams = newArrayList(new ActiveRuleParamDto());
- when(activeRuleDao.selectParamsByActiveRuleId(eq(5), eq(session))).thenReturn(activeRuleParams);
-
- long now = System.currentTimeMillis();
- doReturn(now).when(system).now();
-
- operations.deleteActiveRuleNote(5, authorizedUserSession);
-
- ArgumentCaptor<ActiveRuleDto> argumentCaptor = ArgumentCaptor.forClass(ActiveRuleDto.class);
- verify(activeRuleDao).update(argumentCaptor.capture());
- assertThat(argumentCaptor.getValue().getNoteData()).isNull();
- assertThat(argumentCaptor.getValue().getNoteUserLogin()).isNull();
- assertThat(argumentCaptor.getValue().getNoteCreatedAt()).isNull();
- assertThat(argumentCaptor.getValue().getNoteUpdatedAt()).isNull();
-
- verify(session).commit();
- verify(esActiveRule).save(eq(activeRule), eq(activeRuleParams));
- }
-
}
verify(activeRuleOperations).revertActiveRule(eq(50), any(UserSession.class));
}
- @Test
- public void create_active_rule_note() throws Exception {
- qProfiles.updateActiveRuleNote(50, "My note");
- verify(activeRuleOperations).updateActiveRuleNote(eq(50), eq("My note"), any(UserSession.class));
- }
-
- @Test
- public void delete_active_rule_note() throws Exception {
- qProfiles.deleteActiveRuleNote(50);
- verify(activeRuleOperations).deleteActiveRuleNote(eq(50), any(UserSession.class));
- }
-
@Test
public void count_active_rules() throws Exception {
qProfiles.countActiveRules(10);
<rules_profiles id="2" version="2" used_profile="false" name="child" language="java" parent_name="parent" />
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="param1" value="30"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED" />
<active_rule_parameters id="2" active_rule_id="2" rules_parameter_id="1" rules_parameter_key="param1" value="30"/>
</dataset>
<rules_profiles id="3" version="2" used_profile="false" name="child" language="java" parent_name="new_parent" />
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="2" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="2" profile_id="2" rule_id="2" failure_level="2" inheritance="[null]" />
- <active_rules id="4" profile_id="3" rule_id="2" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="4" profile_id="3" rule_id="2" failure_level="2" inheritance="INHERITED" />
</dataset>
<rules_profiles id="2" version="2" used_profile="false" name="child" language="java" parent_name="parent" />
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
</dataset>
<rules_profiles id="2" version="1" used_profile="true" name="child" language="java" parent_name="parent" />
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="[null]"/>
</dataset>
<rules_profiles id="2" version="2" used_profile="false" name="child" language="java" parent_name="[null]" />
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
</dataset>
<rules_profiles id="2" version="2" used_profile="false" name="child" language="java" parent_name="parent" />
- <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="1" profile_id="1" rule_id="1" failure_level="2" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="2" profile_id="2" rule_id="1" failure_level="2" inheritance="INHERITED"/>
</dataset>
<active_rule_changes id="1" username="[null]" profile_id="1" profile_version="2" rule_id="1" enabled="false" old_severity="2" new_severity="[null]"/>
<active_rule_changes id="2" username="[null]" profile_id="2" profile_version="2" rule_id="1" enabled="false" old_severity="2" new_severity="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="2" failure_level="2" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]" />
+ <active_rules id="3" profile_id="2" rule_id="2" failure_level="2" inheritance="[null]"/>
</dataset>
<dataset>
<!--<active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>-->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]" />
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!--<active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>-->
<!--<active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>-->
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
<!--<active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"-->
- <!--note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>-->
</dataset>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
<!--<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>-->
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
<!--<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>-->
<!--<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>-->
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="[null]"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
</dataset>
<dataset>
<rules_parameters id="1" rule_id="10" name="max" param_type="INTEGER" default_value="30" description="My Parameter"/>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<rules tags="[null]" system_tags="[null]" id="10" plugin_rule_key="Parent1" plugin_name="checkstyle" name="Parent Rule 1" description="Parent Rule 1" status="READY"
plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
<rules tags="[null]" system_tags="[null]" id="11" plugin_rule_key="Parent2" plugin_name="checkstyle" name="Parent Rule 2" description="Parent Rule 2" status="READY"
plugin_config_key="Parent1" priority="2" cardinality="SINGLE" language="golo" created_at="1981-10-24 15:20:00" />
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="some note"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="2" inheritance="INHERITED"/>
<!-- Parent of Active rule 1 -->
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
<active_rule_parameters id="1" active_rule_id="1" rules_parameter_id="1" rules_parameter_key="max" value="20"/>
<active_rule_parameters id="2" active_rule_id="1" rules_parameter_id="2" rules_parameter_key="format" value="html"/>
<dataset>
- <active_rules id="1" profile_id="1" rule_id="10" failure_level="4" inheritance="[null]"
- note_created_at="[null]" note_updated_at="[null]" note_user_login="[null]" note_data="text"/>
+ <active_rules id="1" profile_id="1" rule_id="10" failure_level="4" inheritance="[null]"/>
- <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="john" note_data="other note"/>
+ <active_rules id="2" profile_id="2" rule_id="10" failure_level="0" inheritance="[null]"/>
- <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"
- note_created_at="2013-12-18" note_updated_at="2013-12-18" note_user_login="henry" note_data="other note"/>
+ <active_rules id="3" profile_id="2" rule_id="11" failure_level="1" inheritance="[null]"/>
</dataset>