I am currently trying to develop a plugin that extends the capabilities of linking to issues.
I am running JIRA 5.2.5 and so I do see that I can link to other JIRA issues, a Confluence page, or a page via URL.
I would like to extend this to allow links to another issue management tool we use internally that I can interface with via REST.
What action/class/what-have-you do I need to extend/overwrite/etc in order to do this? I've thought up two ways that might work, but have no idea how to implement:
I'm currently exploring overwriting the "issue.IssuePicker" action and extending the IssuePicker class (per this tutorial and this older tutorial), but am thinking this is the wrong approach.
Community moderators have prevented the ability to post new answers.
Still haven't figured out why I get that ClassCastException, although I found a work-around by creating a new project with the same code.
Thankfully, someone else has created an example for extending the Link to Issue dialog:
https://bitbucket.org/shamid/jira-weather-link
Using this as an example, I am now able to extend the capabilities of the Link to Issue dialog.
I have been trying the same thing today but i am getting errors in IDE for import com.atlassian.jira.web.action.issue.AbstractIssueLinkAction; .
The steps i have followed are .
The error in IDE is due to class missing in my build path .
Can some one please help me resolve this issue. I am not able to compile this code .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't copy the java files, just open the project. At least in Netbeans I was able to do it with no problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am currently receiving a "java.lang.ClassCastException: com.mycompany.jira.mylink cannot be cast to webwork.action.Action" with the following code:
//mylink.java package com.mycompany.jira; import com.atlassian.jira.web.action.JiraWebActionSupport; public class mylink extends JiraWebActionSupport { public mylink() { } }
<!-- atlassian-plugin.xml --> <atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2"> <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}" /> </plugin-info> <web-item key="attach-link" section="create-issue-link-types" weight="100"> <label key="My Link"/> <link linkId="com.mycompany.jira.mylink">/secure/mylink?id=${issueId}</link> </web-item> <webwork1 key="mylink" name="My Link" class="java.lang.Object"> <actions> <action name="com.mycompany.jira.mylink" alias="mylink"> <view name="success">/templates/success.vm</view> <view name="error">/templates/error.vm</view> <view name="input">/templates/input.vm</view> </action> </actions> </webwork1> </atlassian-plugin>
The vm files are all simple HTML files:
<html> <body> text </body> </html>
What am I doing wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right now, I'm exploring the second bullet point: Add another tab
Following this tutorial, I was able to add another tab called "My Link" to the "Link Issues" dialog:
But, when I click on it, it gives me the error "The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation. Close this dialog and press refresh in your browser"
My atlassian-plugin.xml looks like this:
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2"> <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}" /> </plugin-info> <web-item key="attach-link" section="create-issue-link-types" weight="100"> <label key="My Link"/> <link linkId="attach-link">/secure/mylink!default.jspa?id=${issueId}</link> </web-item> </atlassian-plugin>
"mylink.jsp" is a copy/rename of the "LinkExistingIssue.jsp" located in my "jira\webapp\secure\views\issue" directory. I've tried the following to get any file to show up with this link:
All of which give me that error.
Ideally, I'd want to use a vm file instead and ship it with my plugin. I have not had luck with this approach either, though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hijack the existing JIRA Issues text field
Add another tab
I'm currently exploring overwriting the "issue.IssuePicker" action and extending the IssuePicker class
If you are looking to hijack/edit the existing function, you will need to edit the source code.
Another way is to create your own plugin modules that will do this. You can create a webitem that opens a new AUI dialog that does the the searching for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.