From cdab9b6afedd0f0fc6e9a31080942a100c4f3655 Mon Sep 17 00:00:00 2001 From: Roman K Date: Sat, 22 Jan 2022 18:18:00 +0100 Subject: [PATCH 1/9] add dynamic dropdown options for Status and Type dropdown --- .../gr2/planner/main/MainPageServlet.java | 10 + .../META-INF/plugin-descriptors/wr-defs.xml | 2 +- backend/src/main/resources/main_page.vm | 32 +- frontend/package-lock.json | 108 ++-- package-lock.json | 529 ++++++------------ package.json | 5 + 6 files changed, 259 insertions(+), 427 deletions(-) create mode 100644 package.json diff --git a/backend/src/main/java/de/tuberlin/amos/gr2/planner/main/MainPageServlet.java b/backend/src/main/java/de/tuberlin/amos/gr2/planner/main/MainPageServlet.java index 6ab8777..fedb382 100644 --- a/backend/src/main/java/de/tuberlin/amos/gr2/planner/main/MainPageServlet.java +++ b/backend/src/main/java/de/tuberlin/amos/gr2/planner/main/MainPageServlet.java @@ -8,6 +8,8 @@ import com.atlassian.jira.security.PermissionManager; import com.atlassian.jira.user.ApplicationUser; import com.atlassian.jira.user.UserProjectHistoryManager; +import com.atlassian.jira.config.ConstantsManager; +import com.atlassian.jira.issue.status.Status; import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport; import static com.atlassian.jira.component.ComponentAccessor.getJiraAuthenticationContext; @@ -44,6 +46,10 @@ public class MainPageServlet extends HttpServlet { @ComponentImport private PermissionManager permissionManager; + @Inject + @ComponentImport + private ConstantsManager constantsManager; + @Inject @ComponentImport private IssueTypeSchemeManager issueTypeSchemeManager; @@ -70,8 +76,12 @@ protected void doGet(HttpServletRequest req, HttpServletResponse response) throw //using a deprecated class because there is no such method for getCurrentProject with ProjectPermissionKey yet Project currentProject = userProjectHistoryManager.getCurrentProject(Permissions.BROWSE, user); Collection allProjects = permissionManager.getProjects(ProjectPermissions.BROWSE_PROJECTS, user); + Collection statuses = constantsManager.getStatusObjects(); + Collection issueType = constantsManager.getAllIssueTypeObjects(); params.put("currentProject", currentProject); params.put("allProjects", allProjects); + params.put("statuses", statuses); + params.put("issueType", issueType); Collection issueTypes = issueTypeSchemeManager.getIssueTypesForDefaultScheme(); diff --git a/backend/src/main/resources/META-INF/plugin-descriptors/wr-defs.xml b/backend/src/main/resources/META-INF/plugin-descriptors/wr-defs.xml index a401f4e..d8acca1 100644 --- a/backend/src/main/resources/META-INF/plugin-descriptors/wr-defs.xml +++ b/backend/src/main/resources/META-INF/plugin-descriptors/wr-defs.xml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/backend/src/main/resources/main_page.vm b/backend/src/main/resources/main_page.vm index 917efd5..83298cc 100644 --- a/backend/src/main/resources/main_page.vm +++ b/backend/src/main/resources/main_page.vm @@ -143,7 +143,7 @@ $webResourceManager.requireResource("de.tuberlin.amos.gr2.backend:entrypoint-dyn ## second filter bar buttons
-
+
@@ -184,7 +184,7 @@ $webResourceManager.requireResource("de.tuberlin.amos.gr2.backend:entrypoint-dyn
## second filter bar advanced search - + ## second filter bar advanced search + +
## search button
+
Use JQL From f0aa6db4c99c0382e4a8137c53089105bdadca1a Mon Sep 17 00:00:00 2001 From: Roman K Date: Tue, 25 Jan 2022 19:52:05 +0100 Subject: [PATCH 4/9] add assignee dropdown shows all assignable users from the current project, will be refined when dropdown search is ready, so not too many users are displayed in options --- backend/src/main/resources/main_page.vm | 94 +++++++++++++++++++++---- 1 file changed, 79 insertions(+), 15 deletions(-) diff --git a/backend/src/main/resources/main_page.vm b/backend/src/main/resources/main_page.vm index c124aff..5982df8 100644 --- a/backend/src/main/resources/main_page.vm +++ b/backend/src/main/resources/main_page.vm @@ -307,6 +307,7 @@ $webResourceManager.requireResource("de.tuberlin.amos.gr2.backend:entrypoint-dyn ## Function for building the connected final query out of all dropdowns ## Dropdown type dynamic query update (checkbox) @@ -445,24 +480,53 @@ $webResourceManager.requireResource("de.tuberlin.amos.gr2.backend:entrypoint-dyn ## dropdown popup activated when clicking assignee - - ## -
- -
-
- - Current User - Unassigned + + - ## - ## admin - ##
+ + ## Dropdown assignee dynamic query update (checkbox)