Setting Behaviours
Behaviours.png
def components = getFieldById("components"); com.atlassian.jira.issue.IssueManager issueManager = com.atlassian.jira.component.ComponentAccessor.getIssueManager(); com.atlassian.jira.bc.project.component.ProjectComponentManager projectComponentManager = com.atlassian.jira.component.ComponentAccessor.getProjectComponentManager(); def id = getFieldById("id"); com.atlassian.jira.issue.Issue issue = issueManager.getIssueObject(Long.parseLong((String)id.getValue())); java.util.Collection<com.atlassian.jira.bc.project.component.ProjectComponent> projectComponentList = projectComponentManager.findAllForProject(issue.getProjectId()); java.util.Map<String, String> fieldOptions = new java.util.HashMap<String, String>(); for (com.atlassian.jira.bc.project.component.ProjectComponent projectComponent : projectComponentList) { if (!projectComponent.getName().equals("TEST")) { fieldOptions.put(String.valueOf(projectComponent.getId()), projectComponent.getName()); } } components.setFieldOptions(fieldOptions);
Remove the "TEST" from the candidate .
Create Issue (Compontens: TEST XYZ)
TEST-1.png
Edit this Issue
quickly disappear.png "TEST XYZ" to appear for a very brief moment and then quickly disappear.
candidate.png It will be displayed in the candidate.
I have already been selected but will disappear.
This seems also to have disappeared in the partial match.
Chrome stable(windows,49.0.2623.110 m (64-bit))
The TEST component never appears.
Yes. I want the behavior to remove "TEST",It's not a problem.
This problem is that "TEST XYZ "disappears when I opened the editing screen.
What browser and version are you using? We can't seem to reproduce this issue with the same versions. The TEST component never appears.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Steven Behnke
Thank you for your help.
I wanted to relay that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow this is confusing haha. I can maybe interpret a bit.
Foremost, I've found you can expand images by right clicking them and opening them in a new tab. It's a lame workaround though.
Secondly, it seems that Kengo Ohsaki believes they have found a bug, if I am reading this right. They have two Components declared inside their project, "Component" and "Component XYZ."
Expected
They want the behavior to remove "Component". This is intended.
Actual
The behavior removes the partial match "Component XYZ." This is unintentional behavior.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jamie Echlin [Adaptavist]
Thanks for keeping in touch.
This problem is that "TEST XYZ" disappears in the editing screen display.
I delete only "TEST". It is output in development log of Chrome.
However, "TEST XYZ" disappears as soon as I opened the issue editing screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately screenshot 4 is very small and I can't expand it for some reason. Confluence Questions is really not being that helpful lately.
I appreciate that you have spent time asking this question, but I don't really understand what it is you want to happen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.