How start with creating plugins ?

jan.dolezal August 16, 2012

Hi,

im new here on this "forum".I created some question about customfield, and after some reading i realized, there will be needed to learn some about plugin creation. I am mainly PHP and JavaScript writer.

I started to read https://developer.atlassian.com/display/DOCS/Introduction+to+the+Atlassian+Plugin+SDK , i was able to install eclipse, configure it, create simple Plugin to make some URL link on top of the page and test it.

But then i tried to make my own custom field. I created custom field module, but then i am lost. I am completely lost in class files, i dont know what to write there.

Documentation started to be really hard for me to understand after that point from modules. I need to create custom field with some ajax checking and then creating windows or something.

Guys, what is best start (book, blow, web,..) to with ? Something step by step, easy to understand. I want to teach how to develop plugins into Jira.

Thanks

2 answers

0 votes
Jobin Kuruvilla [Adaptavist]
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.
August 16, 2012

There is something I put together at http://www.j-tricks.com/1/post/2010/08/custom-fields.html. There is a book that follows this style named JIRA Development Cookbook. There is another one Matt named Practical JIRA plugins.

None of this will be the bible but you should get some starting points!

jan.dolezal August 16, 2012

It looks like everything on web is for old Jira. Im using 5.0. That custom field just not will appear in create issue. .

Jobin Kuruvilla [Adaptavist]
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.
August 16, 2012

Yes, you will have to modify bit and pieces like few APIs. But the concept is same. I thought you are looking for concept and not the exact code!

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2012

WEll, for custom fields, the link near the bottom of the "custom field module" leads to https://developer.atlassian.com/display/JIRADEV/How+to+create+a+new+Custom+Field+Type which will give you a couple of simple working custom field plugins. There's not much I would add to that page - plenty of hints and tips from experience, but the things I'd say are specific to what I've been trying to do in my custom fields, and many of them are better learned by doing.

Have a read of that doc and see if you can get one of the plugins there to run ok, then you can learn by example - try amending them to see if you can make the behaviour change in a way you want.

jan.dolezal August 16, 2012

Thank you for response. I read it already, but when they started to speak about writing .class files, i was lost.

Against start (where they described everything why/how), here they are just saying, just put these lines in .class.. . Great.. but how the hell can i know what it is doing ? What are these object for ? What to include to plugin work ?

I tried to publish my plugin with custom field. It is in plugin manager visible, also in custom fields. But when ill put that into screen and cant see this custom field in create issue screen...

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2012

You need to read the code to understand what it's doing, that's the point of the examples.

Jobin's links will help you with general principles and structure, but you're going to need to learn to understand and write code.

Don't get hung up on the details though, when you're reading the example code. Start by concentrating on the bits that are clearly doing something you can grasp. On that page, an excellent starting point is the block of code that starts "publicObject getValueFromIssue(CustomField field, Issue issue)"

This is code which pulls information out of Jira and pushes it towards the user on-screen. Most of that process is standardised and you don't need to worry about it yet, the important thing is "getValueFromIssue" answers the question "what do I show to the user when Jira is trying to show them "field" for "issue".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events