Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Project roles/groups instead of usernames

  • currentUser — Returns the key for the user that invoked the script containing currentUser.
  • currentUserKey — Returns the key for the user that invoked the script containing currentUserKey.
  • currentUsername — Returns the username for the user that invoked the script containing currentUsername.

getUserName
getUserEmail
getFullName

...

  • projectMembers — Returns a list with all the user names of the users who have a role in the specified project.
  • projectPM — Returns the username of the project manager (project lead) of the selected project, if exists.
  • projectsForPM — Returns all the projects the selected user has the role of project manager (project lead) in.
  • projectsForUser — Returns all the projects where this user has permission to assign or to be assigned issues.
  • projectsWithPermissionForUser — Retrieves the project keys where the given user has the given permission.

...

On April 29th, in a continuous effort to improve customer trust and address all EU General Data Protection Regulation (GDPR) requirements, Atlassian is making very important changes to Jira Cloud that will affect (break!) some of your workflows. 

IMPORTANT DEADLINES: Only post-functions that include a Nunjucks template comparing a username or user key to a constant string MUST BE FIXED BY APRIL 29TH. Other fixes may be done within the next two months. 

What is GDPR?

GDPR stands for the General Data Protection Regulation and is effective as of May 25th, 2018. GDPR replaces national privacy and security laws that previously existed within the EU with a single, comprehensive EU-wide law that governs the use, sharing, transfer and processing of any personal data that originates from the EU. This regulation governs how any business operating within the EU may handle the collection of personal data. Because of these new regulations many business have had to abandon fundamental practices in favor for new methods in order to become compliant to the new laws.

Whats changing?

Atlassian will be making changes to the APIs that store user information. The username and userkey attributes will be replaced with a single accountId identifier attribute. Atlassian will also make the users email address and full name private by default. The user has the option to edit their profile and allow this information to be shared, however, these attributes may no longer be available for many users going forward.

Why does this matter?

Our whole philosophy behind SIL (Simple Issue Language) is to allow you to automation and integrate external systems with Jira in a manner that is safe from change. We believe that you should welcome new versions to the Atlassian products and be free to upgrade with out refactoring existing scripts, the way you need to with other add-ons, and without fear of impacting your existing scripts in any way. We work hard to make sure SIL scripts are both forward and backward compatible and that the language is as similar as possible between server and cloud. However, despite our best efforts, the changes to the user APIs due to the GDPR regulations may require you to make modifications to your existing script.

How do I change my scripts?

You should no longer do this:

Code Block
if(currentUser() != "admin") {
	return false;
}

Instead, do this:

Code Block
if(currentUser() != "5be24ad8b1653240376955d2") {
	return false;
}

Or better yet, do this:

Code Block
if(!isUserInRole(currentUser(), "Special Access Role")) {
	return false;
}



currentUser

currentUserKey

currentUsername

getUser

getUserByEmail

getUserByFullName

isUserInRole

projectMembers

projectPM

projectsForPM

userFullName

userInGroup

usersInGroups

usersInRole