Hello,
I need to add multiple generator in my script,
like insert JQL query , group by, sort
I am able to execute Insert JQL query but same method is not working for group by.
Please give us some your valuable suggestions.
Thanks
It depends on what kind of grouping you need to do. Please, check CoreStructureGenerators and CoreGeneratorParameters in our Java doc.
Regards,
Egor Tasa
ALM Works
Thanks @Egor Tasa [ALM Works] , I want to group issues using "group by Phase", i didn't find any appropriate function for the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaspreet,
Is Phase a text field or version or other field?
Regards,
Egor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Egor,
Phase is a text field.
//def params = [(CoreGeneratorParameters.FIELD_ID): Phase] as Map
def grouperId = generatorManager.createGenerator(CoreStructureGenerators.GROUPER_FIELD,Phase,structureId)
def generatorItem1 = CoreIdentities.generator(grouperId)
def forestSource1 = forestService.getForestSource(ForestSpec.structure(structureId))
forestSource1.apply(new ForestAction.Add(generatorItem1, 0, 0, 0)
I am trying to do this way, but it is not worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaspreet,
You'll need to use GROUPER_TEXT instead of GROUPER_FIELD, otherwise, it looks fine to me.
Regards,
Egor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Egor Tasa [ALM Works] ,
I did the same but it didn't given me appropriate result.
final fieldId = customFieldManager.getCustomFieldObjectByName("Phase")
def para = [(CoreGeneratorParameters.FIELD_ID):"Phase"] as Map
def grouperId = generatorManager.createGenerator(CoreStructureGenerators.GROUPER_TEXT, para, structureId)
def gen = CoreIdentities.generator(grouperId)
def fore = forestService.getForestSource(ForestSpec.structure(structureId))
fore.apply(new ForestAction.Add(gen,0,0,0))
Expected OUTPUT: Group by Phase: and all issue should moves to their respective phases
Above Code gives below output:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaspreet,
Grouping by text field is done by Group by Attribute and text field as a parameter. But maybe I am missing something, let me consult with developers.
Regards,
Egor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apparently, parameters are the problem, for a text field these should be:
"attribute": {
"id": "customfield",
"params": {
"fieldId": CUSTOM_FIELD_ID
}
}
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.