JJupin provides a function currentUser() to get the current user.
Is there something similar for a project? Like currentProject() which returns the key of the current project?
By default, issue standard variables are pre-declared in SIL, such as project, which holds the key of the current project.
You can see more details in the documentation link below, under the Standard Variables section:
It seems like I cannot use the field for my purpose, because it variable is not initialized on the createIssue screen.
I wanted to restrict the issuetypes available for creation based on the project role a user has, based on this tutorial:
Sadly, it only works with a hardcoded project string.
Can anyone help?
Keep in mind that you can associate different scripts to different projects. So if you don't have multiple projects associated with the same script, the project will always be the same.
Having the ability to retrieve values from the screen in the init script is a feature we don't have yet.
The role of IT professionals has become increasingly difficult over the last decade. Our organizations work in an increasingly software-powered world and IT professionals are expected to not...
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