How do I pull time estimates via a script?

Anthony Newnam April 4, 2012

I see several issues against JIRA on pulling time estimate information with conflicting details. Is there any way through any mechanism except scraping HTML and parsing it off the site (which I guess I'll do next) to pull this data?

1 answer

0 votes
Bob Swift (personal)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2012

JIRA Command Line Interface can be used with getIssue or getIssueList actions. Use --outputFormat 2 for the single issue action or --outputFormat 5 for the list action to get the time fields.

Anthony Newnam April 4, 2012

Thanks, that's perfect. I had tried that without the outputFormat. Is there any documentation that lists the options to the outputFormat?

Bob Swift (personal)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2012

getIssueList far right column although I just noticed getIssue needs it documented.

Anthony Newnam April 5, 2012

Thanks, that's very helpful! I've changed my scripts around to use the CLI instead of manually saved files from JIRA. This seems to do everything I need now except give me information about parent tasks or subtasks. I would like to be able to filter either for issues that have no parent task (top level issues) or issues that have no subtasks (bottom level issues). I don't think this is possible in JQL, and I don't get parent or subtask information back from getIssueList.

Any ideas?

Thanks again for your help, Bob.

Bob Swift (personal)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 5, 2012

Look at https://studio.plugins.atlassian.com/wiki/display/JQLT/Subtask+Functions - might be something to help there. You are right there is little support for parent/subtask info in the cli at this time, although I think with the newer JIRA releases there is more information available that should be incorporated.

Anthony Newnam April 8, 2012

Do you see significantly slower query times using the CL client versus the API or web?

To query for "project = something and resolution = unresolved" on the web, it takes a few seconds. On the command line, it takes me 17 minutes.

Bob Swift (personal)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2012

No, not normally. Did the query return a large number of issues? If so all (by default) are retrieved via the CLI and only the first page is retrieved on the GUI. Use --count 50 to limit the number returned. And a tip for larger queries or other memory intensive actions, increase your default java memory.

Anthony Newnam April 16, 2012

It returned several hundred (I think about 600). The XML view on the web returns all records in my query too, and it seems to be very fast.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events