[
https://issues.apache.org/jira/browse/YETUS-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15454472#comment-15454472
]
Ajay Yadava commented on YETUS-446:
-----------------------------------
I don't think they are using 0 as "null" in the back end :) I suspect that
there are metadata tables for various fields(project/fixVersion etc.) per
instance of JIRA which contains values for that particular field. If the value
for a certain field is found to be missing then it throws this kind of error.
For example if a certain version doesn't exist for *any* project in JIRA then
it will throw the same error. In the command below I have given a valid project
name but a high version which I guessed will be missing in any project.
NOTE: I modified the script locally to also include the response from server,
so your output will have less information.
{code}
releasedocmaker --project FALCON --outputdir FALCON --projecttitle 'Apache
Falcon' --version 56 --index --license
JIRA returns HTTP error 400: Bad Request. Aborting.
Response from the server is:
{"errorMessages":["The value '56' does not exist for the field
'fixVersion'."],"errors":{}}
Please make sure the specified projects are correct.
{code}
If we give a valid version but a bad project name, we get a similar response(
and hence the original error message I believe). e.g.
{code}
releasedocmaker --project yahoooo --outputdir FALCON --projecttitle 'Apache
Falcon' --version 0.3 --index --license
Response from the server is:
{"errorMessages":["The value 'yahoooo' does not exist for the field
'project'."],"errors":{}}
Please make sure the specified projects are correct.
{code}
and to my delight if you give multiple invalid options, the response mentions
all invalid values e.g.
{code}
releasedocmaker --project yahoooo --outputdir FALCON --projecttitle 'Apache
Falcon' --version 56 --index --license
JIRA returns HTTP error 400: Bad Request. Aborting.
Response from the server is:
{"errorMessages":["The value 'yahoooo' does not exist for the field
'project'.","The value '56' does not exist for the field
'fixVersion'."],"errors":{}}
Please make sure the specified projects are correct.
{code}
I think the response from server is self-explanatory and we can delete the last
line (the original help message).
> releasedocmaker not handling 0 version in a range correctly?
> ------------------------------------------------------------
>
> Key: YETUS-446
> URL: https://issues.apache.org/jira/browse/YETUS-446
> Project: Yetus
> Issue Type: Bug
> Components: Release Doc Maker
> Affects Versions: 0.4.0
> Reporter: Allen Wittenauer
> Assignee: Ajay Yadava
>
> Playing around this morning, I seem to have hit an interesting bug.
> {code}
> releasedocmaker --project FALCON --outputdir FALCON --projecttitle 'Apache
> Falcon' --version 0 --version 1 --range --index --license
> {code}
> results in this URL getting generated:
> {code}
> https://issues.apache.org/jira/rest/api/2/search?jql=project+in+%28%27FALCON%27%29+and++++++++++++++++fixVersion+in+%28%270.0%27%29+and++++++++++++++++resolution+%3D+Fixed&startAt=0&maxResults=100
> {code}
> A completely valid URL. However, RDM reports on the screen:
> {code}
> JIRA returns HTTP error 400: Bad Request. Aborting.
> Please make sure the specified projects are correct.
> {code}
> whereas JIRA spits back
> {code}
> {"errorMessages":["The value '0.0' does not exist for the field
> 'fixVersion'."],"errors":{}}
> {code}
> So somewhere we are generating an invalid version and not verifying it with
> JIRA. Additionally, our error message is wrong which isn't going to help the
> user at all. :(
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)