Skip to main content

Community

Table for getting history details of jira data with old value & new value

Not planned

Please sign in to leave a comment.

Comments

2 comments

  • Official comment

    Hi Shilpa,

    Thanks for submitting this feature request. I would recommend that you consider a downstream transformation to achieve this instead:

    Here's an example of what that could look like

    -- Derives old_value using LAG() over the chronological history per issue+field
    WITH field_history_with_old_value AS (
    SELECT
    issue_id,
    field_id,
    time AS modified_on,
    LAG(value) OVER (PARTITION BY issue_id, field_id ORDER BY time) AS old_value,
    value AS new_value
    FROM jira.issue_field_history
    )

    SELECT
    h.issue_id,
    h.field_id,
    f.name AS field_name,
    h.old_value,
    h.new_value,
    h.modified_on
    FROM field_history_with_old_value h
    LEFT JOIN jira.field f ON h.field_id = f.id

    Let me know if this helps.

    Thanks,
    Frank

    Hi Frank,

     

    Thanks for the reply. we already have this kind of query but the request is whether we can get this as a table as most of our teams would need such data to be pulled and the query does have performance issue and can't get the data as per rquirements.