Changing issue security level from custom groovy post function shows that the security level has changed in the 'Activity' however the issue security level still remains as it was before. The user performing the operation has the permissions to set issue security level as well.
This post function checks the selected option from a single choice drop down and according to the selected value an issue security level should be set for the issue the post function was triggered from, however this is not changing as described above.
Note: the user can change the issue security level manually and the update validation result returns no errors in fact it is being valid
Thanks in advance.
Hi look use this groovy:
/* Variables */ CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager() MutableIssue issueMutable = issue; CustomField cfTypeSupport = customFieldManager.getCustomFieldObject("customfield_" + oLectorProperties.getProperty("typeofsupport")) try { String contentValue = issueMutable.getCustomFieldValue(cfTypeSupport) oLog.escribir("Typo soporte: " + contentValue.trim()) if(contentValue.trim().equals("Dudas y Soporte experto")){ oLog.escribir("ENTRA") issueMutable.setSecurityLevelId(Long.parseLong(oLectorProperties.getProperty("security.all"))); oLog.escribir("SETEA SECURITY") } } catch (Exception eException) { oLog.escribir(" > Exception > " + eException.getMessage()); }catch (NumberFormatException nFException) { oLog.escribir(" > Exception > " + nFException.getMessage()); }
good luck
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.