Skip to content

Conversation

@Kiara65
Copy link
Contributor

@Kiara65 Kiara65 commented Nov 12, 2025

Checklist

General

Client

  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

Previously, the input validation for tutor group title restricted certain characters, such as colons (:), which are commonly used to indicate time ranges or schedules (e.g., "G1 Mo 12:00-13:00").

Description

  • Updated the regex for tutorial group titles to allow colons
  • Adapted the shown error text below the title input field

Steps for Testing

Prerequisites:

  • 1 Instructor
  1. Log in to Artemis
  2. Navigate to Course Management in the header
  3. Click on any course in the list
  4. In the sidebar, go to Tutorials.
  5. Click on the '+ Create New Tutorial Group' Button
  6. Enter "*" in the Title field and verify that the error message below the field correctly states that colons are allowed. The complete message should read: “Titles can only contain letters, numbers, spaces, colons, and dashes.”
  7. In the Title field, enter something with colons (e.g., as shown in the example text: G1 Mo 12:00–13:00) and verify that no error message appears
  8. Fill in the other required fields
  9. Scroll down and click on Save
  10. Verify that the new tutorial group was created successfully and without any errors

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1

Manual Tests

  • Test 1
  • Test 2

Screenshots

Before:

Screenshot 2025-11-12 at 13 50 16

New error message:

Screenshot 2025-11-12 at 14 12 19

Entering ":" doesn't throw an error anymore:

Screenshot 2025-11-12 at 14 12 46

Summary by CodeRabbit

  • New Features

    • Tutorial group and channel names may now include colon characters in addition to letters, digits, spaces, and dashes.
  • Documentation

    • Updated German and English validation messages to list the expanded allowed character set.
  • Bug Fixes

    • Clarified the error shown when attempting to create channels that start with the reserved "$" prefix.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Nov 12, 2025
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) tutorialgroup Pull requests that affect the corresponding module labels Nov 12, 2025
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 704ms
TestResultTime ⏱
No test annotations available

@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de November 12, 2025 13:06 Inactive
@Kiara65 Kiara65 moved this from Work In Progress to Ready For Review in Artemis Development Nov 12, 2025
@Kiara65 Kiara65 marked this pull request as ready for review November 12, 2025 13:22
@Kiara65 Kiara65 requested a review from krusche as a code owner November 12, 2025 13:22
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Validation regexes expanded: tutorial group title validation now accepts colon (:) in backend and frontend; user-facing messages (en/de) updated. Channel name validation (backend and frontend) likewise permits colons; backend also tightened error handling for feedback channels that start with $. No API signatures or control flow changed.

Changes

Cohort / File(s) Summary
Tutorial group — backend
src/main/java/de/tum/cit/aet/artemis/tutorialgroup/web/TutorialGroupResource.java
TITLE_REGEX updated to include colon (:) in allowed characters for tutorial group titles.
Tutorial group — frontend
src/main/webapp/app/tutorialgroup/manage/tutorial-groups/crud/tutorial-group-form/tutorial-group-form.component.ts
Exported titleRegex constant broadened to allow : and an escaped - in title validation.
Tutorial group — i18n messages
src/main/webapp/i18n/en/tutorialGroups.json, src/main/webapp/i18n/de/tutorialGroups.json
Validation error text updated to include colon (:) as an allowed character for tutorial group titles.
Channel name — backend
src/main/java/de/tum/cit/aet/artemis/communication/service/conversation/ChannelService.java
Channel-name regex expanded to allow colon (:); validation/error message updated. createFeedbackChannel now throws a BadRequestAlertException when a channel name starts with $.
Channel name — frontend
src/main/webapp/app/communication/course-conversations-components/dialogs/channels-create-dialog/channel-form/channel-form.component.ts
Exported channelRegex constant updated to permit : in channel names (regex adjusted/escaped accordingly).

Sequence Diagram(s)

