---
title: "addHistoryItem"
canonical: "https://support.appfire.com/space/PSJ/882638872/addHistoryItem"
format: markdown
---
> Macro (aura-html)


 > Macro (button-handy)




> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | addHistoryItem(issue, oldVal, newVal)  
> or  
> addHistoryItem(issue, oldVal, newVal ,user)  
> or  
> addHistoryItem(issue, oldVal, newVal ,user, field) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Adds a history item

By default, to avoid history pollution, all SIL routines avoid adding history items. This goes against that, and adds a history item into the issue history, on the 'Power_Scripts_Suite' pseudo-field.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | issue | string | Yes | Issue key |
> | oldVal | string | Yes | old value, string may be empty |
> | newVal | string | Yes | new value, string may be empty |
> | user | string | No | the user doing that record. If the user is null, takes the current user as default |
> | field | string | No | the pseudo-field for that record. If it is null, it will be assumed to be a special Power Scripts Suite field name |

## Return Type

**boolean**

returns true if the history item is added, false if issue is invalid or user is null

> ⚠️ All the history items are recorded on a pseudo field named 'Power_Scripts_Suite'

## See also

> Macro (contentbylabel)