Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-25049

Deleting a filter in use by a Roadmap Plan breaks the Plan

    XMLWordPrintable

Details

    Description

      Issue Summary

      If a Roadmap Plan uses a filter that's been deleted, the Plan breaks and it isn't possible to fix without direct DB intervention.

      Steps to Reproduce

      1. Create two filters
      2. Create a Plan that uses both filters
      3. See that it's possible to select custom date fields for "target start" and "end"
      4. Delete one of the filters
      5. Back to the Plan config, it won't be possible to use custom date fields for scheduling anymore
      6. Edit the Plan Issue Source and the problem persists

      Expected Results

      We'd expect deleted filters to be ignored by Advanced Roadmaps or that saving the issue source would delete the invalid filters in AO_D9132D_ISSUE_SOURCE.

      Actual Results

      1. Advanced Roadmaps isn't able to determine which custom date fields are usable in the Plan for scheduling
      2. Saving the Plan's Issue Source configuration doesn't cleanup AO_D9132D_ISSUE_SOURCE

      Workaround

      1) Create a new Plan

      This issue corrupts the Plan, so a new Plan with similar config won't be affected since the deleted filter won't be selectable anymore.

      2) Cleanup the affected Plan's config

      Run the following query to identify all deleted filters still in use by Roadmap Plans:

      select s."SOURCE_VALUE" from "AO_D9132D_ISSUE_SOURCE" s left join searchrequest f on f.id = CAST(s."SOURCE_VALUE" as integer) where s."SOURCE_TYPE" = 'Filter' and f.id is null;

      For each value returned, replace it in the three deletes below (99999):

      delete from "AO_D9132D_SCENARIO_TEAM" where "ISSUE_SOURCE_ID" in (select "ID" from "AO_D9132D_ISSUE_SOURCE" where "SOURCE_TYPE" = 'Filter' and "SOURCE_VALUE" = '99999');
      delete from "AO_D9132D_PLANTEAM" where "ISSUE_SOURCE_ID" in (select "ID" from "AO_D9132D_ISSUE_SOURCE" where "SOURCE_TYPE" = 'Filter' and "SOURCE_VALUE" = '99999');
      delete from "AO_D9132D_ISSUE_SOURCE" where "SOURCE_TYPE" = 'Filter' and "SOURCE_VALUE" = '99999';
      

      The Plan will work as expected then. No need to restart or reindex Jira.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmartinez3@atlassian.com Rodrigo Martinez
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: