Skip to content

Conversation

blackb1rd
Copy link

@blackb1rd blackb1rd commented Oct 7, 2025

rebase #2754 and change naming multi_enum to select
Closes #2751

@blackb1rd blackb1rd changed the title Feat/multi select feat: multi select Oct 7, 2025
@blackb1rd blackb1rd changed the title feat: multi select feat: survey variable for multi select Oct 7, 2025
@blackb1rd blackb1rd marked this pull request as draft October 7, 2025 08:37
@blackb1rd blackb1rd marked this pull request as ready for review October 7, 2025 12:09
@blackb1rd blackb1rd force-pushed the feat/multi-select branch 2 times, most recently from fb24124 to 0e0369d Compare October 10, 2025 09:26
@fiftin fiftin requested a review from Copilot October 10, 2025 12:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds support for multi-select survey variables to Semaphore UI templates. The feature introduces a new "select" variable type that allows users to choose multiple values from a predefined list, building upon the existing "enum" type which only allows single selection.

Key changes:

  • Added new "select" survey variable type with multi-select capabilities
  • Extended frontend components to handle array-based values for select types
  • Implemented custom JSON marshaling/unmarshaling to support both single and multiple default values
  • Added UI components for managing multi-select variables with chips and deletion functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
web/src/lang/en.js Added localization string for "Allow multiple values" feature
web/src/components/TeamMenu.vue Removed extra whitespace (formatting cleanup)
web/src/components/TaskParamsForm.vue Enhanced form to support select type variables with multi-select UI, array normalization, and chip-based selection display
web/src/components/TaskForm.vue Added multi-select support to task creation form with chip display and item deletion
web/src/components/SurveyVars.vue Extended survey variable editor to support select type with multi-select default values and proper array/string normalization
db/Template.go Introduced SurveyVarSelect constant and custom SurveyVarDefaultValue type with flexible JSON marshaling for single/multiple values

@blackb1rd
Copy link
Author

Let me test new code change and I will let you know.

@blackb1rd
Copy link
Author

It looks like everything is working. I'll test it in production next week to check for any issues.

blackb1rd and others added 16 commits October 14, 2025 18:43
…mplate and TaskForm components

Signed-off-by: blackb1rd <[email protected]>
…lt value normalization and selection chips

Signed-off-by: blackb1rd <[email protected]>
… improved default value normalization

Signed-off-by: Prachya Saechua <[email protected]>
…m for default value normalization

Signed-off-by: Prachya Saechua <[email protected]>
…ndling of survey variables

Signed-off-by: Prachya Saechua <[email protected]>
…hing logic in TaskParamsForm.vue

Signed-off-by: Prachya Saechua <[email protected]>
…ring undefined values and merging defaults into edited environment

Signed-off-by: Prachya Saechua <[email protected]>
…veyVarType JSON handling

Signed-off-by: Prachya Saechua <[email protected]>
…ion and improve default variable handling in TaskParamsForm.vue

Signed-off-by: Prachya Saechua <[email protected]>
…Environment in TaskParamsForm.vue

Signed-off-by: Prachya Saechua <[email protected]>
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

@blackb1rd
Copy link
Author

@fiftin Hi, I have tested the code. Most of it is working fine.
but I found an issue related to #3304, which is a separate issue of these code change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Multi variable dropdown menu

2 participants