Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Which Java API to use to change the notification scheme of a project?

Satnam singh aujla September 19, 2019

NotificationSchemeService don't have any method to assign new notification scheme to the project. However to change Permission scheme, we can do with method "assignPermissionSchemeToProject(ApplicationUser user, Long schemeId, Long projectId)" present in PermisionSchemeService.java.

Need help?

1 answer

0 votes
Christian Lund
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 24, 2020

I think you can use:

notificationSchemeManager = ComponentAccessor.getNotificationSchemeManager();
NotificationScheme notificationScheme = notificationSchemeManager.getSchemeObject(<some id>);
notificationSchemeManager.addSchemeToProject(project, notificationScheme);

https://docs.atlassian.com/software/jira/docs/api/8.0.0/com/atlassian/jira/scheme/SchemeManager.html#addSchemeToProject-org.ofbiz.core.entity.GenericValue-org.ofbiz.core.entity.GenericValue-

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events