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

Example
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

Example
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

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

Parameters

  • Issue represents an issue.
  • PanelName represents the panelName.

Panel Item History structure


AttributeValue typeContent details / format
issuecom.valiantys.software.elements.api.model.IssueRefissue concerned by the modification.
operationcom.valiantys.software.elements.api.model.HistoryActiontype of the operation - enumeration (CREATED, UPDATED, DELETED)
panelNamejava.lang.Stringname of the panel
modifyBycom.atlassian.jira.user.ApplicationUseruser who has made modification
modificationDatejava.util.Datedate of the modification
oldPanelItemHistoryDetailcom.valiantys.software.elements.api.model.PanelItemHistoryDetailold value of the item history
newPanelItemHistoryDetailcom.valiantys.software.elements.api.model.PanelItemHistoryDetailnew value of the item history


Panel Item History Detail structure


AttributeValue typeContent details / format
attributeNamesjava.util.Listlist of attributes names (corresponding to AttrobuteInfo.name)
valuesjava.util.Listlist of values in string format