Advertisement
JiraAdmin

CAMS REQUEST 1

Mar 3rd, 2023 (edited)
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 3.19 KB | None | 0 0
  1. def camsrequest = getFieldById("customfield_29800")
  2.  
  3. def affectedsystem = getFieldById("customfield_29801")
  4. def camsconfluence = getFieldById("customfield_29809")
  5. def camsjira = getFieldById("customfield_29803")
  6. def cfname = getFieldById("customfield_29814")
  7. def description = getFieldByName("Description")
  8. def spacename = getFieldById("customfield_29813")
  9. def projectspacelink = getFieldById("customfield_29802")
  10. def projectkey = getFieldById("customfield_29805")
  11. def projectlink = getFieldById("customfield_29812")
  12. def projectname = getFieldById("customfield_29804")
  13. def projectlead = getFieldById("customfield_29807")
  14. def projecttype = getFieldById("customfield_29806")
  15.  
  16.  
  17.  
  18.  
  19. String cfval = camsrequest.getValue() as String
  20.  
  21. if(cfval == ("Report a problem")){
  22. affectedsystem.setRequired(true)
  23. affectedsystem.setHidden(false)
  24. affectedsystem.setFormValue(null)
  25. camsconfluence.setHidden(true)
  26. camsconfluence.setRequired(false)
  27. camsjira.setHidden(true)
  28. camsjira.setRequired(false)
  29. cfname.setHidden(true)
  30. cfname.setRequired(false)
  31. description.setRequired(true)
  32. description.setHidden(false)
  33. spacename.setHidden(true)
  34. spacename.setRequired(false)
  35. projectspacelink.setRequired(true)
  36. projectspacelink.setHidden(false)
  37. projectspacelink.setFormValue(null)
  38. projectkey.setHidden(true)
  39. projectkey.setRequired(false)
  40. projectlink.setHidden(true)
  41. projectlink.setRequired(false)
  42. projectname.setHidden(true)
  43. projectname.setRequired(false)
  44. projectlead.setHidden(true)
  45. projectlead.setRequired(false)
  46. projecttype.setHidden(true)
  47. projecttype.setRequired(false)
  48.  
  49.  
  50. }
  51.  
  52. if (cfval == ("Jira")){
  53. affectedsystem.setRequired(false)
  54. affectedsystem.setHidden(true)
  55. affectedsystem.setFormValue(null)
  56. camsconfluence.setHidden(true)
  57. camsconfluence.setRequired(false)
  58. camsjira.setHidden(false)
  59. camsjira.setRequired(true)
  60. camsjira.setFormValue(null)
  61. cfname.setHidden(true)
  62. cfname.setRequired(false)
  63. description.setRequired(false)
  64. description.setHidden(true)
  65. spacename.setHidden(true)
  66. spacename.setRequired(false)
  67. projectspacelink.setRequired(false)
  68. projectspacelink.setHidden(true)
  69. projectkey.setHidden(true)
  70. projectkey.setRequired(false)
  71. projectlink.setHidden(true)
  72. projectlink.setRequired(false)
  73. projectname.setHidden(true)
  74. projectname.setRequired(false)
  75. projectlead.setHidden(true)
  76. projectlead.setRequired(false)
  77. projecttype.setHidden(true)
  78. projecttype.setRequired(false)
  79.  
  80.  
  81. }
  82.  
  83. if (cfval == ("Confluence")){
  84. affectedsystem.setRequired(false)
  85. affectedsystem.setHidden(true)
  86. affectedsystem.setFormValue(null)
  87. camsconfluence.setHidden(false)
  88. camsconfluence.setRequired(true)
  89. camsconfluence.setFormValue(null)
  90. camsjira.setHidden(true)
  91. camsjira.setRequired(false)
  92. cfname.setHidden(true)
  93. cfname.setRequired(false)
  94. description.setRequired(false)
  95. description.setHidden(true)
  96. spacename.setHidden(true)
  97. spacename.setRequired(false)
  98. projectspacelink.setRequired(false)
  99. projectspacelink.setHidden(true)
  100. projectkey.setHidden(true)
  101. projectkey.setRequired(false)
  102. projectlink.setHidden(true)
  103. projectlink.setRequired(false)
  104. projectname.setHidden(true)
  105. projectname.setRequired(false)
  106. projectlead.setHidden(true)
  107. projectlead.setRequired(false)
  108. projecttype.setHidden(true)
  109. projecttype.setRequired(false)
  110.  
  111.  
  112. }
  113.  
Tags: CAMS REQUEST
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement