Skip to content

Свойство ВводитсяНаОсновании (BasedOn) объектов метаданных - #659

Merged
theshadowco merged 1 commit into
developfrom
feature/Feature-652
Jul 27, 2026
Merged

Свойство ВводитсяНаОсновании (BasedOn) объектов метаданных #659
theshadowco merged 1 commit into
developfrom
feature/Feature-652

Conversation

@theshadowco

@theshadowco theshadowco commented Jul 27, 2026

Copy link
Copy Markdown
Member

Описание

Добавлено свойство ВводитсяНаОсновании

Связанные задачи

Closes #652

Чеклист

Общие

  • Ветка PR обновлена из develop
  • Отладочные, закомментированные и прочие, не имеющие смысла участки кода удалены
  • Изменения покрыты тестами
  • Обязательные действия перед коммитом выполнены (запускал команду gradlew precommit)

Дополнительно

Summary by CodeRabbit

  • New Features

    • Added “based on” reference information to business processes, catalogs, charts, documents, exchange plans, and tasks.
    • Enabled multiple source references to be captured and accessed for supported metadata objects.
  • Tests

    • Added coverage validating populated and empty “based on” reference collections across supported object types.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The metadata model adds basedOn reference collections with Lombok builder support across eight classes. Tests validate populated references for business processes, catalogs, and documents, plus empty collections for applicable catalog fixtures.

Changes

BasedOn property support

Layer / File(s) Summary
BasedOn model fields
src/main/java/com/github/_1c_syntax/bsl/mdo/*.java
Eight metadata classes add List<MdoReference> basedOn fields with addBasedOn(...) builder methods.
BasedOn test coverage
src/test/java/com/github/_1c_syntax/bsl/mdo/*Test.java
Tests assert expected based-on references for business processes, catalogs, and documents, including empty catalog collections.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Most required model classes were updated, but the BasedOnOwner interface and external data source Table support are missing from the reviewed changes. Add the BasedOnOwner interface with getBasedOn(), and implement BasedOn for the external data source Table class.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes adding the BasedOn property to metadata objects.
Out of Scope Changes check ✅ Passed The changes stay focused on adding BasedOn fields and tests, with no unrelated modifications evident.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/Feature-652

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/com/github/_1c_syntax/bsl/mdo/BusinessProcess.java`:
- Around line 67-68: Document the public basedOn fields associated with
`@Singular`("addBasedOn") in BusinessProcess.java (67-68), Catalog.java (70-71),
ChartOfAccounts.java (69-70), ChartOfCalculationTypes.java (66-67),
ChartOfCharacteristicTypes.java (71-72), Document.java (67-68),
ExchangePlan.java (69-70), and Task.java (68-69). Add field Javadoc stating that
each collection contains metadata references defining the objects on which the
current object is entered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cf33f66b-5840-497e-9b13-0c30738112a6

📥 Commits

Reviewing files that changed from the base of the PR and between d60e06a and 714c5f7.

⛔ Files ignored due to path filters (30)
  • src/test/resources/fixtures/mdclasses/BusinessProcesses.БизнесПроцесс1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/Catalogs.Справочник1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/ChartsOfAccounts.ПланСчетов1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/ChartsOfCalculationTypes.ПланВидовРасчета1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/ChartsOfCharacteristicTypes.ПланВидовХарактеристик1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/Documents.Документ1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/ExchangePlans.ПланОбмена1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses/Tasks.Задача1.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses_3_18/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses_3_25/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses_3_27/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses_5_1/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/mdclasses_ext/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/BusinessProcesses.Задание.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/Catalogs.ВерсииФайлов.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/Catalogs.Заметки.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/ChartsOfCharacteristicTypes.ДополнительныеРеквизитыИСведения.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/Documents.Анкета.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/ExchangePlans.ОбновлениеИнформационнойБазы.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_1/Tasks.ЗадачаИсполнителя.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/BusinessProcesses.Задание.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/Catalogs.ВерсииФайлов.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/Catalogs.Заметки.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/ChartsOfCharacteristicTypes.ДополнительныеРеквизитыИСведения.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/Configuration.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/Documents.Анкета.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/ExchangePlans.ОбновлениеИнформационнойБазы.json is excluded by !src/test/resources/**
  • src/test/resources/fixtures/ssl_3_2/Tasks.ЗадачаИсполнителя.json is excluded by !src/test/resources/**
📒 Files selected for processing (11)
  • src/main/java/com/github/_1c_syntax/bsl/mdo/BusinessProcess.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/Catalog.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/ChartOfAccounts.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/ChartOfCalculationTypes.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/ChartOfCharacteristicTypes.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/Document.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/ExchangePlan.java
  • src/main/java/com/github/_1c_syntax/bsl/mdo/Task.java
  • src/test/java/com/github/_1c_syntax/bsl/mdo/BusinessProcessTest.java
  • src/test/java/com/github/_1c_syntax/bsl/mdo/CatalogTest.java
  • src/test/java/com/github/_1c_syntax/bsl/mdo/DocumentTest.java

Comment thread src/main/java/com/github/_1c_syntax/bsl/mdo/BusinessProcess.java
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Test Results

  522 files  ± 0    522 suites  ±0   12m 46s ⏱️ -12s
1 267 tests + 8  1 264 ✅ + 8   3 💤 ±0  0 ❌ ±0 
7 626 runs  +48  7 608 ✅ +48  18 💤 ±0  0 ❌ ±0 

Results for commit 714c5f7. ± Comparison against base commit d60e06a.

♻️ This comment has been updated with latest results.

@theshadowco
theshadowco merged commit a474c61 into develop Jul 27, 2026
19 checks passed
@theshadowco
theshadowco deleted the feature/Feature-652 branch July 27, 2026 08:03
@nixel2007

Copy link
Copy Markdown
Member

Понимаю, что поздновато - а нет смысла интерфейс ещё вводить для таких массовых свойств, которые используются в многих объектах метаданных?

@theshadowco

Copy link
Copy Markdown
Member Author

да в принципе можно, если есть кейс использования. @sfaqer если надо, черкни таску

@sfaqer

sfaqer commented Jul 31, 2026

Copy link
Copy Markdown
Member

@theshadowco кейс есть, завёл — #677. Там же замер: свойств без интерфейса пять (basedOn в 8 классах, additionalIndexes в 14, dataLockFields и inputByString по 8, fullTextSearch в 13), а у характеристик интерфейс уже сделан — то есть просьба про распространение существующего соглашения, а не про новое.

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.

[NEW] Свойство ВводитсяНаОсновании (BasedOn) объектов метаданных

3 participants