How to open JSD request view action in dialog with header?

Hi all,

I extended my app descriptor to created a new action in the request view of JSD.

The descriptor part looks as follows:

{
	"serviceDeskPortalRequestViewActions": [{
		"key": "sd-portal-request-view-action-my-action",
		"name": {
			"value": "My action"
		},
		"url": "/sd/portal/request/view/action/dialog/show?issue.key={issue.key}&project.id={project.id}",
		"target": {
			"type": "dialog"
		}
	}]
}

So far so good, the dialog opens and the content renders. Unfortunately, I can’t figure out how to set the dialog header, it’s always blank.
https://d.pr/i/S4a95A
target property is of type JSD web item target (different from Jira web item target) and according to the docs only takes a type property. Nevertheless, I tried to add options to target:

"options": {
	"header": {
		"value": "My Action Dialog Header"
	}
}

This seems to be valid (app installation still works), but now the action on the request view disappeared :frowning: .

I’d be interested to know:

  1. Has anyone figured out how to do this? What should the descriptor part look like and where is it documented?
  2. @bitvoodoo-atlassian: Is there a plan to support other types such as dialogmodule
    "target": {
              "type": "dialogmodule",
              "options": {
                "key": "my-dialog"
              }
            }
    

Thanks for any help or hints,
Tobias

Hi @tbinna,

Thanks for bringing this to our attention. I have confirmed that we do indeed support setting the header value but a bug was causing your action not to show if you didn’t have the chrome option defined in target.options.

The fix for this should be live soon.

2 Likes

Thanks @msamy for looking into this and working on a fix so quickly.

Just one more question; is there a way to set the dialog height/size? Right now it always seems to stretch to the whole page height.

@tbinna so for the JSD portal we do not support arbitrary width/height but you can select from a bunch of sizes with the size option in target.options. Size can be one of “small”, “medium”, “large”, “x-large”.

I see, ok I will try to work with that. Thanks again.

@msamy I think I have found one more issue. In my descriptor I have the request view action as described above and a request view panel (serviceDeskPortalRequestViewPanels). For both I added the following condition:

"conditions": [
  {
    "condition": "entity_property_equal_to",
    "params": {
      "entity": "project",
      "propertyKey": "myProperty",
      "objectName": "enabled",
      "value": "true"
    }
  }
]

Strangely for the action this works as expect, however for the panel it doesn’t. The condition on the panel causes it not to render anymore, independent of the condition. The add-on installs normally.

I literally copy-pasted the condition from the action, so there shouldn’t be any typo or something.

Indeed I was able to reproduce that on my end. A fix will be live soon for this as well. Thanks for your patience with this @tbinna.

1 Like

Thanks for testing and fixing @msamy. Please let me know when this is fixed.

Thanks!

@msamy do you have any update on this? I tried this morning, but it seems not yet fixed.

@tbinna both issues should now be fixed.

Thanks, I can confirm that it works now. :+1:

1 Like