[Trunk | Monitor Service]:
CategoryController.java & SubCategoryController.java & TopicController.java: In "onUpdateDefaultTopic()" method, when "name" is changed, update also "alias" according to default profile.
This commit is contained in:
parent
78913b0140
commit
30a58da9b1
|
@ -161,6 +161,7 @@ public class CategoryController {
|
||||||
&& (oldCategory.getName() == null || oldCategory.getName().equals(categoryBasedOnDefault.getName()))) {
|
&& (oldCategory.getName() == null || oldCategory.getName().equals(categoryBasedOnDefault.getName()))) {
|
||||||
|
|
||||||
categoryBasedOnDefault.setName(category.getName());
|
categoryBasedOnDefault.setName(category.getName());
|
||||||
|
categoryBasedOnDefault.setAlias(category.getAlias());
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
if(category.getDescription() != null && !category.getDescription().equals(categoryBasedOnDefault.getDescription())
|
if(category.getDescription() != null && !category.getDescription().equals(categoryBasedOnDefault.getDescription())
|
||||||
|
|
|
@ -165,6 +165,7 @@ public class SubCategoryController {
|
||||||
&& (oldSubcategory.getName() == null || oldSubcategory.getName().equals(subCategoryBasedOnDefault.getName()))) {
|
&& (oldSubcategory.getName() == null || oldSubcategory.getName().equals(subCategoryBasedOnDefault.getName()))) {
|
||||||
|
|
||||||
subCategoryBasedOnDefault.setName(subCategory.getName());
|
subCategoryBasedOnDefault.setName(subCategory.getName());
|
||||||
|
subCategoryBasedOnDefault.setAlias(subCategory.getAlias());
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
if(subCategory.getDescription() != null && !subCategory.getDescription().equals(subCategoryBasedOnDefault.getDescription())
|
if(subCategory.getDescription() != null && !subCategory.getDescription().equals(subCategoryBasedOnDefault.getDescription())
|
||||||
|
|
|
@ -135,6 +135,7 @@ public class TopicController {
|
||||||
&& (oldTopic.getName() == null || oldTopic.getName().equals(topicBasedOnDefault.getName()))) {
|
&& (oldTopic.getName() == null || oldTopic.getName().equals(topicBasedOnDefault.getName()))) {
|
||||||
|
|
||||||
topicBasedOnDefault.setName(topic.getName());
|
topicBasedOnDefault.setName(topic.getName());
|
||||||
|
topicBasedOnDefault.setAlias(topic.getAlias());
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
if(topic.getDescription() != null && !topic.getDescription().equals(topicBasedOnDefault.getDescription())
|
if(topic.getDescription() != null && !topic.getDescription().equals(topicBasedOnDefault.getDescription())
|
||||||
|
|
Loading…
Reference in New Issue