Add users to a product/ in our case a battery passport

We want to add a user to the battery passport. So they can view their own battery. This needs to be exclusive feature for the user. We see that the issue has to do with the collection being from EAN. However we do not know how to fix it such that we can assign a user. Also, we want to eventually make it transferable such that one user can give it to another.

Hi Keano,

Have a look at the error message you get there and notice that it cannot find ‘Users’, only ‘Product Passports’.

The explanation for this is that you only went up one node, which made you end up in the OEM group. You should write this to fix the issue:

’User’: text → ^ ^ .’Users’[]

By changing the path accordingly, it will resolve correctly to the expected Users collection

Hello, we tried this fix. Now the migration keeps giving errors. Because it is missing information from the new attribute. With the screenshots we fixed the first error that popped up. However we keep getting an error that says: “missing entry "‘User’ in entries“. How do we fix this? The second screenshot is in the next reply as we can only do one image per reply.

this is the second screenshot

Hi, the fix is fairly simple. The purpose of a migration is to deliver correct data for the new version of an application to start with. So it needs to provide a value for this new ‘User’ property for each of the product passports. And the data needs to be correct. Easiest will be to select a user to ‘give’ all current product passports to and add him/her to the migration. You would expect it to contain something like this: ‘User’: text = “rick”, which would link them all to my account.