By following the instructions given at https://confluence.atlassian.com/jirakb/creating-issues-via-direct-html-links-159474.html I have been able to have a "Create Issue" screen shown as effect of a workflow post-function.
However, the beginning of the link above states that
Please note that the content on this page is not maintained as a supported component of JIRA applications. Consequently Atlassian cannot guarantee to provide any assistance in configuring or implementing it.
As far as I am aware, what I want to do cannot be achieved using the REST API.
Is this correct?
If so, what "maintained" method would you suggest me to use in place of that mentioned in the link above?
This seems a little confused as you mention "post functions" a couple of times, but in the wrong context and suggesting that they are doing things that they simply can't.
A post-function is a chunk of code that executes after a transition is committed. Any transition (including create) will go through things in this order: Conditions (to check the user can do it), present screen if appropriate, validate entry, then finally the post-functions. So, post-functions have nothing to do with filling in fields - they happen well after you've finished with the screens and fields.
The REST API does not pre-fill things either. It does not use the UI, so there is nothing there to be pre-filled. You can use it for creating issues, and if you do, your code can be written to fill in defaults if you want. But there's nothing to do in JIRA here, you fill in the defaults in your call.
The doc you have pointed to is about pre-filling values in an html call. If that is still what you are trying to do, then the method works, but it's still going to be a case of coding in the call to fill values, you're not doing anything in JIRA.
Again, a post-function is part of a transition, and it happens at the end. It's too late to do anything with the screen.
Even if it were not, post-functions are not for doing front-end things, they don't have any way to trigger any activity for the user.
The way I do this is using a web item which leads to a https://scriptrunner.adaptavist.com/latest/jira/fragments/CreateConstrainedIssue.html
Optionally you can then have the create transition of the new issue action the issue you are creating it "from"...
Loooong time delay on this particular ask, but I have accomplished what you are asking to do (in a way) in a bit of a hacky manner... Consider adding a loop transition (a transition from a status back to itself) that has the screen that you want to appear (prompting the user to fill in certain details). Then go to the create transition and add two post-functions... one being the pre-set data you want populating the fields automatically (since this is back-end as @Nic Brough _Adaptavist_ is stating), but then have another post-function (LATER in the order of post-functions as it executes in order) that calls the transition you created above. This will then pop the front-end entry screen you desire, but still have the issue end at the status you desire.
NOTES: This is not a super clean way to do it, but I have used these loop transitions for this purpose before and it gets you what you're looking for. Also, you must be certain what transition ID you are calling on this post-function (ESPECIALLY when adding this post-function on a Create transition) as if you accidentally call the CREATE transition (or some OTHER transition that employs the CREATE transition) you can create a loop statement and create a massively impressive number of tickets as fast as your little server's heart can pitter-patter until it ultimately dies or catches fire... Please don't set your server on fire!!!! (Especially don't set the server on fire if you're on Cloud!!!!!)
Hope this is still relevant and helps!
Missing deadlines is one of the biggest problems every team lead wants to avoid when dealing with managed services. When the customer contracts your company to help with IT services it is expected th...
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