Trying to get search for an issue property set by a customfield in Forge

I’ve got a custom field in Forge UI which is setting an issue property called my-awesome-property (using useIssueProperty ). I’m able to see the property being set in the rest api by hitting /rest/api/3/issue/MYISS-2 which returns:

{"key":"forge-my-awesome-property","value":"3ee24052-5a3e-4ba6-bd87-8ba115d5a48b"}

Now - I’m trying to use the rest api to search for this and it doesn’t seem things work as well as in Connect.

A JQL search with issue.property["forge-my-awesome-property"].value=3ee24052-5a3e-4ba6-bd87-8ba115d5a48b doesn’t work (which would be my expectation).

I tried going to forge-connect land and using the “jiraEntityProperties” throught the connectModule but that isn’t accepted:

has invalid extension type ‘connect-jiraEntityProperties’

Anyone have any ideas? Or is entity properties not supported in Forge?

/Daniel

1 Like

Hi @danielwester!

The Connect module ‘Entity Properties’ is supported by Forge. Could I ask what extension key you’ve specified in your manifest? Specifically, the extension key for jiraEntitiyProperties should be:

connect-jira:jiraEntityProperties

Please let me know if the problem still persist!

Thanks a lot,
Jacky

Thanks that lead me on the right path. Couldn’t use connect-jira:jiraEntityProperties but jira:jiraEntityProperties in the manifest passed the validation. So now it’s at least getting into Forge.

Unfortunately it doesn’t get picked up… :frowning: (More than likely the issue is on this side of the keyboard though).

Right now I have in the manifest:

connectModules:
    "jira:jiraEntityProperties":
      [
         {
        "keyConfigurations": [
          {
            "extractions": [
              {
                "objectName": "content",
                "type": "string",
                "alias":"thingId"
              },
            ],
            "propertyKey": "forge-degrees-thing"
            
          }
        ],
        "entityType": "issue",
        "name": {
          "value": "55 Degrees Thing Id"
        },
        "key": "connect-jira-jiraEntityProperties"
      }
      ]

And I see the property set:

{"key":"forge-degrees-thing","value":{"content":"39c90d1c-39ba-436c-86a0-458f8ac48a8b"}}

But when I do the search of:

issue.property[forge-degrees-thing].content ="39c90d1c-39ba-436c-86a0-458f8ac48a8b"

Nothing. :frowning_face:

Not sure if I’ve got a forge issue or a connect issue. :confounded:

All right gave up on getting the jiraEntityProperties thing working and switched to using the forge custom field directly… Not the best but gets me through this issue.

Hey @danielwester,

Really sorry about the late response!

Unfortunately it doesn’t get picked up…

Hmm… the thing that comes to mind immediately is whether you’ve specified remotes in the manifest. It’s a bit counterintuitive and you’ve brought it to our attention but… you’ll need to specify a remote server despite not needing one.

If you’re still willing to give it a try - I’ll try support you as much as I can!

Hi @JackyLo,

Sorry for hijacking this thread but I’ve got the same issue so if you can help me it would help others finding this post.

Here’s the relevant part of my manifest:

connectModules:
  jira:jiraEntityProperties:
    - key: test-entity-property
      name:
        value: Test
      entityType: issue
      keyConfigurations:
        - propertyKey: test-property
          extractions:
            - objectName: name
              type: string
remotes:
  - key: fakeRemote
    baseUrl: https://this-is-useless-but-needed-for-connectModules-to-work.com/
permissions:
  scopes:
    - 'storage:app'
    - 'read:jira-work'
    - 'write:jira-work'
    - 'admin:connect-jira'

I set the issue property as follows: (Which works because I can GET the value back)

await properties.onJiraIssue(extension.issue.key).set("test-property", { name: "test" });

I search the issue property as follows: (Which returns no issues)

issue.property[test-property].name = test
3 Likes