Signature
Helper | nodeHelper |
Signature | getStatus(String statusName) |
Description | Returns a hub status with the provided name |
Example use
Set the issue status to ready for incoming issues.
issue.status = nodeHelper.getStatus("Ready")
Note: Due to Github management system limitations, it is not possible to create an issue in any other state than Open. In this case, the getStatus will only apply during the update.
Set issue status to Fixed if the remote issue status is Done and resolution is Fixed.
def desiredStatusName if (replica.status?.name == "Done" && replica.resolution?.name == "Done") { desiredStatusName = "Fixed" } def desiredStatus = nodeHelper.getStatus(desiredStatusName) if (desiredStatus) { issue.status = desiredStatus }
For Freshdesk & for Freshservice
The getStatus
method retrieves a status based on its name. The valid status values in Freshdesk & Freshservice are: Open, Pending, Resolved, Closed, Waiting on Customer, and Waiting on Third Party. If an invalid status name is provided, both the ID and name will be set to null
.
To ensure proper synchronization between Freshdesk / Freshservice and other systems, a status mapping can be implemented to align different status values across platforms.
Example:
Basic Usage: Assign a Freshdesk / Freshservice status directly:
Mapping External Statuses to Freshdesk / Freshservice: Convert external status names to match Freshdesk’s / Freshservice's supported values.