RedHatQE / pylero

Python wrapper for the Polarion WSDL API
https://redhatqe.github.io/pylero/
MIT License
38 stars 25 forks source link

Cannot get planned_in from requirement #68

Open yuxisun1217 opened 2 years ago

yuxisun1217 commented 2 years ago

When I get planned_in in a requirement, it can show a Plan object in the list, but all the attributions are empty.

Python 2.7.5 (default, Jun 11 2019, 14:33:56) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pylero.work_item import Requirement
>>> wi = Requirement('PLANXXX', 'ITEM-41685')
>>> pl = wi.planned_in
>>> pl
[<pylero.plan.Plan object at 0x7f048ca7f990>]
>>> pl.name
>>> pl.plan_id
>>> pl.description
leelavg commented 2 years ago

@yuxisun1217

yuxisun1217 commented 2 years ago

Thanks @leelavg! I just confirmed that this fix is in my module. At first I use pip install pylero to install it, and the Requirement planned_in is an empty list (although there is a planned in the polarion UI). Then yesterday I removed this module, cloned the main branch code, built it as a rpm package and installed. And then I can see the Plan object in the planned_in list, but this object cannot see name, description and any other attributions.

leelavg commented 2 years ago
yuxisun1217 commented 2 years ago

Hi @leelavg ,

This is the first time I use the Requirement module so I don't know if it worked well at any point of time. Sorry cannot help :(

yuxisun1217 commented 2 years ago
>>> wi._suds_object.plannedInURIs
(ArrayOfSubterraURI){
   SubterraURI[] = 
      "subterra:data-service:objects:/default/XXXX${Plan}XXX_XXXX_Release",
 }
leelavg commented 2 years ago
yuxisun1217 commented 2 years ago

@leelavg Oops! Updated. Thanks for reminding!

And may I have another question: is there any way to add/remove a plan into a requirement? Thanks!

leelavg commented 2 years ago

is there any way to add/remove a plan into a requirement

  • need to check the code as I'm not an avid user of Polarion these days