Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How Can I Edit Status Properties with Behaviors and Scriptrunner?

Hello

We use one Workflow for different tiers of support, with a status to separate from the Triage team to the Level 2 team. What we want to do is make it so level 2 agents cannot assign tickets while it's sitting in Triage and Triage agents cannot assign tickets if it's not in the Triage Status. 

With the Behaviors plugin I can make the assignee field read only to the required team, but this will only work on the Button and not the field on the view issue screen, if i remove Assignee from the Edit screen the option "Assign to Me" is still functional. I can remove this by editing the Status properties to limit to a group. However i would not like to go this route as i feel it's too granular and difficult to manage in the long run. 

Is there a way i can combine the two and control the Status Properties via Scriptrunner and the Behaviors plugin?

 

 

1 answer

1 accepted

Hi @Ryan L

If the user have the permission in the scheme, you cant remove the "Assign to me button" eaither with JavaScript or Behaviours, you cant just remove it.

You have to play with the status properties to do this change, and limit it to a group/user/role in the certain statuses.

Hope it helps.

Regards

Hello, 

 

Right now i can limit using the Status properties by going to each status, i know this. But is there a way i can set the status property through scriptrunner?

Here you go:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.StatusManager
import com.atlassian.jira.workflow.WorkflowManager

StatusManager statusManager = ComponentAccessor.getComponent(StatusManager)
WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager()

String statusId = "10201" //Change with the status you want to add the property
String workflowName = "XXXX" //Change with your workflow name

Map currentAttributes = workflowManager.getWorkflow(workflowName).getLinkedStep(statusManager.getStatus(statusId)).getMetaAttributes()
currentAttributes.put("jira.permission.assignee.group","whatever")
workflowManager.getWorkflow(workflowName).getLinkedStep(statusManager.getStatus(statusId)).setMetaAttributes(currentAttributes)
Like # people like this

PERFECT!!!

 

I'll give it a shot when i get some free time. 

It works. Thank you very much.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

232 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you