If I created a store of user stories. Is there a way to fetch the name of the parent program's name associated with a story - rally

So far I have only been able to reach the parent one step up, in this case the name of the feature.

You're right, in general hierarchy is limited to 2 levels in a single response. There are some shortcuts here and there though, depending what you need.
If you fetch both Feature and Parent I think that will give you the feature's parent info. You can't go any higher than that in one request though...

Related

Querying an implicit re-orderable list

I was searching for a way to re-order my records, like blog posts, for instance.
One of the solutions I have found is to self-reference to refer to the previous (or next) value, like in a linked list (https://softwareengineering.stackexchange.com/a/375246). However, this requires the client-side (a web service or perhaps a mobile app) to implement the linked-list travesal logic to derive the order.
Is there a way to do this at the database level?
The reason for this is that if you are deriving the order at the client-side, then if you want to display only the first 10 records, you would have to retrieve all the records anyway.
EDIT
It seems the blog posts example was a very bad example, sorry. I was thinking of blog posts as they are displayed on an admin dashboard, and the user can re-order the position they are displayed by dragging and dropping. Hope this is more clear.
EDIT 2
I guess, generally, what I'm really asking is, how can one implement and query a tree-like structure in SQL

How to Collect dijit/form/combobox Selected Values in Repeat Control

An XPage is used to display the number of points a person has collected, and the number of points remaining (see below).
I have a repeat control which gets a collection of documents meeting a specific criteria. The last column in the control contains 5 digit/form/comboboxes, which are displayed or hidden, according to the number of fields on each document that contain data.
The layout contains gift cards worth a certain amount of points, and the person can select how many of each gift card they want. eg.
Company Available in Values of Points Required Quantity Requested
The Quantity Requested column contains the digit/form/comboboxes. As the person selects values in the checkbox, I want the number of points remaining to be recalculated.
The onChange event of the digit/form/comboboxes calls a function in an Output Script which calls an RPC, which in turn calls an SSJS function. The SSJS function cycles through the documents displayed in the repeat control, gathering the points required information. I then wanted it to also grab the Quantity Requested. I understand from a previous posting that because of the way the digit/form/combox is rendered, I can only get the value using CSJS with dijit.byId and perhaps putting the value in a hidden field and retrieving it from there.
I can't seem to wrap my head around how I will do this when the repeat control will make it possible for there to be many combobox1 and combobox2, etc.
The XPage is not bound to a form, because all the items are just calculated on the fly and then discarded.
What is the best way to do this?
The JSON RPC service can't interact with any changes made in the browser, see https://www.intec.co.uk/json-rpc-service-component-tree-manipulation-openlog/. This could be the cause of your problems.
You may be able to get around it by triggering a partial refresh (POST) before calling the JSON RPC. In theory that might work, because the component tree (server-side map of the XPage) would get updated by the partialRefreshPost and the updates picked up by the JSON RPC. It's possible though that the Restore View picks up a version of the XPage other than the one for the browser, I don't know. I've never investigated that.
It's been a while since I've worked with server java script, I have been doing it the managed bean way with ActionListeners. If you have the data in the UI, then can you avoid server side processing and do it client side?
You can also use the DOM XSP Object like XSP.setSubmittedValue to have a key value pair sent with your post request to the server side, you can only have one... it can be JSON or any other value you set it to from the client side javascript.
I figured out how to do this. If anyone wants the code, let me know and I'll provide it.

Is it possible to include multiple resources in one component in react-admin?

Sometimes we want to see multilple business objects at once in an admin panel. For instance, I might want to display an customer profile along side with his/her list of accounting records. Or may be I want to keep an eye on both list of new cutomers and list of recent comments.
Is it possible to achieve with react-admin?
Yes. Have a look at the Demo's dashboard.
Get data from various sources with await dataProvider.getList(RESOURCE, PARAMS) and pass that data to various components that can be displayed on one page.

Picking up of multiple IDs together or individual ID in selenium

Which is correct way to pick elements from HTML : pick up all ids on a page together or picking each ID individually?
Let me explain the scenario.
I have a HTML page with information associated to specific IDs, but IDs sometimes change according to the section they are being displayed into.
Now which approach is better, either to pick the all the ID's from the page and then adding checks to get the value or picking up of separate ID individually.
I also need to work with many IDs (20 out of 100) on the page at same time.
Please suggests.
Thanks
If an element is static, in that it will not change throughout the course of your test then there is no problem selecting it at the beginning. However i definetly feel that attempting to select all your elements at the beginnning is a bad idea. What happens if an element is not available until you have completed some action, NoSuchElementException. Or what about if you select an element and when you go to use it the element cant be found, StaleElementException.
So you definetly need to find a balance and select your elements at the aprropriate time. I saw some other suggestion above to use xpath as it will never change, again thats not true.It is also recommended in the documentation to first attempt to select by id and then name. Im sure there are alot of reasons for this but one that immediatley comes to mind is readibility, speed is also a factor.

WSAPI: Finding the root parent of a story

I have a WSAPI query that returns a number of stories. For each of these stories, I'd like to inspect the "root" parent. So I make the query, and in the "fetch" field I request "Parent".
However, this only gives me to the immediate parent. If the parent has a parent, that does not seem to be returned. In contrast, if I request a story's children, I can go down many levels.
Is there a way with the WSAPI to do a single query of user stories so that I can get to the root parent of each? And in fact, sometimes the parent is a Feature level portfolio item, so ideally that needs to be included as well.
It is only possible to traverse one level of the hierarchy at a time in a WSAPI request. You'll have to continue loading each parent until you reach the top.
Check out this answer:
Lookback API: Find all leaf node stories under a known parent
Lookback API makes it possible to grab the entire hierarchy of parent/child objects with a single query. LBAPI is currently in a limited public preview for a subset of Rally subscriptions, but the goal is to make a full public preview available soon.