It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why JIRA.Forms.createCreateIssueForm only labels are shown and the input box/combo box are not shown Edited

We are using following code to show Jira’s issue creation dialog. All the fields are working fine except some fields that were added to the issue form through another Jira plugin.


var issueForm = JIRA.Forms.createCreateIssueForm({pid:${projectId}});
issueForm.bind(‘sessionComplete’, function(evt,issues) {process issues
}
var dialog = issueForm.asDialog({windowTitle: ‘Create Issue’});
dialog.show();


We have built a Jira plugin and the above code allows us to show the create issue page in a separate application (not a Jira plugin or Jira application). However, due to the issue in JIRA.Forms.createCreateIssueForm only labels are shown and the input box/combo box are not shown. Is this a Jira defect or we are missing somethingJira create issue.jpeg

1 answer

0 votes
Andy_Heinzer Atlassian Team Jan 02, 2020

Hi Ankit,

If I understand your posts here, you are using a plugin in Jira in order to have some other custom fields here, but that these custom fields are not appearing on the create screen of this issue type.

Jira is not expected to show every possible field on the create screen by default.  Instead only fields that are set within the create screen for that issue type will appear here.  More details are in Defining a screen.  I suspect that you simply have not added this particular custom field to the create screen here yet.  While your plugin might permit some field names and descriptions to appear here, the lack of input sections suggest to me that the screen doesn't have that field yet. 

The screens should still be referred to here, even for custom fields created via plugins.  From the screenshot you took, scroll up and click the gear icon and then select the "Where is my field" dialog.

Screen Shot 2020-01-02 at 5.14.07 PM.png

Then enter this field name.  I'd be interested to see your results there.  Even if the field is not on the screen, using this method will help you to quick adjust this so that you can add that field to the appropriate screen.  Once the field exists on the create screen, then you should be able to populate values to that field when creating issues, either on that page, or via other issue creation methods, such as REST API calls, etc.

Please let me know if this helps or not.

Andy

Hi Andy,

 

Thank you for your detailed reply.

We followed the steps mentioned by you. However, the issue we are facing is mentioned below-

 

  1. Add custom fields in Create issue form in Jira application. The below fields were added successfully and are visible in the "Configure Fields" section.

Sprint - Custom field already available in Jira was added to Create issue screen

Raising component - This custom field was added using Elements Connect plugin

 

  1. The above fields are visible as expected while creating an issue from Jira application (Screen shot attached: JIRA_Create_Form_1).

 JIRA_Create_Form_1.png

  1. However, when we access the Jira create issue form in another application (outside of Jira) using JIRA.Forms.createCreateIssueForm, then the custom fields (Sprint or Raising Component mentioned in #1) do not display as expected. Only labels are displayed for these fields (Screen shot attached: JIRA__Create_Form_2).

 JIRA__Create_Form_2.png

Do let us know if we should try any other configuration. Thank you.

Andy_Heinzer Atlassian Team Jan 13, 2020

Sorry for the delay in response here.  Afraid this is stretching beyond my knowledge.  However I believe that if you're trying to access that 'JIRA.Forms.createCreateIssueForm' which is in the Java API for Jira from a separate application, that this behavior could actually be expected.

My thinking here is that because these additional custom fields are only accessible via a custom plugin to Jira, that this additional java code is not getting called during this java api call.  I should preface that I'm not a developer so perhaps my understanding is lacking here.  However the Java API is expected to be utilized by Plugin2 apps for Jira, and not explicitly external apps like I think they way you are trying to do it here.

Perhaps this info could help to alter the way you are trying to achieve this? 

Andy

Hi @Andy_Heinzer,

Thanks for the detailed response. Just to elaborate – We have used 'JIRA.Forms.createCreateIssueForm' in a Jira plugin. This Jira plugin communicates with another application and pages from the Jira plugin appear within an iFrame in that application. Since we have the JIRA object available in the iFrame, as per our understanding it is as good as we are accessing the Jira application in the iFrame. Hence, the custom fields should be accessible in that iFrame via our plugin through 'JIRA.Forms.createCreateIssueForm' as the iFrame works as a separate application altogether. If possible, can you connect us with a developer regarding the same.

Thanks again for all the help.

Andy_Heinzer Atlassian Team Jan 17, 2020

Hi Ankit,

Sorry that I have not been able to lead you to a solution here. I would recommend reaching out to our Developer Community - Jira Server category with this question. I am unable to move this question there myself.

That site is better suited towards supporting the development of plugins for Jira Server.

Regards,

Andy

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you