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

Are there new updated tutorials for the latest Jira version?

Jude B June 28, 2016

All of the Atlassian Tutorials are OUT OF DATE.  The current tutorials here (https://developer.atlassian.com/docs/getting-started/learn-the-development-platform-by-example) have either deprecated methods, incorrect component-import elements or the steps in the tutorial are wrong.  I have checked Bitbucket for the latest code and it dates back to 2014.  Atlassian, PLEASE POINT US NEWBIES TO A DIRECTION THAT CAN HELP! 

Using 6.2.6 SDK - Intellij for the IDEA - JIRA version 6.4

I have gotten as far as the Control access with SAL and found out that the component-import statements are no longer relevant.  I am now using the @ComponentImport within the MyPluginServlet.java file based on Unsatisfied dependency of type UserManager, LoginUriProvider, TemplateRenderer.  After building and starting the localhost, my adminUI plugin is disabled and when I go to http://localhost:2990/jira/plugins/servlet/test I get a 404 like this Error 404.

Being new to this, I can't find many places where I can get help.

Thank you in advance!

ERROR LOGS:

ERROR      [plugin.osgi.factory.OsgiPluginInstalledHelper] Cannot determine required plugins, cannot resolve bundle 'com.atlassian.plugins.tutorial.refapp.adminUI'

ERROR      [plugin.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.atlassian.plugins.tutorial.refapp.adminUI' : Unresolved constraint in bundle com.atlassian.plugins.tutorial.refapp.adminUI [170]: Unable to resolve 170.0: missing requirement [170.0] package; (package=com.atlassian.plugin.spring.scanner.annotation.imports).  This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Roman Samorodov
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 1, 2016

Hi all!

I fixed all tutorials. Here is my answer including modified code and comments.

1 vote
Petar Petrov (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.
June 28, 2016

You can still use component-import statements perfectly fine. These are two alternative approaches for defining the dependencies of your plugin - either by using component-import and the ComponentAccessor class or via dependency injection and the Atlassian spring scanner (which you have apparently used). They affect how the OSGi manifest is being built and how your code is transformed into a JIRA plugin. The latter of the two options is very well documented here. Most probably you are missing the spring scanner dependency - read the documentation and make sure you read the docs for the proper major version (1.x or 2.). If you are not familiar with OSGi or Spring it will probably be easier to start with component-import.

0 votes
Tukaram Bhukya July 6, 2016

Hi , I also facing same problem . We are using Atlas sdk version 7.1.8 .

I try to implement new plugin as mentioned in below url but its based on JIRA 6.0

https://developer.atlassian.com/jiradev/jira-platform/guides/issues/tutorial-adding-content-to-the-jira-view-issue-page

Some how I'm able to compile code and run it but after login JIRA plugin is grayed and I'm able to make it enabled.

Here is my modified code

 

package com.example.plugins.tutorial.api;
import com.atlassian.crowd.embedded.api.User;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.plugin.webfragment.contextproviders.AbstractJiraContextProvider;
import com.atlassian.jira.plugin.webfragment.model.JiraHelper;
import com.atlassian.jira.user.ApplicationUser;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
public class DueDateIndicator extends AbstractJiraContextProvider
{
    private static final int MILLIS_IN_DAY = 24 * 60 * 60 * 1000;
   // @Override
    public Map getContextMap(User user, JiraHelper jiraHelper) {
        Map contextMap = new HashMap();
        Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");
        Timestamp dueDate = currentIssue.getDueDate();
        if (dueDate != null)
        {
            int currentTimeInDays = (int) (System.currentTimeMillis() / MILLIS_IN_DAY);
            int dueDateTimeInDays = (int) (dueDate.getTime() / MILLIS_IN_DAY);
            int daysAwayFromDueDateCalc = dueDateTimeInDays - currentTimeInDays + 1;
            contextMap.put("daysAwayFromDueDate", daysAwayFromDueDateCalc);
        }
        return contextMap;
    }
 @Override
 public  Map getContextMap(ApplicationUser arg0, JiraHelper arg1) {
 // TODO Auto-generated method stub
 return null;
 }
}
Please help me , is there anything wrong with this code.
Please let us know , is there any new tutorial available for sdk JIRA 7.1.8 to develop new plugin?
Roman Samorodov
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.
July 22, 2016

All tutorials are out of date. So sad...

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events