Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-17864

Plugins with broken "project-operation" modules can prevent other modules project-operations from being loaded

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      The code in question is the following in com.atlassian.jira.bc.project.projectoperation.DefaultProjectOperationManager:

              for (Iterator iterator = projectOperationDescriptors.iterator(); iterator.hasNext();)
              {
                  final ProjectOperationModuleDescriptor descriptor = (ProjectOperationModuleDescriptor) iterator.next();
                  final PluggableProjectOperation pluggableProjectOperation = (PluggableProjectOperation) descriptor.getModule();
      
                  // if a particular operation dies, we don't want it to take out _all_ operations
                  try
                  {
                      if (pluggableProjectOperation != null && pluggableProjectOperation.showOperation(project, user))
                      {
                          ret.add(pluggableProjectOperation);
                      }
                  }
                  catch (Exception e)
                  {
                      log.error("Error loading project operation " + descriptor.getCompleteKey(), e);
                  }
              }
      

      if the descriptor.getModule() fails for any reason no pluggable project operation will be loaded. I suggest this code:

              for (Iterator iterator = projectOperationDescriptors.iterator(); iterator.hasNext();)
              {
                  final ProjectOperationModuleDescriptor descriptor = (ProjectOperationModuleDescriptor) iterator.next();
      
                  // if a particular operation dies, we don't want it to take out _all_ operations
                  try
                  {
                      final PluggableProjectOperation pluggableProjectOperation = (PluggableProjectOperation) descriptor.getModule();
                      if (pluggableProjectOperation != null && pluggableProjectOperation.showOperation(project, user))
                      {
                          ret.add(pluggableProjectOperation);
                      }
                  }
                  catch (Exception e)
                  {
                      log.error("Error loading project operation " + descriptor.getCompleteKey(), e);
                  }
              }
      

      Attachments

        Activity

          People

            bbaker ɹǝʞɐq pɐɹq
            sleberrigaud Samuel Le Berrigaud
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified