Forums

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

Team Managed Project: Remove Epics

fhzjrk5
September 27, 2023

I have a growing list of DONE Epics that are crowding my Epic Panel in the backlog. How do I remove completed Epics using a Team Managed Project? (i.e. there is no option to "Mark as Done" that I can see)

2 answers

1 vote
Rambabu Patina {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 10, 2018

Hi @pavanbachuDexcom, Please have a look at the similar question at https://community.developer.atlassian.com/t/componentaccessor-not-initialised/1143.

Hope this helps you. Thanks. 

pavanbachuDexcom
October 10, 2018

@Rambabu Patina {Appfire}  I  have tried that solution but it's throwing null pointer when setting assignee?

IssueManager mockIssueManager = mock(IssueManager.class);
final MockComponentWorker componentAccessorWorker = new MockComponentWorker();
componentAccessorWorker.addMock(IssueManager.class,mockIssueManager);
ComponentAccessor.initialiseWorker(componentAccessorWorker);
MutableIssue io = ComponentAccessor.getIssueManager().getIssueObject(issueID);
io.setAssignee(" ");

 

 

 

Rambabu Patina {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 10, 2018

@pavanbachuDexcom Here what's the user id you are providing in the method

setAssignee(<Provide valid user id>) 
pavanbachuDexcom
October 10, 2018

I am passing a regular string, is there a better way to get the user id?

Rambabu Patina {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 11, 2018

Try this way:

setAssignee(ApplicationUser assignee) // For this method you have to pass the type ApplicationUser

setAssigneeId(String assigneeId) // For this method you can provide user id.

pavanbachuDexcom
October 11, 2018

How do we get the Application User instance ?

Rambabu Patina {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 11, 2018

@pavanbachuDexcom

You already have the ComponentAccessor reference, so

If you want to get the current logged in user try

ApplicationUser currentUser  = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();

To get other users try:

ApplicationUser currentUser  = ComponentAccessor.getUserManager().getUserByKey(String userKey);

or 

ApplicationUser currentUser  = ComponentAccessor.getUserManager().getUserByName(String userName);

Hope this helps you.

0 votes
pavanbachuDexcom
October 9, 2018
Tried Code 
IssueManager issueManager = ComponentAccessor.getIssueManager();
MutableIssue io = issueManager.getIssueObject(issueID);
io.setAssigneeId("XXXX");

 

Got exception 

This is not expected to occur on a production system.
Developers that encounter this message within a unit test
should use n MockitoMocksInContainer rule to initialize mockito and ComponentAccessor.
For more detailed explanation read the documentation
for MockComponentWorker in the jira-tests artifact for more information
about what causes this error and how to address it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events