[XML-RPC] need means to get environment hash

UNCONFIRMED
Assigned to

Status

--
enhancement
UNCONFIRMED
8 years ago
7 years ago

People

(Reporter: nparrish, Assigned: gregaryh)

Tracking

x86_64
Linux

Details

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4
Build Identifier: Testopia 2.4

http://landfill.mozilla.org/testopia/docs/en/html/api/extensions/Testopia/lib/WebService/Environment.html describes a means to insert a fully defined environment including the hash describing the elements/properties, i.e. create_full.  

but get only returns the product (hash), environment name, and id.  it does not appear to be possible to get the actual environment hash -- i.e. a get_full which would recurse down the testopia_environment_* tables and return the appropriate hash.  

I need this capability in order to incorporate environment tracking into our automation infrastructure, and am willing to help implement this, but will require some (heavy) guidance.  

Reproducible: Always
(Reporter)

Updated

8 years ago
Version: unspecified → 2.4
(Reporter)

Comment 1

8 years ago
Created attachment 488574 [details] [diff] [review]
something like a patch to add get_full()

attached patch adds a get_full() method to WebService::Environment.pm, which is a cut-paste-butcher of get(). 
it's pretty simple(minded) -- it resolves the actual selected property values by calling get_value_selected, building a hash which it then substitutes in for the properties element before returning it.

Comment 2

7 years ago
Created attachment 559206 [details] [diff] [review]
Extended API to get additional Environment information, such as categories and elements

I have added two methods into the api.
get_categories(environment_id) returns the category information
get_elements(environment_id) returns the element information, including Properties and Property values.  It also contains the env_category_id, so you can join with the categories from get_categories if needed.
You need to log in before you can comment on or make changes to this bug.