Associating Workflow For 'Error rendering WebPanel (workflows/workflows.vm)' Error
Symptoms
When the error "Error rendering WebPanel (workflows/workflows.vm)" is thrown it is a product of this KB: Exception When Viewing 'Workflow Schemes' Via Project Administration. In JIRA 5.x, the Project Workflow page is not editable, hence you cannot associate a new workflow into the project.
Error rendering WebPanel (workflows/workflows.vm): org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in class com.atlassian.jira.web.component.IssueConstantWebComponent threw exception java.lang.NullPointerException at workflows/workflows.vm[line 136, column 65]
Diagnosis
User will not be able to change the workflow association due to the error. This only happens in JIRA 5.x.
Resolution
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
- Perform the workaround that was given in this KB first: Exception When Viewing 'Workflow Schemes' Via Project Administration
- Copy the broken workflow and associate them with the correct status
Create a new Workflow Scheme and associate that scheme with the workflow created from step number 2
Stop JIRA
Run the following query in your database, and record the ID retrieved:
SELECT * FROM workflowscheme WHERE name LIKE '%workflowname%';
Replace
workflowname
with the workflow you created on step number 3Run the following query to check what is the workflow scheme associated with the project
SELECT * FROM nodeassociation WHERE source_node_id = (SELECT id FROM project WHERE pkey LIKE '%TEST%');
Replace
TEST
with the project key of the affected projectAfter confirming, update the workflow association with the workflow scheme ID obtained from step number 5
UPDATE nodeassociation SET sink_node_id = 10000 WHERE sink_node_entity LIKE '%WorkflowScheme' AND source_node_id = (SELECT id FROM project WHERE pkey LIKE '%TEST%');
Replace the
sink_node_id
with the id obtained from the result of step number 6, andpkey
of the project that is affected- Restart JIRA
- Run Integrity Checker Tool, to confirm if there is any inconsistencies
- Navigate to the Project Workflows page to check whether you could change the workflow association now