Skip to content

MaterialItem.MaterialList is nullable #7217

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

Merged
merged 13 commits into from
Apr 13, 2025

Conversation

pmattmann
Copy link
Member

No description provided.

@pmattmann pmattmann force-pushed the feature/materialitem-nullable branch from 105de4f to 57bb82b Compare April 13, 2025 07:01
Copy link
Member

@carlobeltrame carlobeltrame left a comment

Choose a reason for hiding this comment

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

When is it expected to be null?

@usu usu added the deploy! Creates a feature branch deployment for this PR label Apr 13, 2025
@pmattmann
Copy link
Member Author

When is it expected to be null?

thx.
For new Root-ContentNodes, getRoot() returns null.
Fixed the check.

@usu usu temporarily deployed to feature-branch April 13, 2025 08:51 — with GitHub Actions Inactive
Copy link

github-actions bot commented Apr 13, 2025

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

Copy link
Contributor

@BacLuc BacLuc left a comment

Choose a reason for hiding this comment

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

The following api tests would be nice:

CreateActivityTest:
copy an activity from another camp -> materiallist is null
copy an activity from another camp, and then copy it again in the same camp
copy an activity from another camp, and then copy it to a third camp

@@ -151,9 +151,9 @@ public function testPatchMaterialItemValidatesMissingMaterialList() {
'materialList' => null,
Copy link
Contributor

Choose a reason for hiding this comment

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

The following test would be nice:
update a materialitem with a null material list

-> if you set the materiallist to not null -> success
-> if you change another property and leave the materiallist null -> error
-> if you change the material list from null to a material list of another camp -> error

@carlobeltrame
Copy link
Member

I see, so this is an improvement for e.g. copying activities with material from one camp to another.
In that case, do the prints and the material content node handle a null material list well? And can we add some items with null material list to the dev data?

@BacLuc BacLuc linked an issue Apr 13, 2025 that may be closed by this pull request
@usu usu added this pull request to the merge queue Apr 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 13, 2025
@pmattmann pmattmann force-pushed the feature/materialitem-nullable branch from 302ba27 to 56f99e6 Compare April 13, 2025 12:01
@pmattmann pmattmann enabled auto-merge April 13, 2025 12:05
@pmattmann pmattmann added this pull request to the merge queue Apr 13, 2025
Merged via the queue into ecamp:devel with commit 4233aee Apr 13, 2025
67 of 72 checks passed
@pmattmann pmattmann deleted the feature/materialitem-nullable branch April 13, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy! Creates a feature branch deployment for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Material belongs to old camp after copying
5 participants