diff --git a/grade/edit/tree/category.php b/grade/edit/tree/category.php
index <HASH>..<HASH> 100644
--- a/grade/edit/tree/category.php
+++ b/grade/edit/tree/category.php
@@ -87,6 +87,16 @@ if ($id) {
         $category->grade_item_aggregationcoef = format_float($category->grade_item_aggregationcoef, 4);
     }
 
+    if ($category->aggregation == GRADE_AGGREGATE_SUM) {
+        // Input fields for grademin and grademax are disabled for the "Natural" category,
+        // this means they will be ignored if user does not change aggregation method.
+        // But if user does change aggregation method the default values should be used.
+        $category->grademax = 100;
+        $category->grade_item_grademax = 100;
+        $category->grademin = 0;
+        $category->grade_item_grademin = 0;
+    }
+
 } else {
     $heading = get_string('newcategory', 'grades');
     $grade_category = new grade_category(array('courseid'=>$courseid), false);
MDL-<I> core_grades: reset grademax when switching from Natural

in Natural aggregation method the grademax is automatically adjusted
when switching to another aggregation method it should be reset
to <I>