How to use entity_property_equal_to condition with generalPages module?

I am using a generalPages module in my app and would like to add an entity_property_equal_to condition to it. Unfortunately, this fails on app install with the following message:

Installation failed. The app includes a Page module with an unsupported condition (entity_property_equal_to).

My conditions property looks as follows:

	"conditions": [{
			"condition": "user_is_logged_in"
		},
		{
			"condition": "entity_property_equal_to",
			"params": {
				"entity": "project",
				"propertyKey": "foo.bar",
				"objectName": "baz.booleanValue",
				"value": "true"
			}
		}
	]

I am not sure what I am missing here. According to the docs entity_property_equal_to seems to be supported for the generalPages module.

Any ideas?

2 Likes

Created [ACJIRA-2144] - Ecosystem Jira to keep track of this.

In Confluence I have the same issue with space_property_equals_to.

entity_property_equals_to with entity=space doesn’t fail on installation, but then the condition always resolves to false.

1 Like

Hi,

I have integrated my application to Atlassian Connect Express a long time back and now suddenly, while uploading the application to ACE, I am getting the below error. I am unable to understand it’s a failure.
Error:
“Installation failed. The app includes a web-fragment condition (entity_property_equal_to) with invalid parameters (This entity type is not valid, you provided ‘project’)”

The descriptor file contains modules->webItems and modules->webPanels which has the condition:
{
“condition”: “entity_property_equal_to”,
“params”: {
“entity”: “project”,
“propertyKey”: “xxxxxxxx”,
“value”: “true”
}
}

Requesting for a quick help.

Below is an example of legacy web panel entry for our Signature app that uses the same entity property condition. This format is accepted by current version of ACE.

It looks very similar to yours… maybe check the conditions wrapping array.

"webPanels": [
           {
              "key": "sig-content-legacy",
              "url": "../static/sig-content.html?...",
              "weight": 201,
              "location": "atl.jira.view.issue.left.context",  
              "name": { "value": "Signatures" },
              "conditions": [
                { "condition": "addon_is_licensed" },
                { "condition": "entity_property_equal_to", "invert": true, 
                  "params": { "entity": "project", "propertyKey": "esign.digitalrose.dev", "objectName": "disabled", "value": "true" }
                }
              ]
            }
        ]

Chris

Hi Chris

Thanks for the quick reply.
Yes, there is difference in the “conditions” tab from the script you have mentioned here.
I did make the relevant changes but still the error persists.
Error :
Installation failed. The app includes a web fragment condition (entity_property_equal_to) with invalid parameters (This entity type is not valid, you provided ‘project’).

Thanks,
Archita

What is the location of the panel? If it is not within an issue Jira may not have a context project to evaluate. Maybe try changing location to an issue panel as a test…

This is the condition:
{
“condition”: “entity_property_equal_to”,
“params”: {
“entity”: “project”,
“propertyKey”: “XXXX”,
“value”: “true”
}
}
which is present at 2 locations :

  1. jira.project.sidebar.navigation in modules->webItems
  2. atl.jira.view.issue.left.context in modules->webPanel

Do I need to change anything here ?

Hello @ArchitaJindal ,

Have you checked whether or not your issue is the same described in the ticket linked at the beginning of this thread (and the related one):

Cheers,
Dario

There is no “objectName” in your params element. I believe that needs to be set to the name of the element within your custom stored json propertyKey. At least for our page we needed it.

Yes, I agree that we don’t have ‘objectName’ as one of the parameters in the condition. But it should not affect as in the document objectName is mentioned under optional parameter. It’s no where written that objectName is a required parameter for ‘entity_property_equal_to’.

Connect conditions (atlassian.com)

Hi Dario

Thanks for the reply. I really appreciate the help but I am afraid the links mentioned does not work for me.

Thanks,
Archita