Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Products
  • Jira
  • Questions
  • How to override a public function of com.atlassian.jira.web.action.admin.customfields.EditCustomFieldOptions in a JIRA customField plugin

How to override a public function of com.atlassian.jira.web.action.admin.customfields.EditCustomFieldOptions in a JIRA customField plugin

Kepio
Contributor
March 20, 2012

The isCascadingSelect() public function in com.atlassian.jira.web.action.admin.customfields.EditCustomFieldOptions is checking a custom field type is an instance of CascadingSelectCFType (a native JIRA custom field type).

I am writing a custom Field that does not ( and cannot) extend CascadingSelectCFType but is extremely similar ( it's a multi cascading select instead of simple cascading select) - as such, i'd like to re-define the isCascadingSelect function to check for either CascadingSelectCFType or MultipleCascadingSelectCFType - is that possible?

If not, what would be the best approach?

1 answer

1 accepted

0 votes
Answer accepted
Kepio
Contributor
March 20, 2012

I figured out the approach by browsing the source code of https://studio.plugins.atlassian.com/svn/JDVP/tags/database-values-plugin-1.3/

The atlassian-plugin.xml definition pretty much gives the answer :

<webwork1 key="multiple-cascading-select-cf-type-configuration" name="Multiple Options Cascading Select Field Configuration">
		<description>Configuration for the Multiple Options Cascading Select Field Field.</description>
		<actions>
		    <action name="com.company.plugins.jira.customfields.config.EditMultiCascadingCustomFieldOptions" alias="EditMultiCascadingCustomFieldOptions" roles-required="admin">
        		<view name="input">/secure/admin/views/customfields/editcustomfieldoptions.jsp</view>
        		<view name="error">/secure/admin/views/customfields/editcustomfieldoptions.jsp</view>
        		<view name="confirmdelete">/secure/admin/views/customfields/deletecustomfieldoption.jsp</view>
        		<view name="edit">/secure/admin/views/customfields/editcustomfieldoptions.jsp</view>

        		<command name="configureOption" alias="ConfigureCustomFieldOptions">
            		<view name="error">/secure/admin/views/customfields/editcustomfieldoptions.jsp</view>
        		</command>
    		</action>
		</actions>
	</webwork1>

From there- you can:

  • modify the jsp file EditMultiCascadingCustomFieldOptions extends EditCustomFieldOptions and overwrite my public function
  • modify the templates directly if need be - in my case, I re-used the native ones

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team ’25 europe, early bird extension, conference discount, barcelona, hybrid event, AI teamwork, early bird pass, digital access, collaboration conference, atlassian events, register now, developer conference

1 week left to save on your Team '25 Europe pass

Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.

Learn more
AUG Leaders

Atlassian Community Events