IALERT-3912: fix issue links for Jira Cloud #2705
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to fix the issues with links the old inline format of creating links like standard markup does not work for Jira Cloud. The content for descriptions and comments must follow the Atlassian Document Format now for Jira Cloud.
The old way of creating links like this
[text](http://link.example.com)no longer works.In order to fix the issue we must produce an Atlassian Document Format object, which is already implemented in the int-jira-common library, for the description and comments.
This MR has a number of changes to do that. This issue highlights that the way in which data is formatted for the various channels is a design that is overly complex with too many layers of abstraction that needs to be re-designed in the future.
In order to isolate the fix to just Jira Cloud a number of classes that exist in the
com.blackduck.integration.alert.channel.jira.cloud.convertpackage are copies of the original classes in theapi-channel-issue-trackersub project. These classes have the code changes to produce a model that represents the Atlassian Document Format for issues.The main class that actually creates the Atlassian Document Format model is the class:
AtlassianDocumentBuilder. This is a stateful class that allows more text and paragraph nodes to be added to the document model in order to display the content that way it used to appear using the stringbuilder approach. The build methods will build the primary document and build any additional documents that are used to create comments on the issue.Also note the
JiraCloudIssueCreator,JiraCloudIssueCommenter, andJiraCloudIssueTransitionerneeded to be changed in order to pass in the model object that represents the Atlassian Document Format.