Advertisement
JiraAdmin

CAMS JIRA 2

Mar 3rd, 2023 (edited)
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.93 KB | None | 0 0
  1. def camsjira = getFieldById("customfield_29803")
  2. def projectname = getFieldById("customfield_29804")
  3. def projectlink = getFieldById("customfield_29812")
  4. def projectkey = getFieldById("customfield_29805")
  5. def projecttype = getFieldById("customfield_29806")
  6. def projectlead = getFieldById("customfield_29807")
  7. def description = getFieldByName("Description")
  8. def cfname = getFieldById("customfield_29814")
  9.  
  10.  
  11.  
  12. String cfval = camsjira.getValue() as String
  13.  
  14. if (cfval == ("Create New Project")){
  15. projectname.setHidden(false)
  16. projectname.setRequired(true)
  17. projectname.setFormValue(null)
  18. projectlink.setHidden(true)
  19. projectlink.setRequired(false)
  20. projectkey.setHidden(false)
  21. projectkey.setRequired(true)
  22. projectkey.setFormValue(null)
  23. projectlead.setHidden(false)
  24. projectlead.setRequired(true)
  25. projectlead.setFormValue(null)
  26. description.setHidden(false)
  27. description.setRequired(false)
  28. projecttype.setHidden(false)
  29. projecttype.setRequired(true)
  30. projecttype.setFormValue(null)
  31. cfname.setHidden(true)
  32. cfname.setRequired(false)
  33.  
  34. }
  35.  
  36. if (cfval == ("Project Modification")){
  37. projectname.setHidden(true)
  38. projectname.setRequired(false)
  39. projectlink.setHidden(false)
  40. projectlink.setRequired(true)
  41. projectlink.setFormValue(null)
  42. projectkey.setHidden(true)
  43. projectkey.setRequired(false)
  44. projectlead.setHidden(true)
  45. projectlead.setRequired(false)
  46. description.setHidden(false)
  47. description.setRequired(true)
  48. projecttype.setHidden(true)
  49. cfname.setHidden(true)
  50. cfname.setRequired(false)
  51.  
  52. }
  53.  
  54. if (cfval == ("Custom Field Creation")){
  55. projectname.setHidden(true)
  56. projectname.setRequired(false)
  57. projectlink.setHidden(false)
  58. projectlink.setRequired(true)
  59. projectkey.setHidden(true)
  60. projectkey.setRequired(false)
  61. projectlead.setHidden(true)
  62. projectlead.setRequired(false)
  63. description.setHidden(false)
  64. description.setRequired(false)
  65. projecttype.setHidden(true)
  66. projecttype.setHidden(true)
  67. cfname.setHidden(false)
  68. cfname.setRequired(true)
  69.  
  70. }
Tags: CAMS JIRA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement