]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20720 Update Sort by select on Projects list + url param
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>
Mon, 16 Oct 2023 14:24:20 +0000 (16:24 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 18 Oct 2023 20:03:05 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/create/project/components/NewCodeDefinitionSelection.tsx
server/sonar-web/src/main/js/apps/projects/utils.ts
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index e2d22150707004a7874bff76bf14bf1735988bae..e49ae22d11874fde40945c12efcf55654042400d 100644 (file)
@@ -72,7 +72,7 @@ export default function NewCodeDefinitionSelection(props: Props) {
     } else {
       navigate({
         pathname: '/projects',
-        search: queryToSearch({ recent: true }),
+        search: queryToSearch({ sort: '-creation_date' }),
       });
     }
   }, [data, projectCount, mutateCount, reset, intl, navigate]);
index 219a4ab080806eb886dfde398e19c757e5a71d50..439365374a32811a7fcd4cb74dde644d25eb1c00 100644 (file)
@@ -40,6 +40,7 @@ export const PROJECTS_ALL = 'all';
 export const SORTING_METRICS: SortingOption[] = [
   { value: 'name' },
   { value: 'analysis_date' },
+  { value: 'creation_date' },
   { value: 'reliability' },
   { value: 'security' },
   { value: 'security_review' },
@@ -52,6 +53,7 @@ export const SORTING_METRICS: SortingOption[] = [
 export const SORTING_LEAK_METRICS: SortingOption[] = [
   { value: 'name' },
   { value: 'analysis_date' },
+  { value: 'creation_date' },
   { value: 'new_reliability', class: 'projects-leak-sorting-option' },
   { value: 'new_security', class: 'projects-leak-sorting-option' },
   { value: 'new_security_review', class: 'projects-leak-sorting-option' },
@@ -303,6 +305,7 @@ const propertyToMetricMap: Dict<string | undefined> = {
   tags: 'tags',
   search: 'query',
   qualifier: 'qualifier',
+  creation_date: 'creationDate',
 };
 
 const metricToPropertyMap = invert(propertyToMetricMap);
index 09b12b70209a04a668997c2a90e4450f7b6a4d21..463c1e7b682337f3a628f00ef3b6be03f52db8fe 100644 (file)
@@ -1230,6 +1230,7 @@ projects.sort_descending=Result sorted in descending order
 projects.sorting.default=default
 projects.sorting.name=Name
 projects.sorting.analysis_date=Last analysis date
+projects.sorting.creation_date=Creation date
 projects.sorting.reliability=Reliability
 projects.sorting.security=Security
 projects.sorting.security_review=Security Review
@@ -4197,7 +4198,6 @@ onboarding.create_project.new_code_definition.title=Set up project for Clean as
 onboarding.create_x_project.new_code_definition.title=Set up {count, plural, one {project} other {# projects}} for Clean as You Code
 onboarding.create_project.new_code_definition.description=The new code definition sets which part of your code will be considered new code. This helps you focus attention on the most recent changes to your project, enabling you to follow the Clean as You Code methodology. Learn more: {link}
 onboarding.create_project.new_code_definition.description.link=Defining New Code
-onboarding.create_project.new_code_definition.create_project=Create project
 onboarding.create_project.new_code_definition.create_x_projects=Create {count, plural, one {project} other {# projects}}
 onboarding.create_projects.new_code_definition.change_info=You can change this for each project individually at any time in the project administration.
 onboarding.create_project.success=Your {count, plural, one {project has} other {# projects have}} been created.