com.webos.service.bugreport

Note
This API has been available since API level 15.

API Summary

Provides methods for reporting bug in Jira system.

Overview of the API

This reporting tool is deamon type service to register a bug in a Jira system. The major features are:

  • Set / Get Jira configuration
  • Create the JIRA issue of bug type with the log files, screenshot images and environment information.

Additional Remarks

  • This reporting service is developed for internal service only.
  • The bug reporting service is used by bugreport app.

Methods

createBug

ACG: diagnostics.telemetry
  • Added: API level 15

Description

Creates a bug ticket on Jira with the given data.

Note: This method is intended to be called by the bugreport app. If you want to use this in other modules, contact the API owner.

Parameters

Name

Required

Type

Description

summaryRequiredString

Summary of Jira ticket.

descriptionOptionalString

Description of the Jira ticket.

priorityOptionalString

Priority of Jira ticket. It depends on the Jira system. 

For example, the following values are used in the WRN project of clm.lge.com.

  • P1
  • P2
  • P3
  • P4
  • P5
reproducibilityOptionalString

Reproducibility of Jira ticket. It depends on the Jira system. 

For example, the following values are used in the WRN project of clm.lge.com.

  • Always (100%)
  • Often (50-99%)
  • Seldom (10-49%)
  • Rarely (<10%)
  • I didn't try
screenshotsOptionalString array

Screenshot files to attach to the Jira ticket. These files are deleted upon successful ticket creation.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation. Possible values are:

  • true - Indicates that the operation was successful. It does not mean that the ticket creation is complete. It just means that the method has started the ticket creation task. It takes about 10 seconds to create a ticket and the result is displayed as a pop-up on the screen.
  • false - Indicates that the operation failed.
errorCodeOptionalNumber

The error code when returnValue is false.

errorTextOptionalString

The error text when returnValue is false

keyOptionalString

The key of the created issue.

Example

Example : Create a bug

# luna-send -n 1 -f luna://com.webos.service.bugreport/createBug '{"summary": "test", "priority": "P5", "reproducibility": "Always (100%)"}'

Response:

{
    "key": "WRN-XXXXX",
    "returnValue": true
}

getConfig

ACG: diagnostics.telemetry
  • Added: API level 15

Description

Gets Jira configuration and files to be attached to the Jira ticket.

Note: This method is intended to be called by the bugreport app. If you want to use this in other modules, contact the API owner.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed.
errorCodeOptionalNumber

The error code when returnValue is false.

errorTextOptionalString

The error text when returnValue is false

accountOptionalObject: account

Account info to login to Jira

screenshotsOptionalString

List of screenshot files to be attached when creating a Jira ticket. The following files are included.

  • Screenshots created by Ctrl+Alt+F9.

Example

Example : Get Jira configurations

# luna-send -n 1 -f luna://com.webos.service.bugreport/getConfig '{}'

Response: 

{
    "screenshots": [
        "/tmp/screenshots/screenshot_20211105110001.jpg"
    ],
    "account": {
        "password": "bGdlITIzNDVe",
        "username": "webosreporter"
    },
    "returnValue": true
}

setConfig

ACG: diagnostics.telemetry
  • Added: API level 15

Description

Sets the Jira configurations.

Currently, the only configurations supported are:

  • username
  • password

Note:

  • These values are persisted across reboots until another value is set.
  • This method is intended to be called by the bugreport app. If you want to use this in other modules, contact the API owner.

Parameters

Name

Required

Type

Description

accountOptionalObject: account

Account info to login to Jira

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed.
errorCodeOptionalNumber

The error code when returnValue is false.

errorTextOptionalString

The error text when returnValue is false

Example

Example : Set the username and password

# luna-send -n 1 -f luna://com.webos.service.bugreport/setConfig '{"account": {"username": "webosreporter", "password": "bGdlITIzNDVe"}}'

Response:

{
    "returnValue": true
}

Example : Clear the username and password

# luna-send -n 1 -f luna://com.webos.service.bugreport/setConfig '{"account": {"username": "", "password": ""}}'

Response:

{
    "returnValue": true
}

Objects

account

Account info to log in to Jira.

Name

Required

Type

Description

usernameRequiredString

The username (AD username) that has permission to access Jira.

passwordRequiredString

The password of the user. It must be provided as base64 encoded.

Note: https://www.base64encode.org/ can be used to encode the password.

API Error Codes Reference

Error Code

Error Text

Error Description

1Internal error

Internal error

2Deprecated method

Deprecated method

3Invalid request params

Invalid request params

4Login failed

Login failed

Contents