问题描述
我试图使用JIRA SOAP API来确定典雅的ID号是在一定的项目JIRA问题的所有ID号中最高的。上限是好的;我不需要确切的答案。
I am trying to use the JIRA SOAP API to elegantly determine the ID number that is the highest among all the ID numbers of JIRA issues in a certain project. An upper bound is fine; I do not need the exact answer.
我想通过寻找现有问题的数量这样做的,但我没有找到一个很好的方法来做到这一点。我也想过,也许我可以创建一个新问题,用新发行的ID号的问题数量。这是不这样做,因为我再有一个额外的问题,是没有意义的一个很好的办法。
I was thinking of doing this by finding the number of existing issues, but I did not find a nice way to do this. I also thought that perhaps I could create a new issue and use the ID number of the new issue as the number of issues. This is not a very good way of doing this as I then have an extra issue that is meaningless.
任何想法?
推荐答案
我已经在过去的这个问题,只是使用的方法,如果连续5问题不能retrived,那么你已经达到了最新的问题。当问题被移动到另一个项目或删除,将有问题的键序列中的孔中。
I've had this problem in the past and just used the approach that if 5 consecutive issues can't be retrived, then you've reached the newest issues. When an issue is moved to another project or deleted, there will be a hole in the sequence of issue keys.
我想从2 ^ 16二进制斩将覆盖大多数情况下了。
I suppose a binary chop from 2^16 would cover most cases too.
这篇关于有效的方法来找到最高JIRA问题ID在一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!