Uploaded image for project: 'JIRA Server (including JIRA Core)'
  1. JIRA Server (including JIRA Core)
  2. JRASERVER-8763

Workflow migration 3.0.3 to 3.4.x with non JIRA View

    Details

      Description

      With JIRA 3.0.3, I have implemented in plugin an override classes of WorkflowTransitionUtil in order to provide a new View useable in our Workflow.

      Component déclaration in Plugin

      <component key="WorkflowTransitionUtilAddOnImpl" name="WorkflowTransitionUtilAddOnImpl" class="com.atlassian.jira.workflow.WorkflowTransitionUtilAddOnImpl" >
          	<interface>com.atlassian.jira.workflow.WorkflowTransitionUtilImpl</interface>
      </component>
      

      New implementation of WorkflowTransitionUtil

      public class WorkflowTransitionUtilAddOnImpl extends WorkflowTransitionUtilImpl {
      	...
      	// Available AddOn workflow views
      	public static final String VIEW_COMMENT = "comment";
      	...
      	public boolean requiresField(String fieldId) {
      		boolean isRequired = false;
      		try {
      			// @TODO requiresField() no more available
      //			isRequired = super.requiresField(fieldId);
      			isRequired = true;
      		} catch (IllegalArgumentException iae) {
      			if (VIEW_COMMENT.equals(getView()))
      			{
      				if (IssueFieldConstants.FIX_FOR_VERSIONS.equals(fieldId) || IssueFieldConstants.ASSIGNEE.equals(fieldId) || IssueFieldConstants.RESOLUTION.equals(fieldId))
      				{
      					isRequired = false;
      				}
      			} else {
      				throw new IllegalArgumentException("Unknown view '" + getView() + "'.");
      			}
      		}
      		return isRequired; 
      	}
      	...
      }
      

      During migration from 3.0.3 to 3.4.x, the com.atlassian.jira.upgrade.tasks.UpgradeTask_Build86 fails as follow ...

      2005-12-09 10:18:27,486 INFO [atlassian.jira.upgrade.UpgradeManagerImpl] Performing Upgrade Task: Updating all workflows with closed status to have the jira.issue.editable=false flag (for backwards compatability)
      2005-12-09 10:18:27,736 ERROR [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: Unknown workflow view 'comment', or cannot find attribute 'jira.fieldscreen.id' for workflow action '711'.
      java.lang.IllegalArgumentException: Unknown workflow view 'comment', or cannot find attribute 'jira.fieldscreen.id' for workflow action '711'.
      	at com.atlassian.jira.workflow.WorkflowActionsBean.getFieldScreenForView(WorkflowActionsBean.java:72)
      	at com.atlassian.jira.workflow.AbstractJiraWorkflow.reset(AbstractJiraWorkflow.java:353)
      	at com.atlassian.jira.workflow.AbstractJiraWorkflow.<init>(AbstractJiraWorkflow.java:34)
      	at com.atlassian.jira.workflow.ConfigurableJiraWorkflow.<init>(ConfigurableJiraWorkflow.java:24)
      	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:156)
      	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflows(OSWorkflowManager.java:53)
      	at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build86.doUpgrade(UpgradeTask_Build86.java:40)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:671)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:567)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:393)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:341)
      	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:301)
      	at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:65)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
      	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
      	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
      	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
      	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:324)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
      

      I supposed that I will have to replce this in-house View with a FieldScreenTab, but to perform that, a successful migraiton is required.

      What is the best way to resolve it :

      • Add the meta properties jira.fieldscreen.id in Workflow with value an existing JIRA View (Solution I will try),
      • Add the future FieldScreen objects (FieldScreen, FieldScreenTab, ...) ... How ?
      • Other solutions to propose ?

      Thks

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last commented:
                11 years, 12 weeks, 6 days ago