There are no valid example for creating a custom field plugin for Jira v 7.x

Hi,

I have followed your tutorial

https://developer.atlassian.com/jiradev/jira-platform/guides/fields/tutorial-custom-fields-in-jira

To develop a custom field plugin.

It does not work anymore presumably because this was for an earlier version of Jira.

Errors include things such as getStringFromSIngularObject is no longer in AbstractSingleFieldType so @Override is not valid.

The end result is that I can get it to compile without errors, and the plugin is shown as enabled when doing atlas-run, but the custom field never appears when I go to select "Add Custom Field", and select "Advanced".

 

Do you have a working version of some code?

 

1 answer

I agree that the add-on tutorials could do with a refresh. Not sure if there are any plans to do so. My O'Reilly Practical JIRA Plugins (example at https://bitbucket.org/mdoar/practical-jira-plugins) could also do with a refresh :(

 

Hi Matt,

Yes I have been referencing your book too. As you say, that's out of date too and doesn't work.

I wonder how you are now supposed to write a custom field plugin now that Atlassian doesn't document how to!?

Best alternative is to look at the source for the standard custom fields that come with JIRA. It's what I did to write that book. And log a request for an updated tutorial at https://developer.atlassian.com/help#requests

Thats not so simple!

I went to the page to download the source (I have the cheapest license) and it does not provide a link to the source, it only suggests I contact Atlassian.

So, I have had to contact them via yet another support page.

I thought they were meant to monitor these pages but given their lack of response that doesn't seem to be the case.

So I now have the source.

I have the lastest version of the Plugin SDK: 6.2.14

Have taken the code from GenericTextCFType and pasted the code into my own plugin module, replacing the class name with my own (as a "test").

After fixing some imports errors, the errors that I get is with many of the functions which have been set to @Override but the functions do not exist in any superclass.

The functions that are erroing in this way are: getSingularObjectFromString, compare, getProjectImporter, getFieldTypeInfo, getJsonSchema and getJsonFromIssue, getRestFieldOperation.

Anybody any ideas?

Ah, so fixed that error which I'd had before but forgot: https://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods


So it does all compile now but still does not show up in the "Select a Field Type" menu on Jira even though I can see that the plugin is enabled.


I wonder if I am missing a step - all these existing fields have descriptions of each field whcih I have not entered on mine.
i.e. "Number Field - A custom field that stores and validates numeric (floating point) input.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 05, 2018 in Jira Software

Jack Graves: Real Ale enthusiast with a knack for Jira Software implementation

@Jack Graves [AC] first caught our eye with his incredible breakdown of what, in his opinion, can make or break a Jira software implementation. (Read his thoughts on this thread)! In this follow...

96,855 views 4 14
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you