Unable to se parentId on createIssueModal

Hello,
I’m trying to open the jira issue create screen and pre-fill the parent field
I’m using the createIssueModal
I manage to set the issue type, project, summary etc. but it seems like the parent field is not set
any idea?
this is my code:

import { CreateIssueModal } from '@forge/jira-bridge';

const createIssueModal = new CreateIssueModal({
  onClose: (payload) => {
    console.log('CreateIssueModal is closed with', payload);
  },
  context:{
    "projectId": "10037",
    "issueTypeId": "10004",
    "parentId": "10592",
    "summary": "test"
},
});

createIssueModal.open();

thanks,
Dar

Me too. Maybe the problem is the new Parent field that replace the EpicLink field. I’ll try to investigate.

Same problem here, can someone advise how to set the parentId in CreateIssueModal ?

Hey team, can someone take a look please, this has been broken since a long time and it has a huge impact on the usability of the create issue modal. Thanks in advance!

Hi @Zak,

Sorry for the delay from our side. We have found the root cause and will work on the fix.

Thanks,
Vitalii

Thanks @vpetrychuk!
I hope that you are doing well! And Glad to get in touch with you again (from the other end this time ;))
Looking forward to hearing when the fix is shipped.
Zak Benbakkar

1 Like

Hi @Zak!

I’m doing well, hope you are too! Glad to still have you around <3

P.S. The fix has been rolled out to production a few mins ago.

Thanks,
Vitalii

3 Likes

Hey @vpetrychuk !
Aww Thanks! I appreciate it!
Apologies for the late reply. I just tested it and it works. Thanks a lot, this was very helpful.
Cheers!
Zak

1 Like

Hey @vpetrychuk,
I hope that you are doing well.
Since business projects support Epic issue types, wondering if there are plans to support the pre-filling of the parent field for business projects.
Best,
Zak

Hi @Zak,

Could you please send a screenshot of the field that doesn’t work for you? I assume the business project is a team-managed one? Also do you have that issue with some very old project or it can be reproduced with the one which was just recently created?

Thanks,
Vitalii

Hey @vpetrychuk
Thanks for quickly getting back to me.
Yes, ofc. Please find attached two screenshots, both are from business projects:

SALES-COMPANY: is a company managed. The create issue dialog shows the parent field but does not set the id to the one passed to the create issue dialog in the code.

SALES-TEAM: is team managed. The create issue dialog does not show the parent field altogether.

This is happening for newly created projects.

Let me know if you have more questions.

Best,
Zak


@Zak I’ve just checked the company managed project and it works as expected. Did it stop working for you after the fix?

As for the team managed project, if the field is not configured to be shown on the UI, the API won’t add it to the screen; all it does is just pre-fills the value and if the field is not on the screen, it won’t be pre-filled. I have just tested it with the team managed project and also do not have it by default. In order for it appear on the screen, you have to edit issue types in the project settings and add the field manually (also do not forge to create the Epic type to be used as parent).

Thanks,
Vitalii

2 Likes

Hi @vpetrychuk,

Actually this was a bug on my side :face_palm:

Because I did not realise (until yesterday) that it is possible to have epics in business projects, the code responsible for opening the model did something like this :smiley:

    if (isSoftwareProject) {
        context.parentId = parentId;
    }

It works now after removing the condition on software projects.

Apologies for the false alarm :pray:

Best,
Zak

1 Like