jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365087 )

Change subject: Fix “Target required claim” error message
......................................................................


Fix “Target required claim” error message

The entity that is required to have a claim can be a property, so we
should not assume that its ID is an item ID. Since $targetEntityId is an
EntityId object, not a string, we should directly use formatEntityId()
anyways (formatItemId() optionally parses a string argument into an
ItemId, but we know we have an EntityId object).

Bug: T170597
Change-Id: Ic662eb7f7c46e278e4543051ccc9496042f0f759
---
M includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php 
b/includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php
index 9b987fb..9221f61 100644
--- a/includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php
+++ b/includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php
@@ -142,7 +142,7 @@
                } else {
                        $message = wfMessage( 
'wbqc-violation-message-target-required-claim' );
                        $message->rawParams(
-                               
$this->constraintParameterRenderer->formatItemId( $targetEntityId, 
ConstraintParameterRenderer::ROLE_SUBJECT ),
+                               
$this->constraintParameterRenderer->formatEntityId( $targetEntityId, 
ConstraintParameterRenderer::ROLE_SUBJECT ),
                                
$this->constraintParameterRenderer->formatEntityId( $propertyId, 
ConstraintParameterRenderer::ROLE_PREDICATE )
                        );
                        $message->numParams( count( $items ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/365087
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic662eb7f7c46e278e4543051ccc9496042f0f759
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to