From 9a6eca018945c65b93d69739f7657c9b5a109b89 Mon Sep 17 00:00:00 2001 From: CircleCI Date: Fri, 13 Mar 2026 15:05:08 +0000 Subject: [PATCH 1/3] Bump version to 0.4.0 [skip ci] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18d62e9..49ea231 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ - 0.4.0-RC.1 + 0.4.0 -- 2.54.0 From 523fd3409510315f5cbb4658deeea29ce71abe2f Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 13 Mar 2026 10:10:36 -0500 Subject: [PATCH 2/3] chore: fix ot use revision property in tag --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 49ea231..00539a5 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ com.kingsrook.qbits qbit-customizable-table-views - 0.4.0-SNAPSHOT + ${revision} jar QBit Customizable Table Views -- 2.54.0 From dbfbc59f0c91ca503a7769a1bb1b6b7db7ee1e4b Mon Sep 17 00:00:00 2001 From: James Maes Date: Fri, 25 Sep 2026 20:41:08 -0500 Subject: [PATCH 3/3] build: re-pin to qbit-build-parent 2.0.0 (QRun-IO/qqq#765) Migrates the removed qqq 4.0 APIs with a sparse-update test, adds an opt-in qqq-snapshot profile, and keeps CircleCI package installs unattended. Part of QRun-IO/qqq-all#1 --- .circleci/config.yml | 20 +++++++ CLAUDE.md | 5 +- pom.xml | 54 ++++++++++++------- .../customizers/TableViewFieldCustomizer.java | 5 +- .../customizabletableviews/BaseTest.java | 2 +- .../TableViewFieldCustomizerTest.java | 26 +++++++++ 6 files changed, 88 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f632b2c..4517d6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,11 +3,23 @@ version: 2.1 orbs: qqq-orb: kingsrook/qqq-orb@0.5.0 +commands: + configure-package-install: + steps: + - run: + name: Keep package installation unattended + command: | + # These build machines are discarded after the job. + sudo install -d /etc/needrestart/conf.d + printf '%s\n' '$nrconf{restart} = "l";' | sudo tee /etc/needrestart/conf.d/99-qqq-ci.conf >/dev/null + workflows: test_only: jobs: - qqq-orb/mvn_test_only: + pre-steps: + - configure-package-install context: [ qqq-maven-registry-credentials ] filters: branches: @@ -18,6 +30,8 @@ workflows: publish_snapshot: jobs: - qqq-orb/mvn_publish: + pre-steps: + - configure-package-install context: [ qqq-maven-registry-credentials ] branch_type: snapshot filters: @@ -28,6 +42,8 @@ workflows: publish_release_candidate: jobs: - qqq-orb/mvn_publish: + pre-steps: + - configure-package-install context: [ qqq-maven-registry-credentials ] branch_type: release_candidate filters: @@ -38,6 +54,8 @@ workflows: publish_release: jobs: - qqq-orb/mvn_publish: + pre-steps: + - configure-package-install context: [ qqq-maven-registry-credentials ] branch_type: release filters: @@ -49,6 +67,8 @@ workflows: publish_hotfix_release: jobs: - qqq-orb/mvn_publish: + pre-steps: + - configure-package-install context: [ qqq-maven-registry-credentials ] branch_type: hotfix filters: diff --git a/CLAUDE.md b/CLAUDE.md index 2ca6bd7..0d77ace 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,5 +18,6 @@ Notes for agents working here: CONTRIBUTING.md are copy-pasted from qbit-user-role-permissions. - Licensing metadata is contradictory (LICENSE/NOTICE = Apache-2.0; pom, file headers, checkstyle template = AGPL-3.0; README footer says proprietary). Open PR #5 fixes the pom. -- Depends on `qqq-bom-pom:0.40.0-SNAPSHOT` — snapshot resolution may break; see dossier - "v4.0 impact" before bumping qqq versions. +- Default builds take the qqq version only from `qbit-build-parent` (2.0.0 = qqq 4.0.0); + do not add an always-on `qqq-bom-pom` import (ADR-0007). To check the next qqq line, run + `mvn -B verify -Pqqq-snapshot` (4.1.0-SNAPSHOT; override with `-Dqqq.snapshot.version`). diff --git a/pom.xml b/pom.xml index ed81ebd..746175f 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ com.kingsrook qbit-build-parent - 1.5.1 + 2.0.0 com.kingsrook.qbits @@ -68,18 +68,6 @@ 0.5.0-SNAPSHOT - - - - com.kingsrook.qqq - qqq-bom-pom - 0.40.0-SNAPSHOT - pom - import - - - - com.kingsrook.qqq @@ -110,11 +98,39 @@ - - - sonatype-snapshots - https://central.sonatype.com/repository/maven-snapshots/ - - + + + + + + qqq-snapshot + + 4.1.0-SNAPSHOT + + + + + com.kingsrook.qqq + qqq-bom-pom + ${qqq.snapshot.version} + pom + import + + + + + + sonatype-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + false + + + true + + + + + diff --git a/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java b/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java index 5e21127..abce184 100644 --- a/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java +++ b/src/main/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizer.java @@ -36,6 +36,7 @@ import com.kingsrook.qqq.backend.core.model.data.QRecord; import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldMetaData; import com.kingsrook.qqq.backend.core.model.statusmessages.BadInputStatusMessage; import com.kingsrook.qqq.backend.core.model.statusmessages.SystemErrorStatusMessage; +import com.kingsrook.qqq.backend.core.utils.ValueUtils; /******************************************************************************* @@ -57,8 +58,8 @@ public class TableViewFieldCustomizer implements TableCustomizerInterface try { Integer id = record.getValueInteger("id"); - String fieldName = RecordCustomizerUtilityInterface.getValueFromRecordOrOldRecord("fieldName", record, id, oldRecordMap); - String accessLevelId = RecordCustomizerUtilityInterface.getValueFromRecordOrOldRecord("accessLevel", record, id, oldRecordMap); + String fieldName = ValueUtils.getValueAsString(RecordCustomizerUtilityInterface.getValueFromRecordElseFromOldRecord("fieldName", record, id, oldRecordMap)); + String accessLevelId = ValueUtils.getValueAsString(RecordCustomizerUtilityInterface.getValueFromRecordElseFromOldRecord("accessLevel", record, id, oldRecordMap)); String[] parts = fieldName.split("\\."); String tableName = parts[0]; diff --git a/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java b/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java index 155b97c..d7b36c9 100644 --- a/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java +++ b/src/test/java/com/kingsrook/qbits/customizabletableviews/BaseTest.java @@ -78,7 +78,7 @@ public class BaseTest // basic definition of an instance // ///////////////////////////////////// QInstance qInstance = new QInstance(); - qInstance.setAuthentication(new QAuthenticationMetaData().withType(QAuthenticationType.FULLY_ANONYMOUS)); + qInstance.withInstanceDefaultAuthentication(new QAuthenticationMetaData().withType(QAuthenticationType.FULLY_ANONYMOUS)); qInstance.addBackend(new RDBMSBackendMetaData() .withName(RDBMS_BACKEND_NAME) .withVendor("h2") diff --git a/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java b/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java index bb0d21d..4e710a5 100644 --- a/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java +++ b/src/test/java/com/kingsrook/qbits/customizabletableviews/tables/customizers/TableViewFieldCustomizerTest.java @@ -96,6 +96,32 @@ class TableViewFieldCustomizerTest extends BaseTest + /******************************************************************************* + ** a sparse update (e.g., only accessLevel set) must validate against the + ** fieldName from the old record. + *******************************************************************************/ + @Test + void testSparseUpdateUsesOldRecordValues() throws QException + { + QContext.getQInstance().addTable(new QTableMetaData() + .withName("testTable3") + .withField(new QFieldMetaData("mandatory", QFieldType.STRING).withIsRequired(true)) + .withField(new QFieldMetaData("optional", QFieldType.STRING))); + + Optional> oldRecordList = Optional.of(List.of( + new TableViewField().withId(1).withFieldName("testTable3.mandatory").withAccessLevel(FieldAccessLevel.EDITABLE_REQUIRED).toQRecord(), + new TableViewField().withId(2).withFieldName("testTable3.optional").withAccessLevel(FieldAccessLevel.EDITABLE_OPTIONAL).toQRecord())); + + QRecord mandatoryToReadOnly = new QRecord().withValue("id", 1).withValue("accessLevel", FieldAccessLevel.READ_ONLY.getId()); + QRecord optionalToReadOnly = new QRecord().withValue("id", 2).withValue("accessLevel", FieldAccessLevel.READ_ONLY.getId()); + new TableViewFieldCustomizer().preInsertOrUpdate(null, List.of(mandatoryToReadOnly, optionalToReadOnly), false, oldRecordList); + + assertThat(mandatoryToReadOnly.getErrors()).hasSizeGreaterThan(0); + assertThat(optionalToReadOnly.getErrors()).isNullOrEmpty(); + } + + + /*************************************************************************** * ***************************************************************************/ -- 2.54.0