Quantcast
Channel: PTC Community : Popular Discussions - Integrity
Viewing all articles
Browse latest Browse all 3432

Get Issue Field value by CLI (supporting line breaks)

$
0
0

Hello

I am looking for CLI solution how to get an issue field value with the field being a text with linebreaks. (example Requirement Text field).

I've started parsing the im viewissue output but it is difficult to split between fields and field values.

See example below:

 

-----------------------------

t =

 

 

Type: Requirement

ID: 187581

Created By: Miller Christian RGB (MILLERC)

Created Date: Sep 14, 2012 1:57:20 PM

Modified By: Wenger Gregor RGB (WENGERG)

Modified Date: Oct 17, 2012 1:45:41 PM

State: New

Project: /PSL/CmbEng/EngOperSt/CA000

Contains:

Contained By: 187542

References: 187582xyz

Reference Mode: Author

Root ID: 187581

Input Revision Date: Oct 17, 2012 1:45:41 PM

Document ID: 187541

Subsegment Name:

Referenced Item Type: Shared Requirement

Category: Functional Requirement

Shares:

Shared By:

Revision Date: Oct 17, 2012 1:45:41 PM

Authorizing Change Order:

Suspect Count: 0

Valid Change Order: true

IncludeReference: false

Discussion:

Priority:

Changes Authorized By:

Decomposes To:

Decomposed From:

Is Related To:

Is Related Back:

Text: The time after start (EOS_TiElpdAftStrt) shall be realized with an integrator. If EOS_AcvStrtEnd = 1 shall be count. The integrator shall be set on reset when EOS_AcvStrtEnd  = 0.

The time after stop (EOS_TiElpdAftStop) shall be realized with an integrator. If EOS_AcvStop = 1 shall be count. When the signal of EOS_AcvStop rise shall the integrator set on reset.

Text Attachments:

Project Phase:

Trace Status: none

Downstream Trace Count: 0

Upstream Trace Count: 0

Linked Requests:

Requirement Tested By:

Related Development Tasks:

RIF_Attachments:

RIF_Configuration:

RIF_Identifier: d9b7ff3e-b91f-4eb2-9ed3-48780df07860

RIF_ID: 723951712

Requirement Origin:

Requirement Level:

Requirement Safety Standard:

Requirement Safety Levels:

Requirement Rationale:

RIF_Attachments_fva:

Requirement Acceptance Criteria:

Discussed in:

Requirement Summary:

Planned for:

Stakeholder Comment:

Referenced Bookmarks:

Bookmarks:

Reuse Potential:

Approval Customer: clarify

Approval Supplier:

Comment Customer:

Comment Supplier:

System Level:

System Structure Nodes:

Decomposition Summary:

Item Significant Edit Date on Shared Item: Oct 17, 2012 1:45:41 PM

Significant Edit Date: Oct 17, 2012 1:45:41 PM

Stakeholder ID:

RIF_Additional_Info_txt:

RIF_Additional_Info_int:

 

 

Attachments:

 

 

Forward Relationships:

 

 

Backward Relationships:

-------------------

In bold I've marked the output of the Text field.

It is specially difficult if in my requirement text I have line breaks or : sign used.

 

I was hoping the im viewissue would support a --field="Text" option like for the im issues (query) but it seems not the case.

So the current solution I have now is in two steps:

Getting the list of all fields by a im viewissue --xmlapi and then parsing the ouput for <Field name="([^<]*)">'.

Knowing the output list of fields, parsing the output of the im viewissue to look for value between Field and the next neighbouring field in the list.

 

Any better idea?

 

Many thanks

Kind regards


Viewing all articles
Browse latest Browse all 3432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>