Code Monkey home page Code Monkey logo

Comments (10)

princenyeche avatar princenyeche commented on June 26, 2024

@smaritem To use a Bearer token, you will need to call the token_session() method.

from jiraone import LOGIN, endpoint

# previous statement
# You must declare a base_url
url = "https://yourinstance.atlassian.net"
token = "GHxxxxxPPPxx" # Your bearer token
# First assign a base_url to the attribute below
LOGIN.base_url = url
# You need to pass the token variable to a keyword argument called `sess`
LOGIN.token_session(sess=token)
# Afterwards you can make calls such as
data = LOGIN.get(endpoint.myself())
print(data.status_code)
# result
# 200

from jiraone.

smaritem avatar smaritem commented on June 26, 2024

@princenyeche , thanks for the reply

I am getting an unknow error with the code PROJECT.change_log(jql=jql) , where jql = r'project = "project name" '

image001

from jiraone.

princenyeche avatar princenyeche commented on June 26, 2024

You should not use a raw string identifier r for your strings.
Do this ✅

jql = 'project = "project name"'

Don't do this ❌

jql = r'project = "project name" '

from jiraone.

princenyeche avatar princenyeche commented on June 26, 2024

@smaritem Let me know if you got it working for yourself?

from jiraone.

smaritem avatar smaritem commented on June 26, 2024

@princenyeche

I tried it, but still dont work. I am getting an empty csv file
running

I also tried
load = LOGIN.get(endpoint.get_all_priorities() )

I am getting the repsonse 200, but the text doesnt contain the data.
responseText

How can I get the history in the changelog.csv file using the rest api URL, /rest/api/... ?

from jiraone.

princenyeche avatar princenyeche commented on June 26, 2024

@smaritem
From your screenshot, it doesn't seem that there's any history from that JQL. The usual message on screen should show the issues where the history is being extracted from
e.g

Extracting issue histories...
Getting history from IP-132

So if the CSV file is empty, does it include any headers? If yes, there is probably no history of the issues being queried. Probably what you can do is simply test it on a single issue history instead.
e.g

jql = "key = ABC-123"

from jiraone.

smaritem avatar smaritem commented on June 26, 2024

@princenyeche that jql gives back more than 10000 issues, and most of them do have histories

Is there an alternative to PROJECT.change_log(jql=jql) , where jql = 'project = "project name" '
Or how can we use it witht the rest API url https://server_name.net/rest/api/..?

from jiraone.

princenyeche avatar princenyeche commented on June 26, 2024

@smaritem Your base_url must point to your instance URL, so if you're a server, let it be to the API endpoint that is available. e.g. https://server_name.net just the base_url only. Also, if it's on a server then you might want to add LOGIN.api = False before calling the authentication method.

LOGIN.api = False
# before calling token_session method?
LOGIN.token_session(sess=token)

from jiraone.

smaritem avatar smaritem commented on June 26, 2024

@princenyeche ,
thanks, it works with
LOGIN.api = False

from jiraone.

princenyeche avatar princenyeche commented on June 26, 2024

Great.

from jiraone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.