예제 #1
0
def main():
    print(__name__)
    login = dict()
    file_name = "login.json"  # use login_example.json with your name/pass
    with open(file_name, "r") as read_file:
        login = json.load(read_file)

    # By default, the client will connect to a Jira instance started from the Atlassian Plugin SDK.
    # See
    # https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK
    # for details.

    jira = JIRA(options={'server': login["server"]},
                basic_auth=(login["username"], login["password"]))

    projects = jira.projects()

    for v in projects:
        print(v)
    props = jira.application_properties()
    print(props)

    # Find all issues reported by the admin
    open_issues = jira.search_issues('assignee=NikolayDupak',
                                     maxResults=100,
                                     expand='changelog',
                                     fields='comment')
    # issues = jira.search_issues("assignee=NikolayDupak")
    # jira.comments(issues)
    # jira.search_issues()
    # a = jira.search_users("NikolayDupak")
    print(open_issues)
    comm = ([
        issue.raw['fields']['comment']['comments'] for issue in open_issues
    ])
    print(comm)
    for text in comm:
        if len(text) != 0:
            # info = json.loads(text[0])
            print(text[0]["body"])
예제 #2
0
# This script shows how to connect to a JIRA instance with a
# username and password over HTTP BASIC authentication.

from collections import Counter
from jira import JIRA

# By default, the client will connect to a JIRA instance started from the Atlassian Plugin SDK.
# See
# https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK
# for details.
jira = JIRA(auth=("admin",
                  "admin"))  # a username/password tuple for cookie auth

# Get the mutable application properties for this server (requires
# jira-system-administrators permission)
props = jira.application_properties()

# Find all issues reported by the admin
issues = jira.search_issues("assignee=admin")

# Find the top three projects containing issues reported by admin
top_three = Counter([issue.fields.project.key
                     for issue in issues]).most_common(3)

# import time; time.sleep(65)  # Fake cookie expiration

issues = jira.search_issues("assignee=admin")
예제 #3
0
파일: basic_auth.py 프로젝트: dualsky/jira
# This script shows how to connect to a JIRA instance with a
# username and password over HTTP BASIC authentication.

from jira import JIRA

# By default, the client will connect to a JIRA instance started from the Atlassian Plugin SDK.
# See
# https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK
# for details.
jira = JIRA(basic_auth=("admin", "admin"))  # a username/password tuple

# Get the mutable application properties for this server (requires
# jira-system-administrators permission)
props = jira.application_properties()

# Find all issues reported by the admin
issues = jira.search_issues("assignee=admin")

# Find the top three projects containing issues reported by admin
from collections import Counter

top_three = Counter([issue.fields.project.key for issue in issues]).most_common(3)
예제 #4
0
# This script shows how to connect to a JIRA instance with a
# username and password over HTTP BASIC authentication.

from jira import JIRA

# By default, the client will connect to a JIRA instance started from the Atlassian Plugin SDK.
# See https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK for details.

authed_jira = JIRA(server='https://ssesnexgen2055.atlassian.net', basic_auth=('*****@*****.**', '5hp27ct#NNs2by;H'))

# Get the mutable application properties for this server (requires jira-system-administrators permission)
props = authed_jira.application_properties()

# Find all issues reported by the admin
#issues = authed_jira.search_issues('FOR_PROCESSING ~ "MakeSubmission"')
issues = authed_jira.search_issues('project = SSES2055 AND issuetype = Candidate AND resolution = Unresolved')
issue_catalog = []

for i in issues:
    self = i.self
    FirstName = i.fields.customfield_10026
    MiddleName = i.fields.customfield_10027
    LastName = i.fields.customfield_10028
    Company = i.fields.customfield_10029
    peopleid = i.fields.customfield_10030
    PrimaryPhone = i.fields.customfield_10031
    AlternatePhone = i.fields.customfield_10032
    Addressentryid = i.fields.customfield_10033
    AddressLine1 = i.fields.customfield_10034
    AddressLine2 = i.fields.customfield_10035
    AddressCity = i.fields.customfield_10036