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
1 Like
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… (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.
Not sure if I’ve got a forge issue or a connect issue.
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
4 Likes
Hi @linklefebvre,
Thanks for bringing this up. I’ve attempted to recreate the issue you’ve faced and have successfully done so.
Specifically I could recreate when said app is installed on a site and is then upgraded with a new entity properties module.
From what I can tell the particular sequence is (please let me know if there was a different trigger sequence):
- Install app A onto site A
- Update the manifest of app A to have and update a new entity property module
- App A is automatically upgraded on site A
- Product trigger occurs and the corresponding issue has the new entity property updated
- JQL search across issues for the new entity property yields no results despite the property being set
#5 seems to indicate that some indexing might not be set as part of the upgrade flow which I’ll bring up to the relevant team.
For now, a temporary workaround is to simply uninstall and reinstall the app - this should set up the search indices.
Please let me know if there’s any other problems and thanks a lot for bringing this up!
1 Like
Hi @JackyLo ,
Yes, this makes sense, I added the entity property module later in the development.
Uninstall/reinstall did the trick, thank you for the support! I’ll make sure to try that out next time I have some unknown issue.
Regards,
1 Like
Cannot make it working, my config:
connectModules:
jira:jiraEntityProperties:
- key: entity-property-mapping
name:
value: Mapping Property
entityType: issue
keyConfigurations:
- propertyKey: myapp-mapping
extractions:
- objectName: guid
type: string
alias: myapp-mapping-guid
remotes:
- key: fakeRemote
baseUrl: https://this-is-useless-but-needed-for-connectModules-to-work.com/
permissions:
scopes:
- 'read:jira-work'
- 'admin:connect-jira'
app:
id: ari:cloud:ecosystem::app/...
connect:
key: myapp-connect
remote: fakeRemote
Fresh deploy (no older version of the app) and install OK. But the JQL query:
project = "TEST" AND issue.property[reqview-mapping].docGuid IS NOT EMPTY ORDER BY created DESC
returns nothing. Alias myapp-mapping-guid
in JQL throws error.
Update: probably caused by FRGE-373 in forge cli 2.0.1
Hi @danielwester, @OndejMedek
I know this is an old topic but in case you are interested, we recently announced new Forge Jira module jira:entityProperty
.
2 Likes