ADD: check if an issue with the same subject already exist
This commit is contained in:
parent
b6e4b2d6ba
commit
2fb1cb1cd7
@ -263,6 +263,10 @@ sub add
|
|||||||
my $ref = $self->repository->getReference('refs/heads/issues');
|
my $ref = $self->repository->getReference('refs/heads/issues');
|
||||||
my $root = $ref->getTree();
|
my $root = $ref->getTree();
|
||||||
|
|
||||||
|
#check if issue with this subject already exist
|
||||||
|
my $checkIssue=$root->find($issue->subject);
|
||||||
|
die("issue with subject \"" .$issue->subject . "\" already exist") unless !(defined($checkIssue));
|
||||||
|
|
||||||
my $issueTree=$issue->createIssue($self->repository);
|
my $issueTree=$issue->createIssue($self->repository);
|
||||||
|
|
||||||
my $base=$root->find($issue->status);
|
my $base=$root->find($issue->status);
|
||||||
|
Loading…
Reference in New Issue
Block a user