Not able to extend from MultiSelectCFType;

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2014

Hi,

I am writing a plugin which creates a customfield type that will extend MultiSelectCFType.

However I get a compilation error for (IDE says cant be resolved):

import com.atlassian.jira.issue.customfields.impl.MultiSelectCFType;

Strangley enough I am able to use this:

import com.atlassian.jira.issue.customfields.impl.GenericTextCFType;

According to Atlassians API reference the MultiSelectCFType should also be in the same package as GenericTextCFType.

So What could be causing this error?

1 answer

1 accepted

1 vote
Answer accepted
Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2014

This class is in jira-core, so add dependency on jira-core:

<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-core</artifactId>
			<version>${jira.version}</version>
			<scope>provided</scope>
		</dependency>

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2014

Hi @Boris.

Thanks for your answer. It resolves the error.

Just a quick question:

The pom.xml file autgenerated by Atlassians SDK mentions:

<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. This is not normally recommended, ......-->

Im curious as to why com.atlassian.jira.issue.customfields.impl.MultiSelectCFType

would not be in the "sanctioned API"?

For the time being I've added the jira-core and regenerating the eclipse project,

Would the size of my plugin also increase after adding the jira-core dependency?

Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2014

Don't worry about this comment, just have in mind that classes in the jira-core are nt guaranteed to be compatible between jira versions.

The size will not increase as this is provided dependency.

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2014

Ok. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events