HI Team,
i wanted to fetch the radio button custom field value and on the basis of custom field values, i want to set this to another custom field value.
def customFields = get("/rest/api/2/field")
.asObject(List)
.body
.findAll { (it as Map).custom } as List<Map>
def newSQL = customFields.find { it.name == 'custom_field 1' }?.id
def newUser = customFields.find { it.name == 'customf_field 2' }?.id
def newLibrary = customFields.find { it.name == 'custom_field 3' }?.id
//def vaRequired = customFields.find { it.name == 'custom field 4' }?.id
def newSQLFieldValue = issue.fields[newSQL] as String
def newUserFieldValue = issue.fields[newUser] as String
def newLibraryFieldValue = issue.fields[newLibrary] as String
if(newSQLFieldValue != null && newUserFieldValue != null && newLibraryFieldValue != null){
logger.info(" New SQL " + newSQLFieldValue + " New User " + newUserFieldValue + " New Libraby " + newLibraryFieldValue)
if(newSQLFieldValue.equalsIgnoreCase('yes') && newUserFieldValue.equalsIgnoreCase('yes') && newLibraryFieldValue.equalsIgnoreCase('yes')){
//here if all the three field values are "Yes"/"No" then this values should be set accordingly to Custom_field 4.
}
}
Right now I'm getting the three custom field values but while checking within the condition it fails.
@Dave Bosman [Realdolmen] thanks for your response.
we are on jira cloud, and this add-on is for Jira server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dave Bosman [Realdolmen] i do not see any post function using which i can set another custom field value based on the condition.
Could you please let me know which post function I need to use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't have to use post functions, in the project administration you have a new menu item called "Automation"
Create a new rule and let it trigger on an event. use the event that is triggered by your workflow. (you can use a custom event for this)
Then you can perform the action that you need.
You can find all the information how the plugin works on this site
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just noticed there is a better solution.
in the automation rule you can use "issue transitioned" as a trigger.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, i am evaluating this add-on but I did not find any way to configure this for particular workflow or Issue type..because in my project the same workflow is used for three different issue types and using this addon we can apply this rule on status wise like from open status to stat in dev but this status might be using in another workflow for another issue types then how can i configure it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After the transition trigger you can add a new condition.
Use the JQL condition and write a JQL that selects what you need. You can make it as easy or complex as you need.
For example to select 2 issuetypes.
issuetype in (Bug, Epic)
After the condition you can add the action end you use "edit issue"
Select the field you want to update and look in the documentation link i send you to find the value that you want to add.
Regards
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dave Bosman [Realdolmen] thanks for your time and response. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using this add-on we have used to achieve the functionality but the thing here is...the Automation for Jira add-on has the restriction like 300 rule can be executed per month.
Because of this we not able to add the more rules ..is there any different add-ons is there?
@Alexey Matveev can we achieve this using power scrip add-on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The scenario is as below..
radio button fields
Test1 - Yes
Test2 - Yes
Test3 - Yes
If all the above fields are Yes then the ABC (radio button) field should set as Yes.
If any of the above fields are Yes then the ABC (radio button) field should set as Yes.
If all the above fields are No then the ABC (radio button) field should set as No.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure why your condition fails with the ScriptRunner add-on. It should work.
I believe that in Power Scripts it should work too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response.
Actually for the single functionality, we don't want to purchase the Script runner plugin.
Without the script, I mean to say using any configurations can we achieve the above use case in power script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.