Xurrent NodeHelper Methods

    This guide explains which node helper methods are supported for xurrent.

    Supported Methods

    MethodParametersReturn TypeDescription
    getIssueTypeissueTypeName: StringIHubIssueTypeReturns an issue type object with the given name
    getUseruserKey: StringIHubUserReturns a user by ID (delegates to getUserById)
    getUserByIduserId: StringIHubUserReturns a user by Xurrent person ID; null if not found
    getUserByEmailemailAddress: StringIHubUserReturns a user by email address; null if not found
    getLabellabel: StringIHubLabelReturns a label object with the given name
    getPrioritypriorityName: StringIHubPriorityReturns a priority object with the given name
    getStatusstatusName: StringIHubStatusReturns a status object with the given name
    isIssueEditableissue: IHubIssuebooleanAlways returns true for Xurrent requests
    stripHtmlhtmlText: StringStringRemoves HTML tags from text using Jsoup

    Xurrent-Specific Methods

    MethodParametersReturn TypeDescription
    getCustomFieldtemplateId: Long, fieldName: String, value: ObjectBasicHubCustomFieldCreates a validated custom field with type checking
    getCustomFieldValueLabeltemplateId: Long, fieldId: String, valueId: StringStringGets display label for a select option value
    getTemplateIdByNametemplateName: StringLongGets request template ID by name
    getServiceIdByNameserviceName: StringLongGets service instance ID by name
    getTeamIdByNameteamName: StringLongGets team ID by name

    Rich Text Conversion Methods

    MethodParametersReturn TypeDescription
    convertJiraWikiToXurrentjiraWiki: StringStringConverts Jira Wiki markup to Xurrent format
    convertHtmlToXurrenthtml: StringStringConverts HTML to Xurrent format
    convertXurrentToJiraWikixurrentText: StringStringConverts Xurrent format to Jira Wiki markup
    convertXurrentToHtmlxurrentText: StringStringConverts Xurrent format to HTML




    NodeHelper Usage Examples

    User Methods

    // Get user by email
    def user = nodeHelper.getUserByEmail("john.doe@example.com")
    if (user) {
        entity.assignee = user
    }
    
    // Get user by ID
    def member = nodeHelper.getUserById("12345")
    if (member) {
        entity.member = member
    }
    

    Status, Priority, and Labels

    // Set status
    entity.status = nodeHelper.getStatus("In Progress")
    
    // Set priority
    entity.priority = nodeHelper.getPriority("High")
    

    Template and Service Lookup

    // Get template ID by name
    def templateId = nodeHelper.getTemplateIdByName("IT Support Request")
    entity.templateId = templateId
    
    // Get service instance ID by name
    def serviceId = nodeHelper.getServiceIdByName("IT Service Desk")
    entity.serviceId = serviceId
    
    // Get team ID by name
    def teamId = nodeHelper.getTeamIdByName("IT Support Team")
    entity.teamId = teamId
    

    Rich Text Conversion

    // Converting from Jira to Xurrent (incoming sync)
    entity.description = nodeHelper.convertJiraWikiToXurrent(replica.description)
    
    // Converting from Xurrent to Jira (outgoing sync)
    replica.description = nodeHelper.convertXurrentToJiraWiki(entity.description)
    
    // Converting HTML to Xurrent
    entity.note = nodeHelper.convertHtmlToXurrent("<b>Important:</b> Please review")
    
    // Strip HTML completely
    def plainText = nodeHelper.stripHtml("<p>Hello <b>World</b></p>")
    // Returns: "Hello World"