Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear how to fetch refs from a human readable identifier #9

Closed
newz2000 opened this issue Feb 20, 2015 · 6 comments
Closed

Unclear how to fetch refs from a human readable identifier #9

newz2000 opened this issue Feb 20, 2015 · 6 comments

Comments

@newz2000
Copy link

Hello, I've read the docs both here in Github and also in Rally and there is one fundamental concept that is unclear to me. My goal is to generate some custom formatted reports and it starts with a user story. For example, I know a number may be US123. Something I can't figure out how to do is take US123 and turn it into a ref. Likewise, DE321 for defects or E10 for epics.

I have been able to query a list of all defects and all user stories, but unfortunately, these lists are quite long and slow. If I already know the human readable identifier, is there a method I can use to lookup the details about it?

@krmorse
Copy link
Contributor

krmorse commented Feb 20, 2015

You just want to do a normal query and include a filter of the format (FormattedID = "US123") - that should return you a result set of 1 record, assuming your project scoping was correct. Let me know how that goes...

@newz2000
Copy link
Author

Thanks, I've had some success with other aspects of the project, but I'm still struggling with this. Here is an example of a query that works:

restApi.query({
  type: 'PortfolioItem/Epic',
  fetch: ['FormattedID', 'Name', 'State']
})

This gives me a list of epics. However, when I use this query instead:

restApi.query({
  query: '(FormattedID = US688)'
})

I get the following error: [ 'Not able to parse artifact type: undefined' ].

Any suggestions?

@krmorse
Copy link
Contributor

krmorse commented Feb 20, 2015

you're close- just combine your two examples and you should have it.

restApi.query({
    type: 'PortfolioItem/Epic',
    fetch: ['FormattedID', 'Name', 'State'],
    query: '(FormattedID = E123)'
})

@newz2000
Copy link
Author

Thanks, but I am looking for a user story. I can't find the docs on what type that is and my attempts to make something up haven't worked. :-)

@krmorse
Copy link
Contributor

krmorse commented Feb 20, 2015

ah. user story is hierarchicalrequirement

@newz2000
Copy link
Author

Ah, thanks! I literally found that in the FAQ the very moment that I got the notification from you. Here is my code that works, for anyone who comes after:

restApi.query({
  type: 'hierarchicalrequirement',
  query: '(FormattedID = US123)',
  fetch: ['FormattedID', 'Name', 'State'],
}).then(function(result){
  console.log(result);
}).fail(function(err){
  console.log(err);
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants