Elements Checklist

Reading panel items History v1.13

In this section, you will learn how to get panel items history. The examples are in Java but they are applicable to Groovy

Main service

You will need to use the PanelContentService:

...
import com.valiantys.software.elements.api.content.PanelContentService;

@Named
public class MyService {
	private final PanelContentService panelContentService;

	public MyService(PanelContentService panelContentService) {
		this.panelContentService = panelContentService;
	}

}

Finding an issue history according to issue

You will need to use PanelContentService.findIssueHistoryByIssue.

Example

Java
List<PanelItemHistory> panelItemHistoryList = panelContentService.findIssueHistoryByIssue(issue);
for (PanelItemHistory panelItemHistory : panelItemHistoryList) {
	...
}

Parameters

  • Issue represents an issue.


Finding an issue history according to panel

You will need to use PanelContentService.findIssueHistoryByPanel.

Example

Java
List<PanelItemHistory> panelItemHistoryList = panelContentService.findIssueHistoryByPanel(panelName);
for (PanelItemHistory panelItemHistory : panelItemHistoryList) {
	...
}

Parameters

  • PanelName represents the panelName.


Finding an issue history according to issue and panel

You will need to use PanelContentService.findIssueHistoryByIssueAndPanel.

Example

Java
List<PanelItemHistory> panelItemHistoryList = panelContentService.findIssueHistoryByIssueAndPanel(issue, panelName);
for (PanelItemHistory panelItemHistory : panelItemHistoryList) {
	...
}

Parameters

  • Issue represents an issue.

  • PanelName represents the panelName.

Panel Item History structure


Attribute

Value type

Content details / format

issue

com.valiantys.software.elements.api.model.IssueRef

issue concerned by the modification.

operation

com.valiantys.software.elements.api.model.HistoryAction

type of the operation - enumeration (CREATED, UPDATED, DELETED)

panelName

java.lang.String

name of the panel

modifyBy

com.atlassian.jira.user.ApplicationUser

user who has made modification

modificationDate

java.util.Date

date of the modification

oldPanelItemHistoryDetail

com.valiantys.software.elements.api.model.PanelItemHistoryDetail

old value of the item history

newPanelItemHistoryDetail

com.valiantys.software.elements.api.model.PanelItemHistoryDetail

new value of the item history


Panel Item History Detail structure


Attribute

Value type

Content details / format

attributeNames

java.util.List

list of attributes names (corresponding to AttrobuteInfo.name)

values

java.util.List

list of values in string format