27print ('Authorisation has failed. Have you got a valid SSO cookie? If not, re-run "cern-get-sso-cookie -u https://its.cern.ch/jira/loginCern.jsp -o jira.txt" ')
28else:
29print ("Something has gone wrong! The response is: ", r.text)
30return
31
32import json
33 response = json.loads(r.text)
34return response
35
36@acmdlib.command(name='jira.issues')
37@acmdlib.argument('-c', '--cookies',
38 required=False,
39 default = 'jira.txt',
40 help='the CERN SSO cookies file')
41@acmdlib.argument('-r', '--release',
42 required=False,
43 help='Limit the response to the specified release')
44@acmdlib.argument('-m', '--myissues',
45 action='store_true',
46 default=True,
47 required=False,
48 help='Limit the response your own issues')
49@acmdlib.argument('-q', '--query',
50 required=False,
51 help='Use the specified query string i.e. "search?jql=assignee=currentUser()+and+resolution=Unresolved"')
52@acmdlib.argument('-s', '--status',
53 required=False,
54 help='Limit the search to issues with this status, e.g. "Open"')