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

Can I create a jira connect app using python?

I am trying to create and upload a jira connect app,can I do it with my pyhton instead of javascript,procedure with js is mentioned here https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/
please let me know how this can be done

1 answer

1 accepted

1 vote
Answer accepted
Prince Nyeche Community Leader Jan 15, 2021

Hi @Harshit Somani 

Welcome to community! You can be able to use any language to code on Jira Cloud. with Python you can use micro web-framework such as Flask or bottle or web-framework such as Django, the options are endless. You can incorporate bootstrap in your UI design instead of using the ADG3 called Atlaskit if you want. You will need to get more understanding of JWT to start up with though.

@Prince Nyeche  I have created an app using python(flask,flask-ngrok).I am able to load the apps successfully with the links(in my case link is 'https://618834426a38.ngrok.io') generated using flask-ngrok.
But when I am uploading it as an app to jira its showing "Problem accessing the file https://618834426a38.ngrok.io/basic.json" error message,can you please help me with it

Prince Nyeche Community Leader Jan 17, 2021

Hi @Harshit Somani 

Your connect file should be "atlassian-connect.json" where it contains the configuration.

@Prince Nyeche  ,yes  I did it so,my app is normally working in the browser, Screen Shot 2021-01-21 at 10.00.04 AM.pngScreen Shot 2021-01-21 at 10.01.56 AM.pngScreen Shot 2021-01-21 at 10.02.39 AM.pngand when I install the app in jira,it is not even opening,I used ngrok to host the app,Are there any prerequisite steps I have to follow if I use python flaskScreen Shot 2021-01-21 at 10.04.54 AM.png

Prince Nyeche Community Leader Jan 21, 2021

Hey @Harshit Somani 

Can you check on your developer's console to see what type of error that is thrown? that should add context on what's the problem. 

@Prince Nyeche Screen Shot 2021-01-21 at 4.38.05 PM.pngI am not able to figure out the problem

Can you check under the network tab while refreshing the page, to see the error message there?

@Prince Nyeche ,now I am getting the above errors,I used python ngrok flask for deployement,in the begging it gave a warning that "this is a development server do not use it in a production deployment",what can I do

Prince Nyeche Community Leader Jan 21, 2021

Hey @Harshit Somani 

it seems that your ngrok is loading an insecure page, each time you load it up do you get a different url? Can you ensure that it's using https rather than http. 

Prince Nyeche Community Leader Jan 21, 2021

I don't think the production environment has anything to do with it, because the example from Atlassian developer blog does work. so check other factors such as the https thing.

Prince Nyeche Community Leader Jan 24, 2021

Hey @Harshit Somani 

What's the status on this issue, did you happen to rectify it?

@Prince Nyeche ,Sorry for the delay,I was not able to rectify it,I am still stuck there.

you are suggesting to use https instead of http,I think thats what I did,but still can you tell me what is the best way to do it?for your reference I will give you the code,Please let me know the solution

Prince Nyeche Community Leader Jan 25, 2021

Hi @Harshit Somani 

I tested your code from here, while it is able to load via ngrok.io when installed on an instance, it returns 404 when fetching the index page. Most probably due to the tunneling or being embedded on an iframe, which makes the page not to be retrieved. (not fully certain here)

127.0.0.1 - - [25/Jan/2021 21:15:20] "GET /index.html?xdm_e=https%3A%2F%2Fexample.atlassian.net&xdm_c=channel-com.example_test.myapp__hello-world&cp=&xdm_deprecated_addon_key_do_not_use=com.example_test.myapp&lic=none&cv=1001.0.0-SNAPSHOT HTTP/1.1" 404 -

127.0.0.1 - - [25/Jan/2021 21:18:06] "GET / HTTP/1.1" 200 -

I will suggest, you use Heroku instead to host this test app in order to run your test.

@Prince Nyeche 

I'll try and let you know

 

@Prince Nyeche  Thankyou soo much for the help its woking

 

@Prince Nyeche ,does jira accept specical charcters which need to be encoded using utf-8,can you please guide me regarding this

@Prince Nyeche ,I am trying to add asset panel through the same app,but it seems like not working,can you help me with itScreen Shot 2021-01-28 at 12.17.59 AM.pngScreen Shot 2021-01-28 at 12.15.00 AM.png

@Prince Nyeche ,can you help me with this?

Prince Nyeche Community Leader Jan 28, 2021

Hi @Harshit Somani 

Can I confirm with you,  is the app now able to connect using heroku or are you still having the error?

Prince Nyeche Community Leader Jan 28, 2021

@Harshit Somani  glad to hear that. I think what you can do here,  is to create and use an automated user credential (API token and email) via rest to authenticate putting of the asset once clicked.

@Prince Nyeche ,i didnt understand can you please elobarate

Prince Nyeche Community Leader Jan 29, 2021

@Harshit Somani  I meant you should authenticate the request you're posting

@Prince Nyeche ,I am sorry but I think I was not able to explain the problem clearly,I'll do it again
To view the Iframe in the app,this(the image atttached) is how it is prescribed to give commandsScreen Shot 2021-02-01 at 4.02.00 PM.pngScreen Shot 2021-02-01 at 4.03.14 PM.png

@Prince Nyeche  But I wont be able to give the same because I wont access the iframe directly I will access the Iframe from my python flask,so here how can I give the commandsScreen Shot 2021-02-01 at 4.06.03 PM.png

Prince Nyeche Community Leader Feb 01, 2021

Hey @Harshit Somani  

Basically that is just an endpoint. on flask, you can create an endpoint as sample_iframe.html and have query parameter with the url and you can use a variable rule to write out the string you want flask to receive in the function. The url_for function is particularly what you will use this for.

you can also look into of the ways to capture those values by using the args property in the request and then process it. I think you should really explore more on flask in order to know how it can be done.

@Prince Nyeche ,I don't think I have much problem over there,my main problem is when I include the module named 'asset panel' as shown in the above image,all my previously addable assets are getting deleted,if I don't include that module everything is working fine,whats the problem with that module

Prince Nyeche Community Leader Feb 02, 2021

@Harshit Somani I'm not particularly sure why probably you can perform some troubleshooting steps to determine why it happens.

@Prince Nyeche  why is that I am able to display only appkey,originId and not imei,os_version in jira's Iframe,I am able to display all of them in the web but not able to do so in Jira iframe. Screen Shot 2021-02-04 at 12.34.43 AM.pngScreen Shot 2021-02-04 at 12.35.25 AM.pngScreen Shot 2021-02-04 at 12.36.44 AM.pngScreen Shot 2021-02-04 at 12.37.26 AM.pngScreen Shot 2021-02-04 at 12.37.59 AM.pngScreen Shot 2021-02-04 at 12.39.22 AM.png

@Harshit Somani according to the docs for PUT method, it accepts origin being a dict, however I'm not sure if that includes additional fields other than appKey and originId.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

254 views 1 6
Read article

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