The changes are limited to regex patterns and validation messages; there are no control-flow or interaction changes, therefore no sequence diagram is provided.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect regex escaping, anchors, and character-class ordering in both backend and frontend to ensure semantic parity.
  • Verify i18n messages precisely match the allowed character set shown in code.
  • Review ChannelService.createFeedbackChannel change that throws on names starting with $ for correct exception type, message, and error key consistency.
  • Run/verify unit and UI validation tests to confirm frontend and backend remain aligned.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and accurately reflects the main change: allowing colon characters in tutorial group titles across the system.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/9367-tutorial-group-creation-title-should-be-able-to-contain-colon-symbol

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aad66c0 and 2f89518.

📒 Files selected for processing (1)
  • src/main/java/de/tum/cit/aet/artemis/communication/service/conversation/ChannelService.java (13 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/de/tum/cit/aet/artemis/communication/service/conversation/ChannelService.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: client-style
  • GitHub Check: client-tests-selected
  • GitHub Check: client-tests
  • GitHub Check: server-style
  • GitHub Check: server-tests
  • GitHub Check: bean-instantiation-check
  • GitHub Check: Analyse

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 12, 2025
az108
az108 previously approved these changes Nov 12, 2025
Copy link
Contributor

@az108 az108 left a comment

Choose a reason for hiding this comment

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

Code LGTM

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 527ms
TestResultTime ⏱
No test annotations available

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

atharvamp
atharvamp previously approved these changes Nov 18, 2025
Copy link

@atharvamp atharvamp left a comment

Choose a reason for hiding this comment

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

Tested on ts9, titles identify * as an invalid character and allow colons in title.

However, I noticed that the title shows an error when it starts with a space, dash or colon. Not sure if this intentional.

Copy link

@FullbusterSteve FullbusterSteve left a comment

Choose a reason for hiding this comment

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

I tested this PR on TS9.

Everything works as expected.

Copy link
Member

@anian03 anian03 left a comment

Choose a reason for hiding this comment

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

Tested on TS9. Using a colon in the tutorial group name causes an issue when the feature to automatically create conversation channels for tutorials is activated.

Bildschirmfoto 2025-11-18 um 15 55 35

@Jess-hub09
Copy link

For me it still throws an error, even though I entered a "*". I tried this multiple times but it did not work.
image
image
image

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅Skipped ⚠️FailedTime ⏱
End-to-End (E2E) Test Report205 ran202 passed3 skipped0 failed1h 3m 40s 113ms
TestResultTime ⏱
No test annotations available

LeZhen1105
LeZhen1105 previously approved these changes Nov 19, 2025
Copy link
Contributor

@LeZhen1105 LeZhen1105 left a comment

Choose a reason for hiding this comment

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

Code looks good

@Kiara65 Kiara65 requested a review from a team as a code owner November 20, 2025 10:39
@github-actions github-actions bot added the communication Pull requests that affect the corresponding module label Nov 20, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 20, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/webapp/app/communication/course-conversations-components/dialogs/channels-create-dialog/channel-form/channel-form.component.ts (1)

18-18: Regex update correctly allows colon; confirm first-character rule and consider length alignment

The updated channelRegex (^[a-z0-9-]{1}[a-z0-9:\\-]{0,30}$) correctly adds support for : in the trailing characters while keeping the first character restricted to [a-z0-9-]. This means names like g1:abc are valid, but :abc is still rejected. If that’s the intended behavior (i.e., channel names must still start with a letter/number/dash), this change looks good.

Separately, since you’re touching validation here, note that:

  • The regex allows up to 31 characters (1 + 0–30),
  • While the form control also has Validators.maxLength(20).

That length mismatch is pre-existing but might be worth harmonizing at some point to keep validation rules easier to reason about.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a626bb and aad66c0.

📒 Files selected for processing (2)
  • src/main/java/de/tum/cit/aet/artemis/communication/service/conversation/ChannelService.java (13 hunks)
  • src/main/webapp/app/communication/course-conversations-components/dialogs/channels-create-dialog/channel-form/channel-form.component.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/de/tum/cit/aet/artemis/communication/service/conversation/ChannelService.java
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/**/*.ts

⚙️ CodeRabbit configuration file

angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

Files:

  • src/main/webapp/app/communication/course-conversations-components/dialogs/channels-create-dialog/channel-form/channel-form.component.ts
🧠 Learnings (2)
📚 Learning: 2024-10-29T12:28:57.305Z
Learnt from: SimonEntholzer
Repo: ls1intum/Artemis PR: 9478
File: src/main/webapp/app/shared/user-settings/ssh-settings/details/ssh-user-settings-key-details.component.ts:104-111
Timestamp: 2024-10-29T12:28:57.305Z
Learning: In `ssh-user-settings-key-details.component.ts`, changing the error handling code by adding optional chaining (`?.`) and replacing `.indexOf()` with `.includes()` may alter semantics and should be avoided.

Applied to files:

  • src/main/webapp/app/communication/course-conversations-components/dialogs/channels-create-dialog/channel-form/channel-form.component.ts
📚 Learning: 2024-11-02T22:57:57.717Z
Learnt from: florian-glombik
Repo: ls1intum/Artemis PR: 9656
File: src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.ts:69-71
Timestamp: 2024-11-02T22:57:57.717Z
Learning: In the `src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.ts`, the `isFormValid` computed property intentionally uses a logical OR between `this.statusChanges() === 'VALID'` and `this.fileName()` to mirror the original `isSubmitPossible` getter, ensuring consistent form validation behavior.

Applied to files:

  • src/main/webapp/app/communication/course-conversations-components/dialogs/channels-create-dialog/channel-form/channel-form.component.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: server-style
  • GitHub Check: client-tests-selected
  • GitHub Check: client-style
  • GitHub Check: client-tests
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: Analyse
  • GitHub Check: bean-instantiation-check

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed2s 127ms
TestResultTime ⏱
No test annotations available

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report215 ran210 passed3 skipped2 failed1h 19m 36s 263ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exam/ExamDateVerification.spec.ts
ts.Exam date verification › Exam timing › Student can start after start Date❌ failure2m 5s 461ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure3m 38s 259ms

@Kiara65
Copy link
Contributor Author

Kiara65 commented Nov 20, 2025

Tested on TS9. Using a colon in the tutorial group name causes an issue when the feature to automatically create conversation channels for tutorials is activated.

Bildschirmfoto 2025-11-18 um 15 55 35

Thanks for pointing it out, I fixed it 😄

@Kiara65
Copy link
Contributor Author

Kiara65 commented Nov 20, 2025

For me it still throws an error, even though I entered a "*". I tried this multiple times but it did not work. image image image

This is intended. The * input is still not allowed. I added it to the steps to reproduce as an example of invalid input so the error message below the input field appears. 😄

Copy link
Contributor

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

Code looks good 👍

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report215 ran206 passed3 skipped6 failed1h 23m 16s 776ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/atlas/CompetencyManagement.spec.ts
ts.Competency Management › Creates a competency❌ failure2m 3s 784ms
ts.Prerequisite Management › Creates a prerequisite❌ failure2m 3s 743ms
ts.Prerequisite Management › Prerequisite editing › Edits a prerequisite❌ failure2m 4s 673ms
e2e/exam/ExamDateVerification.spec.ts
ts.Exam date verification › Exam timing › Student can start after start Date❌ failure2m 4s 243ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure3m 40s 946ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 44s 23ms

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report215 ran210 passed3 skipped2 failed1h 19m 47s 848ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exam/ExamDateVerification.spec.ts
ts.Exam date verification › Exam timing › Student can start after start Date❌ failure2m 4s 503ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure3m 40s 659ms

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

Labels

client Pull requests that update TypeScript code. (Added Automatically!) communication Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) tutorialgroup Pull requests that affect the corresponding module

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

Tutorial Group creation title should be able to contain colon symbol