Closed champ16 closed 3 years ago
Hi @champ16 when you say "rwslib is not returning" what RWS endpoint are you using (i.e. what request type) or are you talking about builders creating ODM structure?
It's for audit API. "from rwslib.extras.audit_event.main import ODMAdapter". Audit APIs XML response has "SpecifyValue" present for any dictionary associated datapoint and specify is true(checked). This SpecifyValue is not being fetched after the parsing using above library.
I checked the library code and found out that Specify value is not being captured under Item object. I added it into my installed library and worked perfectly fine. This will serve my purpose.
What I am wondering is if you make some upgrade in future, which does not include it then I have to update the library after every upgrade.
Would you mind releasing a newer version with this change. In case you are considering you can include SignatureBroken attribute of Item tag as well.
Hi @champ16 thanks for the clarification and I'm glad you were able to work it out. I won't ask you to make a pull request but if you want to provide the snippets of code you used we will be interested in incorporating into a future version.
Below are the update:
Under context.py
class Item(ContextBase): def init(self, oid, value, specify_value, signature_broken, freeze, verify, lock, transaction_type): self.oid = oid self.value = value self.specify_value = specify_value self.signature_broken = signature_broken self.freeze = freeze self.verify = verify self.lock = lock self.transaction_type = transaction_type
Under parser.py
A_SPECIFY_VALUE = mdsol('SpecifyValue') A_SIGNATURE_BROKEN = mdsol('SignatureBroken')
class ODMTargetParser(object): elif tag == E_ITEM_DATA: self.context.item = Item( attrib.get(A_ITEM_OID), attrib.get(A_VALUE), attrib.get(A_SPECIFY_VALUE), attrib.get(A_SIGNATURE_BROKEN), yes_no_none(attrib.get(A_FREEZE)), yes_no_none(attrib.get(A_VERIFY)), yes_no_none(attrib.get(A_LOCK)), attrib.get(A_TRANSACTION_TYPE)
Update are in bold.
Thanks - added these to bug/issue_116 branch - just going to write some test code
Thanks @champ16 and @glow-mdsol !
One point of clarification, the SignatureBroken
is a YesNoRave type so should probably be a bool - I've migrated to using that.
Yes, Absolutely. Thank you so much @glow-mdsol for upgrading it so quickly. Much appreciated. Shall I close this issue now. Thanks @iansparks
I will wait for @iansparks review before closing it.
I think we're good to close here
for any Other,specify value rwslib is not returning the specify content, it's only returning the coded value under item_value. However, specify is present as an attribute in item. Am I doing something wrong?