== Prehamble ==
Knowing that the [wbeditentity API module](https://www.wikidata.org/w/api.php?action=help&modules=wbeditentity) can be used to save a label/description, and that the `add` parameter can be used to don't overwrite an existing label/description, in the following way:
```
{
"labels": [
{
"language": "en",
"value": "English label that will be added without overwriting. It works!",
"add": "1"
}
]
}
```
...and knowing that the same API module can be used also to create claims, in the following way:
```
{
"claims": {
'P123': [ some statements on this property ]
}
}
```
== Bug ==
When doing both the actions in the same request (creating claims and adding unexisting labels/descriptions), it seems to ignore the `add` parameter, and labels/descriptions are overwrited.
As an example, look at this diff:
* https://www.wikidata.org/w/index.php?title=Q3314490&diff=cur&oldid=614852618
You can note that labels/descriptions were overwrited. But this was the data (note the `add` parameters):
This data reproduces the problem:
```
{
"labels": [
{
"language": "en",
"value": "Milos Culafic",
"add": "1"
},
{
"language": "it",
"value": "Milos Culafic",
"add": "1"
}
],
"descriptions": [
{
"language": "en",
"value": "Montenegrin volleyball player",
"add": "1"
},
{
"language": "it",
"value": "pallavolista montenegrino",
"add": "1"
}
],
"claims": {
"P18": [
{
"type": "statement",
"rank": "normal",
"references": [
{
"snaks": {
"P248": [
{
"snaktype": "value",
"property": "P248",
"datatype": "wikibase-item",
"datavalue": {
"type": "wikibase-entityid",
"value": {
"entity-type": "item",
"numeric-id": 16571730,
"id": "Q16571730"
}
}
}
]
}
}
],
"mainsnak": {
"snaktype": "value",
"property": "P18",
"datatype": "commonsMedia",
"datavalue": {
"type": "string",
"value": "Milos Culafic (Legavolley 2017).jpg"
}
}
}
],
"P373": [
{
"type": "statement",
"rank": "normal",
"references": [
{
"snaks": {
"P248": [
{
"snaktype": "value",
"property": "P248",
"datatype": "wikibase-item",
"datavalue": {
"type": "wikibase-entityid",
"value": {
"entity-type": "item",
"numeric-id": 16571730,
"id": "Q16571730"
}
}
}
]
}
}
],
"mainsnak": {
"snaktype": "value",
"property": "P373",
"datatype": "string",
"datavalue": {
"type": "string",
"value": "Milos Culafic"
}
}
}
]
}
}
```
As workaround, when creating claims, I have to don't rely on the `add` parameter on labels/descriptions and do some client-side decisions for them, like comparing the existing labels/descriptions values and skipping the existings. I can also split in multiple requests the creation of claims and the addition of labels/descriptions in order to use the `add` flag as expected.