Is it possible to get programmatically a set of GH's SprintMarkers, whish contains current issue?

Denis Yaparov February 14, 2013

I need to get set of SprintMarkers for concrete issue from my code and add linked issues to the same Spring Marker.

Sprint Marker is a "draft Sprint", on "Plan" board, before pressing "Start Sprint". After pressing "Start Sprint" GH removes this object from DB and creates Sprint object. There is table "AO_??????_SPRINTMARKER", which contains this objects persisted.

I've read almost all the documentation about GH's API, but found nothing about this question. I guess, this is impossible without hacking GH. Is it correct or not?

----

I saw question https://answers.atlassian.com/questions/105079/can-i-query-by-sprint-that-was-not-started-to-report-my-plan. It is not the same thing.

2 answers

1 accepted

0 votes
Answer accepted
Renjith Pillai
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.
February 15, 2013

You can also do it using REST - The REST url is rest/greenhopper/1.0/api/rank/after

A sample JSON payload is from my browser is:

{"rankables":[{"id":2,"type":"sprintmarker"}],"customFieldId":10206,"rankAfterKey":"LLLLL-7"}

Denis Yaparov February 17, 2013

Thank you very much. I'll try. But I need to add issues to sprintmarker by event, so I have to use Java/Groovy listener. Is there some GH's API for this?

Denis Yaparov February 18, 2013

Thanks! Investigation in GH's REST code gave me required pieces of code.

0 votes
JamieA
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.
February 14, 2013

I would refer to Shawn's comments here: https://answers.atlassian.com/questions/96142/how-to-get-sprint-issue-list-by-sql

As far as I know, any issue can be in only one planned sprint in any given board. But, I believe it can be in different planned sprints on different boards, so I think you will need to traverse the ranking table as Shawn describes, for each board.

Denis Yaparov February 14, 2013

Thank you, Jamie! I missed this topic while searching.

JamieA
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.
February 14, 2013

Yep... there is a lot of good info there... in fact that's pretty much the sum of human knowledge outside Atlassian about how GH stores its data.

Denis Yaparov February 17, 2013

But the problem now is to add another issue to found sprint marker. Do you think it is possible?

JamieA
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.
February 17, 2013

It's possible if there is a remote or java API for it... whether they make it easy to access that API is another matter. To be honest I don't know, I'd consider asking a new question.

Suggest an answer

Log in or Sign up to answer