@@ -17,14 +17,9 @@ For more information on how workspaces and projects in Rally are set up and conf
1717the Rally documentation available via the 'Help' link from the Rally landing page
1818displayed after your initial login.
1919
20- .. warning::
21-
22- As of the 1.0.0 version of **pyral** (the Python toolkit for the Rally REST API),
23- the implementation works with Rally WSAPI 2.0 and is **not** backward compatible
24- with Rally WSAPI 1.x.
25-
2620.. _Rally : http://www.rallydev.com
2721
22+
2823Simple Use
2924==========
3025
@@ -42,11 +37,11 @@ Here's a prototype of simple use of the **pyral** package.::
4237 response = rally.get('Release', fetch="Project,Name,ReleaseStartDate,ReleaseDate",
4338 order="ReleaseDate")
4439
45- for release in response:
40+ for rls in response:
4641 rlsStart = rls.ReleaseStartDate.split('T')[0] # just need the date part
4742 rlsDate = rls.ReleaseDate.split('T')[0] # ditto
48- print "%-6.6s %-16.16s %s --> %s" % \
49- (rls.Project.Name, rls.Name, rlsStart, rlsDate)
43+ print( "%-6.6s %-16.16s %s --> %s" % \
44+ (rls.Project.Name, rls.Name, rlsStart, rlsDate))
5045
5146
5247Rally Data Model
@@ -72,15 +67,19 @@ But, it is not limited to those as it is very possible to view/operate on other
7267entities such as Workspace, Project, UserProfile, Release, Iteration, TestCaseResult,
7368TestFolder, Tag and others.
7469
70+
7571Full CRUD capability
7672====================
7773
7874The Python toolkit for the Rally REST API offers the full spectrum of CRUD capabilities that the
79- credentials supplied for your subscription/workspace/project permit. While the Rally
80- REST API itself doesn't support bulk operations, there are example usages of
81- **pyral** that you can adapt to offer the end-user or scriptwriter the
75+ credentials supplied for your subscription/workspace/project permit. Rally
76+ REST API did not originally support bulk operations when this toolkit was written.
77+ Since the 2017/2018 timeframe the Rally REST WSAPI has provided some bulk operations, but this
78+ toolkit doesn't use those or provide access to them.
79+ There are example usages of **pyral ** that you can adapt to offer the end-user or scriptwriter the
8280capability of specifying ranges of identifiers of artifacts for querying/updating/deleting.
8381
82+
8483Rally Introspection
8584===================
8685
@@ -89,12 +88,14 @@ and the attributes associated with each type. You can also use **pyral** capabi
8988to obtain the list of allowed values for Rally type attributes that have a pre-allocated
9089list of values.
9190
91+
92+
9293Queries and Results
9394===================
9495
9596The Rally REST API has two interesting characteristics that the Python toolkit for the Rally REST API
9697insulates the scriptwriter from having to deal with. The first is that the Rally REST API
97- has a maximum "pagesize" of 200 records to limit volume and prevent unwarranted hijacking of the
98+ has a maximum "pagesize" to limit volume and prevent unwarranted hijacking of the
9899Rally SaaS servers. But, having script writers deal with this directly to obtain further
99100"pages" would be burdensome and out of character with the mainstream of Python interfaces
100101to SaaS services. The Python toolkit for the Rally REST API (**pyral **) takes care
@@ -104,19 +105,31 @@ requests on the Rally server.
104105
105106The second characteristic is that the Rally REST API for some queries and results returns
106107not a scalar value but a reference to yet another entity in the Rally system. A Project or
107- a Release are good examples of these. Say your query specified the retrieval of some UserStories ,
108+ a Release are good examples of these. Say your query specified the retrieval of some Stories ,
108109and you listed the Project as a field to return with these results. From an end-user perspective,
109110seeing the project name as opposed to an URL with an ObjectID value would be far more intuitive.
110111
111112The Python toolkit for the Rally REST API offers this sort of intuitive behavior by "chasing" the URL
112113to obtain the more human friendly and intuitive information for display. This sort of behavior is
113- also present in so-called "lazy-evaluation" of entity attributes that may be containers as well
114- as references. The scriptwriter merely has to refer to the attribute with the dot ('.') notation
115- and **pyral** takes care of the communication with the Rally server
114+ also present in so-called "lazy-evaluation" of entity attributes that may be containers (collections)
115+ as well as references. The scriptwriter merely has to refer to the attribute with the
116+ dot ('.') notation and **pyral ** takes care of the communication with the Rally server
116117to obtain the value. There are two significant advantages to this, one being lightening
117118the load on the server with the reduction of data returned and the other being easy and
118119intuitive attribute access syntax.
119120
121+ The query relational operators that pyral supports are:
122+ = != > < >= <= contains !contains in !in between !between
123+ The contains and !contains relational operators a helpful in expressing a condition where
124+ you are looking for a field that does (or does not) contain a specific substring.
125+ For example 'Name contains "Prior Art"' or 'ThermalPhase !contains "hot lava"'.
126+ The in and !in relational operators are commonly used for expressions involving subsets of a
127+ finite set of values. For example 'Severity in High, Burning, Explosive' or 'Priority !in Moribund, Meh'.
128+ The between and !between relation operators are commonly used for expressions involving date ranges.
129+ For example 'CreatedDate between 2018 and 2022' or 'LastUpdated !between 2021-09-22T00:00:00.000Z and 2021-09-22T07:59:59.999Z'.
130+
131+
132+
120133Custom Fields
121134=============
122135
@@ -127,11 +140,21 @@ has a DisplayName of 'Burnt Offerings Index' you can use the String of 'BurntOff
127140a fetch clause or a query clause or refer to the field directly on an artifact
128141as artifact.BurntOfferingsIndex.
129142
143+
144+ PortfolioItem tips
145+ ==================
146+ Rally has 4 standard PortfolioItem sub-types (Theme, Strategy, Initiative, and Feature).
147+ In this toolkit, for the primary methods (get, create, update, delete), you must supply a
148+ entity name (eg, 'Story', 'Defect', 'Task', etc). For a PortfolioItem sub-type you may
149+ specify just the name of the sub-type, ie., 'Feature' or you may fully qualify it as
150+ 'PortfolioItem/Feature'.
151+
152+
130153Introduction of Dyna-Types
131154==========================
132155
133- As of Rally WebServices API 1.37 , Rally has introduced a modification of their data model, which
134- is termed dyna-types. This modification offers a means of establishing and using a parent type
156+ Prior to the release of Rally WebServices API v2.0 , Rally introduced a modification of their data model,
157+ which is termed dyna-types. This modification offers a means of establishing and using a parent type
135158and defining sub-types of that parent. The PortfolioItem type is now an "abstract" type from which
136159there are some pre-defined sub-types (Theme, Strategy, Initiative, Feature).
137160By convention, the preferred way to identify a PortfolioItem sub-type is via slashed
@@ -152,4 +175,10 @@ here is that if you don't use PortfolioItem instances with pyral, you don't have
152175If you use PortfolioItem instances with pyral or you've defined your own "abstract"
153176parent types and specific sub-types thereof, you are strongly encouraged to use the slashed specification
154177to avoid ambiguity in identifying the Rally entity type.
178+
179+ In the event your organization has created a sub-type with the same name as a standard Rally entity
180+ (eg, 'Project', 'Release', 'Milestone', etc.) you will be unable to use this toolkit to access those items.
181+ There will be no consideration given to supporting any custom PortfolioItem sub-type whose name conflicts
182+ with a Rally standard entity name.
155183
184+
0 commit comments