From 9bf1479d33cbf7db7725784f601d1b7c3b3f7334 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 26 Jun 2019 10:10:51 +0100 Subject: [PATCH] fix milestone counting bug --- no_label_milestone.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/no_label_milestone.php b/no_label_milestone.php index 808deb9..3029fd5 100644 --- a/no_label_milestone.php +++ b/no_label_milestone.php @@ -39,9 +39,9 @@ $callback=function($issue) use ($nolabelLabel,$nomilestoneLabel){ $issue->removeLabel( $nolabelLabel ); } //do the no-milestone thing - if( count($issue->getData()->milestone)==0 && !$issue->hasLabel($nomilestoneLabel) ){ + if( !$issue->getData()->milestone && !$issue->hasLabel($nomilestoneLabel) ){ $issue->addLabel( $nomilestoneLabel ); - }elseif( count($issue->getData()->milestone)>0 && $issue->hasLabel($nomilestoneLabel) ){ + }elseif( $issue->getData()->milestone && $issue->hasLabel($nomilestoneLabel) ){ $issue->removeLabel( $nomilestoneLabel ); } };