Enable structure manual adjustments while creating structures with scriptrunner in jira

Pavan
Contributor
December 8, 2020

Hello Team,

Thanks in advance.

we are creating structures automatically using scriptrunner.

we want Manual Adjustment should be check by default.

Please suggest a way to allow manual adjustments.

manualAdjustment.PNG

2 answers

1 accepted

0 votes
Answer accepted
Stepan Kholodov _ALM Works_
Atlassian Partner
December 14, 2020

Hello Pavan,

The easiest way to do this is with Scriptrunner is to call ManualAdjustmentService:

import com.atlassian.jira.component.ComponentAccessor as CA

def plugin = CA.pluginAccessor.getPlugin('com.almworks.jira.structure')
def mas = plugin.getModuleDescriptor('adjustment-service').module

// structure ID, flag value:
mas.setEnabledForStructure(353, true)

Please change the structure's id appropriately.

I hope this helps! Please feel free to contact us directly at support.almworks.com if you need further assistance.

Best regards,
Stepan Kholodov
ALM Works

Pavan
Contributor
December 14, 2020

Hello @Stepan Kholodov _ALM Works_ ,

 Thanks for your solution.

I used the same way but same throwing me error like check exist or not.

structmanualAdjustment.PNG

Stepan Kholodov _ALM Works_
Atlassian Partner
December 14, 2020

Can you please share the script you use in full and also clarify what exactly you want it to do? And also please tell us what you get in the Result tab when you try to run the script - is there a particular error there?

Best regards,
Stepan Kholodov
ALM Works

Pavan
Contributor
December 14, 2020

Hello @Stepan Kholodov _ALM Works_ ,

 it is working now, thanks alot

0 votes
Pavan
Contributor
January 5, 2021

Hello @Stepan Kholodov _ALM Works_ ,

I face issue again, like method doesn't exists

Capture.PNG

Stepan Kholodov _ALM Works_
Atlassian Partner
January 28, 2021

Hello Pavan,

Please contact us directly at support.almworks.com for proper support. And please send us the script in full along with the error.

Best regards,
Stepan Kholodov
ALM Works

Suggest an answer

Log in or Sign up to answer