@@ -524,23 +524,26 @@ pipeline {
524
524
def status = issue. data. fields. status
525
525
println " Issue Status: ${ status.name} (${ status.id} )"
526
526
527
- // For Issues with Functional reviewer and not validated
528
- if (issue. data. fields. customfield_10105 && status. id != " 10325" ) {
529
- // Ensure the PR is not already marked as changed requested
530
- def lastFuncReviewStatus
531
- for (review in pullRequest. reviews) {
532
- if (review. user == " ironArt3mis" ) {
533
- lastFuncReviewStatus = review. state
527
+ // For Issues with Functional reviewer
528
+ if (issue. data. fields. customfield_10105) {
529
+ // Not validated
530
+ if (status. id != " 10325" ) {
531
+ // Ensure the PR is not already marked as changed requested
532
+ def lastFuncReviewStatus
533
+ for (review in pullRequest. reviews) {
534
+ if (review. user == " ironArt3mis" ) {
535
+ lastFuncReviewStatus = review. state
536
+ }
534
537
}
538
+ // PR already marked as review requested
539
+ if (lastFuncReviewStatus == " CHANGES_REQUESTED" ) {
540
+ echo " This PR is already marked as functional review required"
541
+ return
542
+ }
543
+ pullRequest. review(' REQUEST_CHANGES' , ' Functional review required' )
544
+ } else {
545
+ pullRequest. review(' APPROVE' )
535
546
}
536
- // PR already marked as review requested
537
- if (lastFuncReviewStatus == " CHANGES_REQUESTED" ) {
538
- echo " This PR is already marked as functional review required"
539
- return
540
- }
541
- pullRequest. review(' REQUEST_CHANGES' , ' Functional review required' )
542
- } else {
543
- pullRequest. review(' APPROVE' )
544
547
}
545
548
}
546
549
}
0 commit comments