Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

UserCFType constructor has changed Edited

Hello!

I have custom field which extends UserCFType :

public class ModifiedByFieldType extends UserCFType {


public ModifiedByFieldType(
@JiraImport CustomFieldValuePersister customFieldValuePersister,
@JiraImport UserConverter userConverter,
@JiraImport GenericConfigManager genericConfigManager,
@JiraImport ApplicationProperties applicationProperties,
@JiraImport JiraAuthenticationContext authenticationContext,
@JiraImport FieldConfigSchemeManager fieldConfigSchemeManager,
@JiraImport ProjectManager projectManager,
@JiraImport SoyTemplateRendererProvider soyTemplateRendererProvider,
@JiraImport GroupManager groupManager,
@JiraImport ProjectRoleManager projectRoleManager,
@JiraImport UserSearchService searchService,
@JiraImport JiraBaseUrls jiraBaseUrls,
@JiraImport UserHistoryManager userHistoryManager,
@JiraImport UserFilterManager userFilterManager,
@JiraImport I18nHelper i18nHelper,
@JiraImport UserBeanFactory userBeanFactor,
@JiraImport FeatureManager featureManager) {


super(customFieldValuePersister, userConverter, genericConfigManager, applicationProperties, authenticationContext, fieldConfigSchemeManager, projectManager, soyTemplateRendererProvider, groupManager, projectRoleManager, searchService, jiraBaseUrls, userHistoryManager, userFilterManager, i18nHelper, userBeanFactor, featureManager);


}

 (code sample for JIRA version > 8.11)

atlassian-plugin.xml:

 

<customfield-type name="Modify By Field"
i18n-name-key="modify-by-field.name"
key="modifybyfield"
class="com.systems.plugins.custom.type.ModifiedByFieldType">
<description>NJII Integrity Modified By User Name</description>
<resource name="view" type="velocity" location="templates/plugins/fields/view/view-basictext.vm"/>
<resource name="edit" type="velocity" location="/templates/service-field-type.template.vm"/>
<resource name="xml" type="velocity" location="templates/plugins/fields/xml/xml-basictext.vm"/>
</customfield-type>

 

Constructor of class com.atlassian.jira.issue.customfields.impl.UserCFType has changed from Jira

version 8.11 (https://docs.atlassian.com/software/jira/docs/api/8.11.0/com/atlassian/jira/issue/customfields/impl/UserCFType.html )

to 8.12

(https://docs.atlassian.com/software/jira/docs/api/8.12.0/com/atlassian/jira/issue/customfields/impl/UserCFType.html)

now it has additional input parameter - FeatureManager.

So, my custom field not going to work for version < 8.12, because of wrong number of input parameters for constructor.

My plugin needs to support  JIRA version below and above 8.11.

Please help!

 

Cheers.

 

1 answer

1 accepted

0 votes
Answer accepted

Hi @KONSTANTIN I think I saw a presentation where developers used https://developer.atlassian.com/server/framework/atlassian-sdk/spring-java-config/ to have "multi-version" products. I think it was this one: https://www.youtube.com/watch?v=0_lSrVw3TRk

Hi @Martin Bayer _MoroSystems_ s_r_o__   

Thank you for reply. 

I'm going to use bridge (suggested in atlassian video guide) to manage component for different versions. 

Thanks for help!

Hi @KONSTANTIN great. I never found a time to test this approach. Is your project private? Or can you share your experience with this publicly? You can always write an article on community and become famous :) for example here... https://community.atlassian.com/t5/Marketplace-Apps-Integrations/bg-p/atlassian-marketplace-articles

jimmy fallon lol GIF by The Tonight Show Starring Jimmy Fallon

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you