July 31, 2023

tJIRAInput – Docs for ESB Jira 7.x

tJIRAInput

Retrieves the issue information based on a JQL query or retrieve the project
information based on a specified project ID from JIRA.

tJIRAInput Standard properties

These properties are used to configure tJIRAInput running in the
Standard Job framework.

The Standard
tJIRAInput component belongs to the Business family.

The component in this framework is available in all Talend
products
.

Basic settings

Host URL

Specify the URL used to access JIRA.

User Id and Password

Specify the user authentication data used to access JIRA.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

JIRA resource

Select the JIRA resource from the drop-down
list, either ISSUE or PROJECT.

Schema and Edit schema

A schema is a row description. It defines the number of fields
(columns) to be processed and passed on to the next component.

Note that the schema of this component is
read-only with a single column json of String type. It stores the issue or project information in JSON
format. You can click Edit schema to view the
schema.

JQL

Specify the JQL (JIRA Query Language) query based on which you
will search for issues in JIRA. For more information about the JQL, see https://confluence.atlassian.com/jirasoftwareserver072/advanced-searching-829057400.html.

This field is available only when ISSUE is selected from the Jira
resource
drop-down list.

Project ID

Enter the ID of the project whose information you want to
retrieve from JIRA.

This field is available only when PROJECT is selected from the Jira
resource
drop-down list.

Advanced settings

Batch size

Specify the number of issues to be processed in each batch.

This field is available only when ISSUE is selected from the Jira
resource
drop-down list.

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at the Job level
as well as at each component level.

Global Variables

Global Variables

NB_LINE: the number of rows processed. This is an After
variable and it returns an integer.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

This component is usually used as a start component of a Job or
subJob and it always needs an output link.

Limitation

This component doesn’t support retrieving the comments of issues from JIRA.

Retrieving the project information from JIRA application

Here is an example of using Talend components to retrieve the
information of a project from JIRA application, extract the information needed based on the
JSONPath query, and finally write the extracted information into a JSON file.

Creating a Job for retrieving the project information from JIRA application

tJIRAInput_1.png

A project with the key DOC has been created in JIRA
application.

  1. Create a new Job and add a tJIRAInput component, a
    tExtractJSONFields component, and a
    tFileOutputJSON component to the Job.
  2. Link the tJIRAInput component to the
    tExtractJSONFields component using a Row > Main connection.
  3. Link the tExtractJSONFields component to the
    tFileOutputJSON component using a Row > Main connection.

Configuring the Job for retrieving the project information from JIRA application

  1. Double-click the tJIRAInput component to open its
    Basic settings view.

    tJIRAInput_2.png

  2. In the Host URL, User Id, and
    Password fields, specify the user authentication
    information required to access the JIRA application.
  3. Select Project from the JIRA
    resource
    drop-down list, in the Project
    ID
    field displayed, enter the key of the project, whose
    information will be retrieved. In this example, it is
    DOC.
  4. Double-click the tExtractJSONFields component to open
    its Basic settings view.

    tJIRAInput_3.png

  5. Click the […] button next to Edit
    schema
    , and in the schema dialog box displayed, define the
    schema by adding six columns of String type, id,
    key, name,
    description, assigneeType, and
    ProjectTypeKey, which will hold the corresponding
    information of the specified project.

    When done, click OK to save the changes and close the
    dialog box.

  6. Select the JSON field to be extracted from the JSON
    field
    drop-down list. In this example, it is
    json, which is passed from the
    tJIRAInput component.
  7. In the Loop Jsonpath query field, specify the path to
    the node on which the loop is based. In this example, it is
    $, which is the root node of the JSON field.
  8. In the Mapping table, the Column
    cells are automatically filled with the schema columns, and you need to specify
    the corresponding JSON node that holds the desired data for each schema column.
    In this example, $.id for the id
    column, $.key for the key column,
    $.name for the name column,
    $.description for the
    description column,
    $.assigneeType for the
    assigneeType column, and
    $.projectTypeKey for the
    projectTypeKey column.
  9. Double-click the tFileOutputJSON component to open its
    Basic settings view.
  10. In the File Name field, specify the path to the file
    into which the extracted project information will be written,
    D:/JiraComponents/project_info.json in this example.
    And in the Name of data block field, enter the name of
    the data block, project in this example.

Executing the Job to retrieve the project information from JIRA application

  1. Press Ctrl + S to save the Job.
  2. Press F6 to execute the Job.
  3. Open the JSON file project_info.json generated.

    Note that all extracted project information is displayed in one line in the
    generated JSON file, and you can use some editor tool to format and indent
    the data into an organized manner for better display of the result.

    tJIRAInput_4.png

    As shown above, the desired project information has been successfully
    extracted and written into the JSON file.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x