Fix pipeline complete condition and include manual state
What does this MR do and why?
This MR fixes a bug with checking the pipeline status which was introduced in !147710 (merged). This MR also adds the manual state which is behind the feature flag introduced in #439691 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.