Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RPE - Get JIRA JSON with Data Source Configuration

Hi there -


I'm currently researching whether there are any capabilities for configuring a data source which will be re-configured during document generation. 

The use case is as such: 
1. We have a module in DNG which has a unique value correlating to a JIRA issue (ticket number).
2. We do not have OSLC links between these items, but there is data we are tracking on the JIRA issue that is currently not visible in DNG. Therefore, when we generate a document and happen to find a JIRA issue is related, we would like to retrieve specific attributes from the issue to marry our two data sources. 

How would I go about approaching this? I've tried to use a generic schema and then re-configure said schema in the template, but that doesn't seem to work. Is there something I'm missing?

Thanks,
RPE v2.1.2

0 votes


Accepted answer

Permanent link
Hello

Are you asking to select a Data Source Schema and do "Replace Schema ..." at run time?
I do not see any way to do this.

I never used the JIRA Rest so bear with me.
When you define the Data Source Schema using the Data > Add Data Source ... > I notice it ask of the JIRA ID
I guess the schema is different for various tickets.

Perhaps you could do the following:
 - generate one schema per "JIRA type" tickets,
 - merge those schema together.
 - use this schema in the RPE template

This way you will be able to access any of the attributes.

Is that make sense?





David Reilly selected this answer as the correct answer

1 vote

Comments

Pierre, 


Thanks for your input. 

Perhaps maybe I'm just revealing that I'm a bit of a newb with RPE - but if my data source is already configured for a specific jira ticket (as a schema) - how would I go about executing a call with a different issue number? I suppose it is the same thing as creating a template for a DNG module. The "manual configuration" is overwritten when the user generates the report. 

Is there any way I can overwrite that manual configuration for the specific ticket we are looking to query for? I have already defined the schema as a particular issuetype we're expecting, so no need to combine other issues into a massive schema. 

Thanks,
David 

Hi David,

You could use Dynamic Data Source configuration element for reconfiguring data source. RPE ships many such examples. See DNG_Module.dta or other DNG templates.

RPE knowledge center should have more details about DSC element.
https://www.ibm.com/support/knowledgecenter/SS6RHZ_6.0.6/com.ibm.rational.pe.overview.doc/topics/c_whats_new_606.html

Thanks,
Kumar

1 vote

 Sorry - duplicate.

Hi Kumar, 


A dynamic data source is what I'm trying to use, however, it looks like I'm going to have to modify the configured URL, correct?

So if my URL I've requested in the manual configuration looks like this: 

I could swap "TEST-10" for the issue project and key using a ".replace?" 

Hi

In the dynamic configuration proprieties,you can define a script to set the URI
Note that is your credential are different in DNG and JIRA you can set them up there.

http://localhost:8080/jira/rest/api/2/issue/TEST-10

Assuming that the front is constant,
you could define a variable where the default is that string :
    _jiraULR = "http://localhost:8080/jira/rest/api/2/issue/"
and do something like

    _jiraULR + jiraID
Where jiraID is from one of the attributes in the DNG data

1 vote

Hi Pierre - 


That's a great idea, and ultimately one I was seeking to emulate. Unfortunately, the request ends up with a bunch of appended commas. I'm only concatenating static text, which makes it all the more confusing. 

Thanks,
David

showing 5 of 6 show 1 more comments

One other answer

Permanent link

Status Update:


Pierre and Kumar were right. Hard-coding the jira URL and appending the issue key to it did wonders. 

This was such an easy and quick win. Thanks guys!

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,381

Question asked: Jul 20 '18, 11:01 a.m.

Question was seen: 3,180 times

Last updated: Jan 04 '19, 7:45 a.m.

Confirmation Cancel Confirm