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 share a board with project by scriptrunner? Edited

Hi all!


I wrote a groovy code in scriptrunner which is genererate a project with scrum board. It is a post-function because project generated from issue. It has got one problem. When I delete the project, then board still exist. So I figured it out that when I generate again project then code won't make another board, just share with project. I searched on internet last whole day, but I didn't find similar issue. I tried to delete the board what was successful but its filter still exsist and it somehow caused some problem when I generate an I read the script runner's sources: https://scriptrunner.adaptavist.com/latest/jira/scripting-other-plugins.htmlhttps://scriptrunner.adaptavist.com/latest/jira/plugins/working-with-jira-agile.html
How can I share a board with project by scriptrunner? I would like to fill out this field with project by scripting.

Capture.PNG

I am using the following versions: JIRA v6.4.10 (server); JIRA Agile v6.7.0 ; Adaptavist ScriptRunner for JIRA 4.1.3.24

Thank you in advanced!

 

UPDATE:

Related issue: https://community.atlassian.com/t5/Answers-Developer-Questions/JIRA-Java-plugin-ProjectService-createproject-creates-project/qaq-p/513836?posted=614874#U614874

1 answer

1 accepted

0 votes
Answer accepted

Hello guys, I did it! :) But I got another problem... I set the filter's share. It is okey, after that on project view the board is not appear. I found a solution, what is cache clear. Is it safe?
Code: 

ComponentAccessor.getProjectManager().refresh()
ComponentAccessor.getComponent(EventPublisher.class).publish(ClearCacheEvent.INSTANCE)

 It seemed long to run. Is it okey? (On my Sandbox Jira server)
Our official server is bigger with more projects, then If I use this, it will be more longer?

 

Picture about not-showing-board-place:

Capture.PNG

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 03, 2019 in Marketplace Apps

How to estimate projects more accurately?

Gaining insight into your team’s effectiveness and choosing the right estimation technique.   Estimating projects is hard. It is because people have the tendency to underestimate the time thin...

296 views 2 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you