This is a guide to login to planview and fetch data and assign it to a custom field in Jira using the SOAP Webservice https://success.planview.com/Planview_Portfolios/Integrations/SOAP_Web_Services
Fetch Attribute and add to custom field
In the end we will end us having a structure looking like this when fetching an attribute and adding it to a custom field
...
\uD83D\uDCD8 Instructions
Login to Planview and get the token
Goto Outbound Integrations
Click Create button, create a Group called Planview, this to have all actions related to Planview in the same folder structure in the tree. It has no functional impact, just structural.
Click Create button, select Action and parent to be the group called Planview created in the above step. This will put a new web action in the group called Planview.
Name it something meaningful like Planview LoginChange the method to POST
Add the URL to PLANVIEW_UNSTANCE_URL/planview/services/AttributeService.svc
Add these headers;
Content-Type: text/xml
SOAPAction:
http://schemas.planview.com/PlanviewEnterprise/Services/IAttributeService2/read
Cookie: LoginCert= + your secret cert
Click Create button, select Action and parent to be the Action called Planview Login created in the above step. This will put a new web action under the parent called Planview Login and chain the call, sending the response from the login down to the this action.
Name it something meaningful like Planview Get AttributeChange the method to POST
Add the URL to PLANVIEW_UNSTANCE_URL/planview/services/AttributeService.svc
Add these headers;
Content-Type: text/xml
SOAPAction:
http://schemas.planview.com/PlanviewEnterprise/Services/IAttributeService2/read
Cookie: LoginCert= + your secret cert
Cookie2: {{PLANVIEW_COOKIE}}
This variable we will create in the later step, the idea is to pick the response from Planview Login and parse out the cookie part and send that to the read call.
Click Create button, select Action and parent to be the Action called Planview Get Attribute created in the above step. This will put a new web action under the parent called Planview Attribute and chain the call, sending the response from the login down to the this action.
Name it something meaningful like Planview Set Customfield
Select Template Category: Jira Core Server
Select Template: Edit Issue
The template will just give a boilerplate to edit the issue, the details is in the tutorial below if you miss it.Change the method to PUT
Add the URL to {{baseUrl}}/rest/api/2/issue/{{issue.key}}
Add these headers;
Content-Type: application/json
Select the authentication created in the Jira authentication step
Add the body
Code Block language js { "fields":{"customfield_10900":"{{PLANVIEW_ATTRIBUTE}}"} }
Change the customfield number to your instance. The syntax may vary base on customfield type so make sure to checkout this page Update Jira custom field examples. The above example sets a text field. We will come back to the {{PLANVIEW_ATTRIBUTE}} variable which will be a scripted variable.
Info |
---|
Highlight important information in a panel like this one. To edit this panel's color or style, select one of the options in the menu. |
...
Filter by label (Content by label) | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|