Context values in Module Condition

Is there any way to get all the context values used and evaluated by Jira when loading a module?

I’m trying to have a module only display for certain request types using Jira Expressions + Conditions[1][2].

I’ve been unable to use the context value, and I suspect it’s because the context value isn’t set at all.


You can debug Jira expressions used in web conditions with webhooks, see here for details: This should allow you to figure out what’s going on.

The customerRequest context variable might not be available on pages that aren’t inherently Service Desk.

Thanks for info @kkercz! Was able to run some debug tests using a Service Desk instance.

On the “Create Request” page I tried this module condition:

    "condition": "jira_expression",
            "params": {
               "expression": " == 2 && serviceDesk.requestTypeId == 38"

based on this page’s context params:

But that yielded:

"Evaluation failed: \"serviceDesk.requestTypeId\" - Unrecognized property of `serviceDesk`: \"requestTypeId\" ('requestTypeId'). Available properties of type 'ServiceDesk' are: 'id', 'project'" 

I also tried
" == 2 && == 38"
" == 2 && == 38"

Which both did not yield the expected result of “only display iframe in project (1) for requestType id (38)”

Interestingly enough, the App Connect docs say this about servicedesk context params:

servicedesk.requestTypeId for ‘Create request view’ and ‘Request details view’

It seems like the URL context params are populated different than the values evaluated in the module condition block.

Am I out of luck trying to restrict a “Request Create Entity Property Panel” to a specific issue type?

The ServiceDesk type doesn’t have the requestTypeId property in Jira expressions, see its documentation here:

To get a hold of the request type, you can use the customerRequest context variable. All context variables available for the web condition expression are documented here:

So to get the request type ID, write:

Thanks again @kkercz! It looks like customerRequest is null when accessing the “Create Request” service desk page:

"Evaluation failed: \"customerRequest.fakeTestProperty\" - Unrecognized property of `customerRequest`: \"fakeTestProperty\" ('fakeTestProperty'). Type null does not have any properties"

Here’s the exact module I’m applying the condition to:

Going back to my earlier question: it looks like there’s some inconsistency in what values are available to the expression evaluator and the webhooks. I can send the requestTypeId to the webhook URL, but the customerRequest expression property is null.

Indeed, variables available in webhook URLs are different to context variables available in expressions. It’s a different mechanism.

If customerRequest is not available in your context, you can still get the issue type directly from the issue: As far as I know, customer request types are directly mapped to issue types anyway.

Hm. Even the issue context is not available. I’m seeing this context returned by the error monitor:

        "expression": " == 1 && == 10008",
        "errorMessages": [
            "Evaluation failed: \"issue.issueType\" - Unrecognized property of `issue`: \"issueType\" ('issueType'). Type null does not have any properties"
.... irrelevant data ....
        "context": {
            "serviceDesk": {
                "id": "1",
                "projectId": "10000",
                "projectName": "Access Requests",
                "projectKey": "AR",
                "_links": {
                    "self": "https://{tenant}"
            "project": {
                "self": "https://{tenant}",
                "id": "10000",
                "key": "AR",
                "assigneeType": "PROJECT_LEAD",
                "name": "Access Requests",
                "roles": {},
                "avatarUrls": { .. removed for brevity ... },
                "projectTypeKey": "service_desk",
                "simplified": false,
                "style": "classic",
                "properties": {}

Appears that the context available to requestCreatePropertyPanel is too limited to actually evaluate any conditionals beyond “only display for this project.”


Looks like it. I suggest creating a ticket in the JSDECO project to make the context more useful in that location.