Skip to content

Commit

Permalink
Merge pull request #3 from xebialabs-external/master
Browse files Browse the repository at this point in the history
Added Chang ID output property
  • Loading branch information
Tony Wilmer committed May 22, 2019
2 parents 8f6616b + f527177 commit 42a4ecb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Binary file modified images/findEntry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/main/resources/remedy/getEntry.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#

from remedy.RemedyClient import RemedyClient
import com.xhaus.jyson.JysonCodec as json

if formName is None:
sys.exit("No form name provided.")
Expand All @@ -18,4 +19,7 @@

client = RemedyClient.create_client(remedyServer, username, password)

formData = client.get_entry( formName, entryId )
formData = client.get_entry( formName, entryId )
changeId = json.dumps(formData['Infrastructure Change Id'])
changeId = changeId.strip('\"')
print "Change ID from the Form Data is: %s " % changeId
4 changes: 2 additions & 2 deletions src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<type type="remedy.findEntryById" extends="remedy.Task">
<property name="scriptLocation" default="remedy/getEntry.py" hidden="true"/>

<property name="formName" category="input" label="Form Name" default="CHG:ChangeInterface" required="true"/>
<property name="formName" category="input" label="Form Name" default="CHG:ChangeInterface_Create" required="true"/>
<property name="entryId" category="input" label="Entry Id" required="true"/>

<property name="changeId" category="output"/>
<property name="formData" category="output"/>
</type>

Expand Down

0 comments on commit 42a4ecb

Please sign in to comment.