Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: 578 add concept for consistent null values #722

Merged
merged 11 commits into from
Mar 4, 2024
Merged
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Added
- Added concept #638: Contract agreement admin view
- Added support for meta key for multi sorting on tables
- Added concept #578: Consistent null values

### Changed
- Spring-core bumped from 6.0.16 to 6.0.17
Expand Down
8 changes: 4 additions & 4 deletions charts/traceability-foss/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ home: https://eclipse-tractusx.github.io/
sources:
- https://github.com/eclipse-tractusx/traceability-foss
type: application
version: 1.3.30
appVersion: "10.5.0"
version: 1.3.31
appVersion: "10.6.0"
dependencies:
- name: frontend
repository: "file://charts/frontend"
version: 1.3.30
version: 1.3.31
- name: backend
repository: "file://charts/backend"
version: 1.3.30
version: 1.3.31
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 12.12.10
Expand Down
4 changes: 2 additions & 2 deletions charts/traceability-foss/charts/backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ apiVersion: v2
name: backend
description: A Helm chart for Traceability backend application.
type: application
version: 1.3.30
appVersion: "10.5.0"
version: 1.3.31
appVersion: "10.6.0"
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
Expand Down
4 changes: 2 additions & 2 deletions charts/traceability-foss/charts/frontend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ apiVersion: v2
name: frontend
description: A Helm chart for Traceability frontend application.
type: application
version: 1.3.30
appVersion: "10.5.0"
version: 1.3.31
appVersion: "10.6.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# #578 Consistent null values

| Key | Value |
|---------------|--------------------------------------------------------------------------|
| Author | @ds-crehm |
| Creation date | 28.02.2024 |
| Ticket Id | [#578](https://github.com/eclipse-tractusx/traceability-foss/issues/578) |
| State | Draft |

# Table of Contents
1. [Overview](#overview)
2. [Requirements](#requirements)
3. [Out of scope](#out-of-scope)
4. [Concept](#concept)
5. [References](#references)
6. [Additional Details](#additional-details)


# Overview
In the frontend there are multiple versions of 'empty' values:

![example-values-frontend.png](example-values-frontend.png)

In the backend those values are as follows:

![example-values-backend.png](example-values-backend.png)

These should be consistent throughout Trace-X.

# Requirements
- Whenever a string value is saved or updated in the database and during data consumption from IRS:
- [ ] Leading and trailing whitespace characters are trimmed.
- [ ] Empty strings ("") are all converted to null.
- [ ] Null values are shown *empty* in the frontend.
- [ ] When sorting columns, empty values are shown all the way on the bottom regardless of the sort order.
- [ ] Empty values can be filtered and searched for. They are shown as "(Blank)" (de: "(Leer)") when filtering for them and can be searched by inputting the same term.
- [ ] Leading and trailing whitespace characters don't count as mandatory values during user input.

# Out of scope
Any further string validation is out of scope. For example values like "-", "--", ".", "..." will not be changed and instead written into the database and shown in the frontend **unchanged**.

# Concept
### Backend
Whenever a string is saved or updated in the database and during data consumption from IRS:
1. Trim leading and whitespace character
2. Convert empty strings ("") to null
3. Save/update value in database

### Frontend
Null values should be shown in the frontend as empty:

![null-value-display-empty.png](null-value-display-empty.png)

When sorting the values, empty ones should be always shown at the bottom regardless of the sort order.
Filtering and searching for empty values must be possible. In the filter box (Blank) (de: (Leer)) should be shown at the bottom.
To search for it, the user must type in the term "(Blank)" (de: (Leer)).

![null-value-filter.png](null-value-filter.png)

In order to reduce the amount of whitespace characters in the database, leading and trailing whitespaces should not be counted during user input.

![null-value-input-leading-and-trailing.png](null-value-input-leading-and-trailing.png)
In this example, the amount of counted characters should be 10 ("blank" + " " + "test") instead of 43.

![null-value-input-only-spaces.png](null-value-input-only-spaces.png)
Here, no characters should be counted and the input should not be accepted.

# References
https://miro.com/app/board/uXjVO5JVoho=/?moveToWidget=3458764580844404410&cot=10

# Additional Details
Given the dynamic nature of ongoing development, there might be variations between the conceptualization and the current implementation. For the latest status, refer to the documentation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trace-x",
"version": "10.5.0",
"version": "10.6.0",
"scripts": {
"analyze": "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json",
"build:prod": "ng build --output-hashing=all --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/ ",
Expand Down
Loading