This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| import com.atlassian.jira.issue.* | |
| def issuetype = getIssueContext().getIssueType().name | |
| if (issuetype.contains("File Transmission Request")) { | |
| getFieldById("issuetype") | |
| .setDescription("<font size=\"2f\">Files must be named correctly as defined in the File Inventory database entry or requests will be returned for review/correction</font>") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| def issueService = ComponentAccessor.issueService | |
| def projectManager = ComponentAccessor.projectManager | |
| def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() | |
| def requestTypeValue = "Submit Form 1362" //replace it with the one you want - see note below | |
| def constantsManager = ComponentAccessor.getConstantsManager() | |
| def issueType = constantsManager.getAllIssueTypeObjects().find {it.name.equalsIgnoreCase("New Project Request")} | |
| def issueInputParameters = issueService.newIssueInputParameters() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| import com.atlassian.jira.event.user.UserEventType | |
| import com.atlassian.jira.exception.CreateException | |
| import com.atlassian.jira.user.ApplicationUser | |
| import com.atlassian.jira.user.UserDetails | |
| def uu = ComponentAccessor.userUtil | |
| // START config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.bc.user.UserService | |
| import com.atlassian.jira.component.ComponentAccessor | |
| def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() | |
| def userService = ComponentAccessor.getComponent(UserService) | |
| UserService.CreateUserRequest createUserRequest = UserService.CreateUserRequest. | |
| withUserDetails(user, "username", "password", "[email protected]", "Test User: user") | |
| UserService.CreateUserValidationResult result = userService.validateCreateUser(createUserRequest) | |
| if(result.isValid()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| // the group you want to remove users from | |
| final String groupName = "jira-users" | |
| // user names of the users to remove | |
| final List<String> usersToRemove = ["john.doe","user_B"] | |
| def userUtil = ComponentAccessor.userUtil | |
| def userManager = ComponentAccessor.userManager |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.bc.user.UserService | |
| import com.atlassian.jira.component.ComponentAccessor | |
| // the username of the new user - needs to be lowercase and unique - required | |
| final String userName = "vikrant_kumar" | |
| // The password for the new user - if empty a random password will be generated | |
| final String password = "password" | |
| // The email address for the new user - required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| import com.onresolve.jira.groovy.user.FieldBehaviours | |
| import groovy.transform.BaseScript | |
| @BaseScript FieldBehaviours fieldBehaviours | |
| def list1 = getFieldById(fieldChanged) | |
| def list1Value = list1.value.toString() | |
| def list2 = getFieldByName("List 2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| import com.onresolve.jira.groovy.user.FieldBehaviours | |
| import groovy.transform.BaseScript | |
| @BaseScript FieldBehaviours fieldBehaviours | |
| def list1 = getFieldById(fieldChanged) | |
| def list1Value = list1.value.toString() | |
| def list2 = getFieldByName("List 2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.atlassian.jira.component.ComponentAccessor | |
| import com.onresolve.scriptrunner.db.DatabaseUtil | |
| import groovy.sql.Sql | |
| import org.ofbiz.core.entity.ConnectionFactory | |
| import org.ofbiz.core.entity.DelegatorInterface | |
| def issueManager = ComponentAccessor.issueManager | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with Story_Sum = sum{if(issuetype="Story" AND fixVersion = "2021 CapEx - Release 1" ,1)} | |
| : | |
| if(!Story_Sum;"No Story Found";not issuetype;sum | |
| {if((issuetype="Bug" OR issuetype="Customer Bug") AND fixVersion = "2021 CapEx - Release 1",1)} | |
| / Story_Sum) | |
| if(not issuetype,concat("*{color:red}",sum{if(issuetype="Story",1)}/sum{if(issuetype="Bug",1)},"{color}*")) |