Hello Jonas Kress (WMDE),
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/350806
to review the following change.
Change subject: Don’t parse property parameter as string
......................................................................
Don’t parse property parameter as string
If we don’t tell the constraint parameter parser to treat the parameter
as a string, it turns the parameter into a property ID, which results in
the API returning its label in the detailHTML instead of just its P-ID.
In other words, this results in the following change in the detailHTML:
- property: P569; minimum_quantity: 30; maximum_quantity: 150
+ property: date of birth; minimum_quantity: 30; maximum_quantity: 150
Change-Id: Icc4062aaa951fad69fd424dee60330089630aa11
---
M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
refs/changes/06/350806/1
diff --git a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
index 250be33..ce69ba4 100644
--- a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
+++ b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
@@ -53,7 +53,7 @@
$property = false;
if ( array_key_exists( 'property', $constraintParameters ) ) {
$property = $constraintParameters['property'];
- $parameters['property'] =
$this->constraintParameterParser->parseSingleParameter(
$constraintParameters['property'], true );
+ $parameters['property'] =
$this->constraintParameterParser->parseSingleParameter(
$constraintParameters['property'] );
}
if ( array_key_exists( 'constraint_status',
$constraintParameters ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/350806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc4062aaa951fad69fd424dee60330089630aa11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits