How to add two models in single store or single grid based on -ref and date range in customize rally app? - rally

I am a beginner for the development of customized rally app. I have a portfolio item and revisions for every Marketable feature. I have two models PortfolioItem/MarketableFeature and Revision, using this two models I want to make a grid.
I facing issue for combining two models or two stores, for customized rally app models config is not work for any grid. I am confused on how to get revision description and PortfolioItem/MarketableFeature in one grid based on date range and according to MF Id.
i used
Rally.ui.grid.Grid
for creating a grid,
Rally.data.wsapi.Store
for creating store and
Rally.ui.combobox.FieldValueComboBox
for date range(start-date and end-date).

You'll want to create your grid with the MarketableFeature model. Is there another way to get the data you need other than loading all the revisions? This will be very expensive and slow since you'll be making 1 request per grid row in addition to the initial request to populate the portfolio items.
If you do need to do that then you'll probably want to do a combination of these two examples:
Fetching subcollections:
https://help.rallydev.com/apps/2.1/doc/#!/guide/collections_in_v2-section-collection-fetching
Custom renderer, you can use this to render the Revisions data:
https://help.rallydev.com/apps/2.1/doc/#!/example/custom-data-grid

Related

Creating and updating products using the V3 API

I've been using Bigcommerce's csv import to create and update simple products with c# and headless browser control. This is a relatively easy method as I can include custom fields, category names, images, GPS information, and all of the other fields that the csv import allows. Even so, my long term goal will be to move to the API. So far it appears that the API is very limited. For instance, instead of just including a category name with the new product, you have to include a category ID. As far as I can see, that would mean that for every new product I would have to create the categories for the product, then retrieve the category(s) id with an API call and lastly create the product. It appears that this is just the beginning. It appears that many of the fields that are easily included in the csv now have to be created and then attached to the product. Am I missing something?

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.

Can the List component be used in an edit form?

I want to be able to bring a dataset into an edit/create form because I need the respective resource in order to associate it to the main model.
Say, a store has many employees. I want , from an ui perspective, to be able to add employees to the store.
I am able to to this via a custom component, however I want to know if I am able to use the List component to fetch a certain resource, ,because I have a feeling that I'm not doing this properly now. Adminonrest has the tools to render a paginated list of resources, so how can I make better use of these tools ? Then make a custom iterator to represent the model anyway I want to (maybe even use the datagrid component). I can then attach custom actions.
What would the best pattern for this situation be ? Thanks.
No, this feature is not supported. You can display employees, using the ReferenceManyField but we don't support creating them from the Edit page.

Retrieve Defect Data per iteration

I want to have a drop down menu that can let me choose a particular iteration from the list of all iterations and can display the defect data for that chosen iteration. I am very new to Rally API so might be a very simple question but your response would be really helpful. Thanks
See Filterable Tree Grid example that uses an iteration combobox to filter artifacts, including defects. See also a Filterable Grid example that filters defects by State.
Here is an app example that builds a grid of stories filtered by iteration combobox and grouped by "parent" initiatives. You may easily change it to build a grid of defects grouped by associated requirements.

Possible to fetch full hierarchical requirements in single portfolio item web service call?

I'm trying to aggregate some information about the kanban states of my user stories. If query a PifTeam item, I get a summarized collection of UserStories associated with it.
Example query:
https://rally1.rallydev.com/slm/webservice/1.40/portfolioitem/pifteam/99999999999.js
However I then have to run a loop on the UserStories collection, individually querying each one to get at the information I need. This potentially results in a lot of web service calls.
Is there a way to return the full hierarchical requirement information in the original pifteam query so that there is only one webservice call which returns all sub-objects? I read the webservice api and was trying to play with the fetch parameter but had no success.
This functionality will be disabled in WSAPI 2.0 but will continue to be available in the 1.x versions. That said, you should be able to use a fetch the fields on story that you need like this:
/pifteam/9999.js?fetch=UserStories,FormattedID,Name,PlanEstimate,KanbanState
Fetch will hydrate the fields specified on sub objects even if the root object type doesn't have those fields. So by fetching UserStories the returned collection will populated with stories, each having the FormattedID, Name, PlanEstimate and KanbanState fields included.
There is no way to do it from Rally's standard Web Services API (WSAPI) but you can from the new Lookback API (LBAPI). The query would look something like this:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/<ObjectID_for_Workspace>/artifact/snapshot/query.js?find={__At:"current",_TypeHierarchy:"HierarchicalRequirement",Children:null,_ItemHierarchy:<ObjectID_for_PortfolioItem>}&fields=["Name"]
Fill in the ObjectIDs for your Workspace and PortfolioItem. The _ItemHierarchy field will cross work item type boundaries and goes all the way from PortfolioItems down through the Story hierarchy down to Defects and even Tasks, so I added _TypeHierarchy:"HierarchicalRequirement" to limit it to Stories. I have specified Children:null which means you'll only get back leaf Stories. The __At:"current" clause get's the current tree and values. Remember, it's the "Lookback" API, so you can retrieve the state of the object at any moment in history. __At:"current" says to get the current values and tree.
Note, the LBAPI is delayed from current values in the system by anywhere from seconds to minutes. Typically it's about 30 seconds behind. You can see how far behind it is by checking the ETLDate field in the response.
Details about the LBAPI can be found here. Note, that the LBAPI is available in preview now for almost all Rally customers. There are still a number of customers where it is not yet turned on. The best way to tell if it's working for your subscription is to try the query.