Fix navigation from deployments list to a job page
What does this MR do and why?
The MR fixes the bug when navigating to a job page from the deployments list leads to a 500 error in case the job is a bridge waiting for approval. This happens because bridge jobs don't have a job page. As a workaround, we redirect the user to the related downstream pipeline, but bridge jobs waiting for approval don't have those either.
This MR fixes the issue by updating the redirect to check if the downstream pipeline exists and navigating to the deployment pipeline otherwise.
Within the MR, we update the UI to explicitly communicate where the link leads. We added the pipeline link to the deployments table next to the job link.
- if the job has a job page, it will show the link to the job page and the link to a related pipeline
- if the job page is not available (bridge job), the job name won't have a link
- if the job has a downstream pipeline, the pipeline icon will navigate to its page
- if the job has no downstream pipeline, the pipeline icon will navigate to the deployment pipeline page.
References
Screenshots or screen recordings
| Before | After | 
|---|---|
| Screen_Recording_2025-05-12_at_20.34.02 | Screen_Recording_2025-05-14_at_19.08.11 | 
|  |  | 
|  |  | 
|  |  | 
How to set up and validate locally
- Visit Project -> Environments and create an environment called production.
- Visit Project -> Settings -> CI/CD -> protected environments and protect this environment.
- Create an upstream pipeline config as follows:
stages:          # List of stages for jobs, and their order of execution
  - build
  - test
  - deploy
build-job:       # This job runs in the build stage, which runs first.
  stage: build
  script:
    - echo "Compiling the code..."
    - echo "Compile complete."
trigger_job:
  trigger:
    include:
      - local: child-pipeline.yml
  environment: production- Create the child pipeline config as follows:
downstream-job:       # This job runs in the build stage, which runs first.
  stage: test
  script:
    - echo "Compiling the code..."
    - echo "Compile complete."- Navigate to the protected environment and verify the deployments list.
- The manual job should be present with no job link, but a link to the deployment pipeline
- Once approved and triggered, the manual job should be present with no job link and a link to the downstream pipeline
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #457282 (closed)