/src/main/resources/com/onresolve/jira/groovy/canned/admin/WontCompile313.groovy
Groovy | 59 lines | 48 code | 10 blank | 1 comment | 1 complexity | 55f210efd7979681a9051ec8530d139e MD5 | raw file
- package com.onresolve.jira.groovy.canned.admin
-
- // import com.xyz.no.such
- import com.onresolve.jira.groovy.canned.CannedScript
- import com.atlassian.jira.util.SimpleErrorCollection
- import com.atlassian.jira.util.ErrorCollection
-
- public class WontCompile implements CannedScript {
-
- public String getName() {
- "WontCompile for JIRA 3.13.x and below"
- }
-
- public String getDescription() {
- "XXX this class should really not compile"
- }
-
- List getCategories() {
- ["ADMIN"]
- }
-
- public List getParameters(Map params) {
- [
- [
- Label:"Project",
- Name:"Project",
- Description:"Project",
- ],
- [
- Name:"Remote User",
- Label:"Remote User",
- Description:"A user id",
- ],
- ]
- }
-
- ErrorCollection doValidate(Map params, boolean forPreview) {
- System.out.println("GetUser.doValidate");
- SimpleErrorCollection errorCollection = new SimpleErrorCollection()
- if (!params["Project"]) {
- errorCollection.addError "Project", "Project required"
- }
- return errorCollection
- }
-
- Map doScript(Map params) {
- System.out.println(this.class.getName());
- System.out.println("WontCompile.doScript");
- ["output":"The script has run with arg ${params["Project"]}"]
- }
-
- String getDescription(Map params, boolean forPreview) {
- "getDescription(Map args) - args are: " + args
- }
-
- public Boolean isFinalParamsPage(Map params) {
- true
- }
- }