Repository: kestra-io/kestra
Issue: Template don't support description 
Labels: bug
backend

[Template](https://github.com/kestra-io/kestra/blob/f0b0ad541f67c6d6cf6f520839c4de0af66b7e63/core/src/main/java/io/kestra/core/models/templates/Template.java#L27) don't have any description, we need to support it 

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/core/src/main/java/io/kestra/core/models/templates/Template.java b/core/src/main/java/io/kestra/core/models/templates/Template.java
index 8ce6aca733..573a49e6c8 100644
--- a/core/src/main/java/io/kestra/core/models/templates/Template.java
+++ b/core/src/main/java/io/kestra/core/models/templates/Template.java
@@ -34,6 +34,8 @@ public class Template implements DeletedInterface {
     @Pattern(regexp="[a-z0-9._-]+")
     private String namespace;
 
+    String description;
+
     @Valid
     @NotEmpty
     private List<Task> tasks;
@@ -95,6 +97,7 @@ public Template toDeleted() {
         return new Template(
             this.id,
             this.namespace,
+            this.description,
             this.tasks,
             this.errors,
             true
diff --git a/ui/src/components/templates/Templates.vue b/ui/src/components/templates/Templates.vue
index 8c8f3dca56..12f2eeb5c4 100644
--- a/ui/src/components/templates/Templates.vue
+++ b/ui/src/components/templates/Templates.vue
@@ -49,6 +49,12 @@
                             >
                                 {{ row.item.id }}
                             </router-link>
+                            &nbsp;<markdown-tooltip
+                                :id="row.item.namespace + '-' + row.item.id"
+                                :description="row.item.description"
+                                :title="row.item.namespace + '.' + row.item.id"
+                                :modal="true"
+                            />
                         </template>
                     </b-table>
                 </template>
@@ -86,6 +92,7 @@
     import Kicon from "../Kicon"
     import RestoreUrl from "../../mixins/restoreUrl";
     import _merge from "lodash/merge";
+    import MarkdownTooltip from "@/components/layout/MarkdownTooltip";
 
     export default {
         mixins: [RouteContext, RestoreUrl, DataTableActions],
@@ -96,7 +103,8 @@
             DataTable,
             SearchField,
             NamespaceSelect,
-            Kicon
+            Kicon,
+            MarkdownTooltip,
         },
         data() {
             return {


Test patch:
diff --git a/webserver/src/test/java/io/kestra/webserver/controllers/TemplateControllerTest.java b/webserver/src/test/java/io/kestra/webserver/controllers/TemplateControllerTest.java
index 24e6ed2e2a..df1980efc7 100644
--- a/webserver/src/test/java/io/kestra/webserver/controllers/TemplateControllerTest.java
+++ b/webserver/src/test/java/io/kestra/webserver/controllers/TemplateControllerTest.java
@@ -38,6 +38,7 @@ private Template createTemplate() {
         return Template.builder()
             .id(IdUtils.create())
             .namespace("kestra.test")
+            .description("My template description")
             .tasks(Arrays.asList(t1, t2)).build();
     }
 
@@ -52,6 +53,7 @@ void create() {
         Template result = client.toBlocking().retrieve(POST("/api/v1/templates", template), Template.class);
         Template createdTemplate = client.toBlocking().retrieve(HttpRequest.GET("/api/v1/templates/" + template.getNamespace() + "/" + template.getId()), Template.class);
         assertThat(createdTemplate.getId(), is(template.getId()));
+        assertThat(createdTemplate.getDescription(), is("My template description"));
     }
 
     @Test
@@ -95,11 +97,12 @@ void updateTemplate() {
         Template createdTemplate = client.toBlocking().retrieve(HttpRequest.GET("/api/v1/templates/" + template.getNamespace() + "/" + template.getId()), Template.class);
         assertThat(template.getTasks().size(), is(2));
         Task t3 = Return.builder().id("task-3").type(Return.class.getName()).format("test").build();
-        Template updateTemplate = Template.builder().id(template.getId()).namespace(template.getNamespace()).tasks(Arrays.asList(t3)).build();
+        Template updateTemplate = Template.builder().id(template.getId()).namespace(template.getNamespace()).description("My new template description").tasks(Arrays.asList(t3)).build();
         client.toBlocking().retrieve(PUT("/api/v1/templates/" + template.getNamespace() + "/" + template.getId(), updateTemplate), Template.class);
         Template updatedTemplate = client.toBlocking().retrieve(HttpRequest.GET("/api/v1/templates/" + template.getNamespace() + "/" + template.getId()), Template.class);
         assertThat(updatedTemplate.getTasks().size(), is(1));
         assertThat(updatedTemplate.getTasks().get(0).getId(), is("task-3"));
+        assertThat(updatedTemplate.getDescription(),is("My new template description"));
     }
 
     @Test