Has the API or CLI ever supported the ability to find Issue Type Schemes that are not associated with any projects?
In the UI, I can see Schemes with "No Projects" listed. But all of them show as Deletable.
And I've got an old auditing script that calls this:
acli --action getIssueTypeSchemeList --columns "Delete Enabled, Name, Projects"
But all it outputs is a single-column with "Name".
---
In this old ruby wrapper for CLI in 2017 I find mention of a deleteEnabled option:
acli --action getIssueTypeSchemeList --options "deleteEnabled"
But when I get the same list as if I run it without those options, and it does not include a list of Projects:
77 issue type schemes in list
"Id","Name","Description","Default Issue Type","Issue Types"
I guess Issue Type Schemes are always deletable (except for the default), so it makes sense the option doesn't work.
But it makes cleaning up ones that are not associated with any projects a real pain.
---
I even poked around in the API, where I could find APIs to:
And this sounded promising:
Returns a paginated list of issue type schemes and, for each issue type scheme, a list of the projects that use it.
Unfortunately, it requires you to give it a projectId, or up to 50 projectIds. But I'm looking for Issue Type Schemes that DON'T have an Issue Type Scheme.
I suppose I could dump the list of all Schemes, and then iterate through the projects that are associated with schemes and figure it out by process of elimination?
Ugh.
So did the API (and therefore CLI) used to support this functionality?
Thanks!
Hi @Darryl Lee ,
We are from Bobswift Support team and have created a support request in our portal to discuss more on your requirement.
We request you to please access the support request https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-5122 to discuss more on this issue.
Thanks,
Manisha
Hey, I'd love to access the ticket, but my existing login (with Lucid Motors) wasn't granted access. I've created an account with the same email as my Community profile, but that wasn't enough to grant access.
If you search, you should see a Darryl Lee in your system with a gmail account. That's me. (Hopefully.) Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Darryl Lee
We have made you Reporter of the ticket, please try to access and this https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-5122
We would like to inform you that you can get the list of the IssueTypeScheme not associated with the project and associated with the project using the CLI action getIssueTypeSchemeList.
After executing the below CLI action you will get the list of IssueTypeSchemeList. This will provide all the Issue Type Scheme list in the file "test.csv".
--action getIssueTypeSchemeList --file "test.csv"
Now, please open the file in the excel sheet and filter the record where the project is blank.
Please let us know if you need further information.
Thanks,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I ran:
acli --action getIssueTypeSchemeList --file "test.csv"
Against my Cloud instance, and do not see a Projects column in the CSV. Rather, I only see this:
"Id","Name","Description","Default Issue Type","Issue Types"
I'm running what I think is the latest version of the client:
Client name: jiracloud, Client version: 9.4.0, Client build: 2020-09-13T19:25:05, Java: OpenJDK 64-Bit Server VM 11.0.5, OS: Mac OS X 10.14.6
So... I don't know if this is a Server thing, or maybe you've got a different version of CLI?
Note, that even though I've linked the same Google account to https://bobswift.atlassian.net/, I am unable to see the ticket:
https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-5122
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Darryl Lee ,
Sorry for the inconvenience.
We have reopened the ticket https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-5122 and you should be able to access it now. If you still face the issue then please let us know.
Thanks,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Darryl Lee
We see from the message that the CLI is not configured for the Jira Cloud. Can you please add the jiracloud in the CLI configuration.
myjira = jiracloud -s https://exampleatlassian.net/ ${credentials}
Can you please refer to this link for more details on the configuration steps.
https://bobswift.atlassian.net/wiki/spaces/ACLI/pages/16875586/Downloads
Thanks,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manisha Kharga _Appfire_ Actually, I definitely have configured jiracloud in my CLI configuration. This is what is in my ~/ACLI/acli.properties file:
myjira = jiracloud -s https://example.atlassian.net/ ${cccCreds}
Here's what I'm seeing when I test:
$ acli myjira --action getClientInfo
Client name: jiracloud, Client version: 9.4.0, Client build: 2020-09-13T19:25:05, Java: OpenJDK 64-Bit Server VM 11.0.5, OS: Mac OS X 10.14.6
$ acli myjira --action getServerInfo
Jira version: 1001.0.0-SNAPSHOT, build: 100154, time: 2/25/21, 11:04 AM, description: Jira, url: https://MYJIRA.atlassian.net
And I still am not getting any column with projects listed when I run:
$ acli myjira --action getIssueTypeSchemeList --file "test.csv"
30 issue type schemes in list written to file: /Users/dlee/test.csv
And here's the first two lines of test.csv:
"Id","Name","Description","Default Issue Type","Issue Types"
"10000","Default Issue Type Scheme","Default issue type scheme is the list of global issue types. All newly created issue types will automatically be added to this scheme.","","Epic,Story,Task,Sub-task,Bug,Incident,Service Request,Service Request with Approvals,Change,Problem,IT Help,Impediment/blocker"
No Projects. Just like last December.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I noticed my version was still 9.4.0. Just downloaded and tried with the latest 9.6.0 version - didn't make a difference.
ANYways, in case anybody else doesn't want to wait for this feature, you can roll your own by hitting the Jira UI (CLI's renderRequest works nicely for this) and ... ugh, scraping rows that contain "No projects".
No, it's not pretty. I'm not proud.
The endpoint you'll want to check out is:
https://example.atlassian.net/secure/admin/ManageIssueTypeSchemes!default.jspa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I found myself coming back to this cleanup project (721 issue schemes, now down to 122).
Finally made myself write a bit of code to generate a tab-delimited list of your Issue Type Schemes with associated Projects. WARNING - we are parsing HTML, so this is extremely fragile:
acli --action renderRequest --request "https://YOURSITE.atlassian.net/secure/admin/ManageIssueTypeSchemes\!default.jspa" --file scraped.html
(You could also just save that page from your web browser. Make sure to select HTML Only.)
I wrote this in Python 2.7, using the Beautiful Soup library to parse the HTML:
#!/usr/bin/python
from bs4 import BeautifulSoup
with open('scraped.html') as fp:
soup = BeautifulSoup(fp, 'html.parser')
output = []
for td in soup.find_all('td'):
if td.attrs == {'class':['cell-type-key']}:
output.append(td.strong.get_text().strip())
if td.attrs == {'data-scheme-field':'projects'}:
allas = td.find_all('a')
if len(allas) > 0:
output.append(','.join(( map(lambda m : m.get('href').split('/')[4], allas) ) ) )
else:
output.append('No projects')
print ('\t'.join(output))
output = []
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happy to report that verson 9.7.0 of CLI now can output associated projects for Issue Type Schemes.
Anyways, now it works like @Manisha Kharga _Appfire_ posted back in December. (Albeit with an extra --outputFormat 999 option.)
The command to use is:
acli --action getIssueTypeSchemeList --outputFormat 999 --file issuetypeschemes.csv
You'll end up with a CSV with a nice Projects column, like so:
"Id","Name","Description","Default Issue Type","Issue Types","Delete Enabled","Projects"
So much more reliable than my hacky script, as much "fun" as it was to write.
Thanks Bob and the Appfire crew!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.