Modify

Opened 10 years ago

Closed 9 years ago

#11476 closed enhancement (fixed)

Return custom fields in XMLRPC Calls

Reported by: anonymous Owned by: Roberto Longobardi
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords: custom fields
Cc: Trac Release: 1.0

Description

Custom testcase (or testcase in plan) fields are not being returned with XMLRPC Calls. Since the base class AbstractVariableFieldsObject already has them it seems sensible to return them. Example for Testcase in plan:

Original return value for a tescase with getTestCase when plan id is provided in rpcsupport.py

tcip = TestCaseInPlan(self.env, testcase_id, plan_id)
return (tc['page_name'], tc.title, tc.description, tcip['status'])

Custom fields can easily be added to the answer with

tcip = TestCaseInPlan(self.env, testcase_id, plan_id)
for field in tcip.fields:
    if field.get("custom"):
         customtuple = (field.get('name'), field.get('value'), field.get('label'))
         customfields.append(customtuple)

return (tc['page_name'], tc.title, tc.description, tcip['status'], customfields)

This can also be done for listTestCases and the case without testplan id can also be covered

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Roberto Longobardi

Hi there, sorry for the late answer, my job is really demanding these days.

Thanks for your patch, I'll definitely include it as soon as I can find time for a new release.

Ciao, Roberto

comment:2 Changed 10 years ago by Roberto Longobardi

Status: newaccepted

comment:3 Changed 9 years ago by Roberto Longobardi

Resolution: fixed
Status: acceptedclosed

Implemented in 1.8.2.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.