Skip to content

Feat: Add technicalName to views#2547

Open
Koc wants to merge 1 commit into
mainfrom
feature/technical-name-for-views
Open

Feat: Add technicalName to views#2547
Koc wants to merge 1 commit into
mainfrom
feature/technical-name-for-views

Conversation

@Koc

@Koc Koc commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

This is similar to #1840/#2384 but for Views.

image image image

🚧 TODO

  • Extend tests

@Koc Koc force-pushed the feature/technical-name-for-views branch from 4e3dfbb to f5c0e46 Compare April 28, 2026 11:46
@Koc Koc marked this pull request as ready for review April 28, 2026 11:46
@Koc Koc requested review from blizzz and enjeck as code owners April 28, 2026 11:46
@Koc Koc force-pushed the feature/technical-name-for-views branch 3 times, most recently from 1b8e351 to 5d0e084 Compare May 10, 2026 21:54
@Koc Koc force-pushed the feature/technical-name-for-views branch 2 times, most recently from 8e53c2f to 0615d81 Compare June 9, 2026 19:02

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i guess we wait for #2428 to merge first?

@Koc Koc force-pushed the feature/technical-name-for-views branch from 0615d81 to ddf9e3b Compare June 16, 2026 10:51
@Koc

Koc commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@enjeck this is more or less parallel process. My PR is completely independent.

@Koc Koc force-pushed the feature/technical-name-for-views branch 4 times, most recently from aaade32 to dbb4fc6 Compare June 16, 2026 12:43
@enjeck enjeck requested a review from samin-z June 17, 2026 06:37
@enjeck

enjeck commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@enjeck this is more or less parallel process. My PR is completely independent.

There's some designer feedback over there that I think applies here too? @samin-z please review.

@samin-z

samin-z commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@enjeck yes ill aligh the design on column to be the same as view as talked with @nimishavijay

@Koc Koc force-pushed the feature/technical-name-for-views branch from dbb4fc6 to 89f1bdb Compare June 22, 2026 23:30
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the feature/technical-name-for-views branch from 89f1bdb to c0fe714 Compare July 8, 2026 09:01
@samin-z

samin-z commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

if there is no technical_name value for view when updating no default is added for that view.

}

if ($view->getTechnicalName() === $technicalName) {
throw new BadRequestError('Technical name must be unique in the table.');

@samin-z samin-z Jul 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unique technical name does not take effect, i can still safe the view with an existing technical name.

@samin-z

samin-z commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

when api is called for view, dataByAlias is empty (screenshot 1), but in view it's an empty array (screenshot 2).
Screenshot 2026-07-08 at 16 52 43Screenshot 2026-07-08 at 16 52 24

* @throws BadRequestError
* @throws InternalError
*/
private function assertTechnicalNameUnique(int $tableId, string $technicalName, ?int $excludeCurrentViewId = null): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe we can remove the findAll and foreach uniqueness check and rely on the db unique index on (table_id, technical_name)? on create/update catch the constraint violation and return the same BadRequestError (“Technical name must be unique in the table.”).

$result->closeCursor();
}

$output->info('Version2011Date20260428000000: backfilled technical_name for ' . $updatedCount . ' views.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this also needs to be updated.

/**
* @throws BadRequestError
*/
private function assertTechnicalNameValid(string $technicalName): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low importance but maybe a check also for the length of it, but nothing worth stopping to go forward.

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.

3 participants