How to migrate to version 2.x
Summary
Version 2 of the add-on uses a different plugin key. This means both version 1 and version 2 add-ons can be installed at the same time. However, because of this refactoring, existing post functions using version 1 of this add-on will NOT automatically migrate to the version 2. This describes the options for migrating the configuration.
Details
There are number of ways to migrate - choose one method that works best for you:
Define the post functions again
- Remove old post functions
- Add new post functions
Save and restore your workflow(s) using XML using standard JIRA functions for workflows
This needs to be done for each workflow that uses the create function
- Save existing workflow
- Edit the saved XML using any editor
- Find: com.telenor.jira.plugin.workflow.createsubissue.CreateSubIssueFunction
- Replace: org.swift.jira.cot.functions.CreateSubIssueFunction
- Find: "field.subIssueAssignTo"
- Replace: "field.subIssueAssignee"
- Find: "field.subIssueOverview"
- Replace: "field.subIssueSummary"
- Rename existing workflow and scheme
- Import modified workflow
- Re-associate new workflow with workflow scheme
- Re-associate project to new scheme
Direct JIRA database update
This should be tested on a test instance and you should backup your database first.
- Stop JIRA
Run this sql against your JIRA database
SQL to migrate from version 1 to version 2update jiraworkflows set descriptor = replace(descriptor, '<arg name="class.name">com.telenor.jira.plugin.workflow.createsubissue.CreateSubIssueFunction</arg>', '<arg name="class.name">org.swift.jira.cot.functions.CreateSubIssueFunction</arg>') where descriptor like '%<arg name="class.name">com.telenor.jira.plugin.workflow.createsubissue.CreateSubIssueFunction</arg>%'; update jiraworkflows set descriptor = replace(descriptor, '<arg name="field.subIssueAssignTo">', '<arg name="field.subIssueAssignee">') where descriptor like '%<arg name="field.subIssueAssignTo">%'; update jiraworkflows set descriptor = replace(descriptor, '<arg name="field.subIssueOverview">', '<arg name="field.subIssueSummary">') where descriptor like '%<arg name="field.subIssueOverview">%';
- Restart JIRA
- Verify function definitions are accurate and new field defaults are appropriate