It's all about the answers!

Ask a question

RPE - Get JIRA JSON with Data Source Configuration

David Reilly (69240) | asked Jul 20 '18, 11:01 a.m.
retagged Jan 04 '19, 7:45 a.m. by Minakshi Jaint (5113)

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?

RPE v2.1.2

Accepted answer

permanent link
Pierre Bentkowski (61517) | answered Jul 20 '18, 11:21 a.m.
edited Jul 25 '18, 10:20 a.m.

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

David Reilly commented Jul 20 '18, 12:03 p.m.


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. 


Kumaraswamy Gowda commented Jul 20 '18, 12:11 p.m.

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.


David Reilly commented Jul 20 '18, 12:59 p.m. | edited Jul 20 '18, 1:04 p.m.

 Sorry - duplicate.

David Reilly commented Jul 20 '18, 1:00 p.m.

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?" 

Pierre Bentkowski commented Jul 20 '18, 2:15 p.m.


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.


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

David Reilly commented Jul 24 '18, 4:21 p.m.

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. 


showing 5 of 6 show 1 more comments

One other answer

permanent link
David Reilly (69240) | answered Aug 06 '18, 5:35 p.m.

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!

Your answer

Register or 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.