Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-972

Migration screen throws an error when trying to select AR plan

    XMLWordPrintable

Details

    • 32
    • Severity 3 - Minor

    Description

      Issue Summary

      With JCMA version 1.6.6 (and also newer JCMA versions), when the customer is trying to select Advanced roadmap plan in the migration, it throws an error: Error communicating with Server

      Steps to Reproduce

      1. Create a migration plan using JCMA and click on the edit button to select Advanced Roadmap plans, you will see the said error in UI.

      Expected Results

      There should be no errors and JCMA should allow selecting AR plans.

      Actual Results

      • JCMA throws an error: Error communicating with Server:
      • In logs we see below error:
        2022-02-07 14:22:00,772+0000 http-nio-8080-exec-33 url: /rest/migration/latest/advanced-roadmaps/projects; user: panol5 ERROR panol5 862x188344x4 o88p1n 62.220.165.241,2.21.240.61,104.123.68.196,172.31.6.204 /rest/migration/latest/advanced-roadmaps/projects [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
        java.lang.NullPointerException
                at com.atlassian.jira.migration.serverdataextractors.RelatedEntitiesDataReader.getAllProjectIdsReferencedByFilters(RelatedEntitiesDataReader.kt:73)
                at com.atlassian.jira.migration.serverdataextractors.RelatedEntitiesDataReader.getProjectIdsReferencedByBoardsFromPlans(RelatedEntitiesDataReader.kt:59)
                at com.atlassian.jira.migration.serverdataextractors.RelatedEntitiesDataReader.getProjectsFromPlans(RelatedEntitiesDataReader.kt:38)
                at com.atlassian.jira.migration.serverdataextractors.AdvancedRoadmapsDataResource.listProjectsForPlans(AdvancedRoadmapsDataResource.kt:30)

      Workaround

      Workaround 1: Safe but with potentially lot of manual labour

      1. Use the below given select query to find out all the plans that are affected by this issue
        Query: DB query to see the issue source(s) without value(s):
      SELECT "ID", "TITLE" FROM "AO_D9132D_PLAN"
      WHERE "ID" IN (
          SELECT "PLAN_ID" FROM "AO_D9132D_ISSUE_SOURCE"
          WHERE "SOURCE_VALUE" IS NULL
             OR TRIM("SOURCE_VALUE") LIKE ''
             OR ("SOURCE_TYPE" = 'Project' AND "SOURCE_VALUE" NOT IN (SELECT CAST(id AS TEXT) FROM project))
             OR ("SOURCE_TYPE" = 'Filter' AND "SOURCE_VALUE" NOT IN (SELECT CAST(id AS TEXT) FROM searchrequest))
             OR ("SOURCE_TYPE" = 'Board' AND "SOURCE_VALUE" NOT IN (SELECT CAST("AO_60DB71_RAPIDVIEW"."ID" AS TEXT) FROM "AO_60DB71_RAPIDVIEW"))
             OR ("SOURCE_TYPE" = 'Board' AND (SELECT "SAVED_FILTER_ID" NOT IN (SELECT CAST(id AS BIGINT) FROM searchrequest) FROM "AO_60DB71_RAPIDVIEW" WHERE CAST("ID" AS TEXT) = "SOURCE_VALUE"))
      ); 

      In the output from query, "TITLE" is the name of the plan as it appears in UI.

      1. Go to the affected plans one by one
      2. From the Roadmap tab, navigate to Settings  > Configure
      3. Select Issue sources tab
      4. Change the type(s) of the issue source(s) without value(s)
        Follow the video to understand how to remove those empty issue sources in case of any confusion.
        broken_issue_sources_walkthrough.mov
      5.  Select <- Back to plan to save
      6. Once you have removed the empty issue sources from all affected plans, refresh JCMA and retry selecting AR plans on the tasklist page

      Workaround 2: Delete issue sources with invalid values in Database

      1. Use the below given Delete query to delete all the broken issue sources in plans.
      Query:

       

      DELETE FROM "AO_D9132D_PLANTEAM"
      WHERE "ISSUE_SOURCE_ID" IN (
          SELECT "ID" FROM "AO_D9132D_ISSUE_SOURCE"
          WHERE "SOURCE_VALUE" IS NULL
             OR TRIM("SOURCE_VALUE") LIKE ''
             OR ("SOURCE_TYPE" = 'Project' AND "SOURCE_VALUE" NOT IN (SELECT CAST(id AS TEXT) FROM project))
             OR ("SOURCE_TYPE" = 'Filter' AND "SOURCE_VALUE" NOT IN (SELECT CAST(id AS TEXT) FROM searchrequest))
             OR ("SOURCE_TYPE" = 'Board' AND "SOURCE_VALUE" NOT IN (SELECT CAST("AO_60DB71_RAPIDVIEW"."ID" AS TEXT) FROM "AO_60DB71_RAPIDVIEW"))
             OR ("SOURCE_TYPE" = 'Board' AND (SELECT "SAVED_FILTER_ID" NOT IN (SELECT CAST(id AS BIGINT) FROM searchrequest) FROM "AO_60DB71_RAPIDVIEW" WHERE CAST("ID" AS TEXT) = "SOURCE_VALUE"))
      );
      DELETE FROM "AO_D9132D_ISSUE_SOURCE"
      WHERE "SOURCE_VALUE" IS NULL
         OR TRIM("SOURCE_VALUE") LIKE ''
         OR ("SOURCE_TYPE" = 'Project' AND "SOURCE_VALUE" NOT IN (SELECT CAST(id AS TEXT) FROM project))
         OR ("SOURCE_TYPE" = 'Filter' AND "SOURCE_VALUE" NOT IN (SELECT CAST(id AS TEXT) FROM searchrequest))
         OR ("SOURCE_TYPE" = 'Board' AND "SOURCE_VALUE" NOT IN (SELECT CAST("AO_60DB71_RAPIDVIEW"."ID" AS TEXT) FROM "AO_60DB71_RAPIDVIEW"))
         OR ("SOURCE_TYPE" = 'Board' AND (SELECT "SAVED_FILTER_ID" NOT IN (SELECT CAST(id AS BIGINT) FROM searchrequest) FROM "AO_60DB71_RAPIDVIEW" WHERE CAST("ID" AS TEXT) = "SOURCE_VALUE"));

      2. Post executing the query, refresh JCMA and retry selecting AR plans on the tasklist page

       

      Attachments

        Issue Links

          Activity

            People

              ca486cdec977 Ishita Chourasia
              sali@atlassian.com Saif
              Votes:
              5 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: