jira.LegacyRequest
DEPRECATED: jirasm-compatible work item. Use jira.WorkItem for new code.
Members
- key
- as_workitem
- attach
- attachments
- comment
- comments
- fields
- status
- transform
- transition
- update_custom_field
- wait_for_change
key
jira.LegacyRequest.keystringThe work item key.
as_workitem
jira.LegacyRequest.as_workitem()Get the jira.open() work item handle for the same underlying Jira issue.
Returns
workitemjira.WorkItemThe jira.open() work item.attach
jira.LegacyRequest.attach(file, comment?)Attach a file to the work item.
Parameters
filescriptrt.FileThe file to attach.comment?optionalstringOptional comment to add with attachment.attachments
jira.LegacyRequest.attachments()Get all attachments of the work item.
Returns
attachmentslist[scriptrt.File]List of file attachments.comment
jira.LegacyRequest.comment(comment)Add a comment to the work item.
Parameters
commentstringThe comment text.comments
jira.LegacyRequest.comments()Get all comments on the work item.
Returns
commentslist[jira.Comment]List of Comment objects.fields
jira.LegacyRequest.fields(fields)Retrieve specific field values as a dict.
Parameters
fieldslist[string]List of field names to retrieve.Returns
field_valuesdict[string:any]Dict mapping field names to their values.status
jira.LegacyRequest.status(historical?)Get the current status of the work item.
Parameters
historical?optionallist[string]Optional list of statuses to check in history. Returns the first match.Returns
statusstringThe current status or first historical match.transform
jira.LegacyRequest.transform(template)Transform the work item data using a template.
Parameters
templatestringThe Go template string.Returns
transformedstringThe rendered template text.transition
jira.LegacyRequest.transition(state, comment, fields?)Transition the work item to a new state.
Parameters
statestringThe target state name or transition name.commentstringComment to add with the transition.fields?optionaldict[string:any]Optional fields to update during transition.update_custom_field
jira.LegacyRequest.update_custom_field(field_name_or_id, value)Update a custom field on the work item.
Parameters
field_name_or_idstringThe field name or ID (e.g., ‘Category’ or ‘customfield_12345’).valueanyThe value to set for the field.wait_for_change
jira.LegacyRequest.wait_for_change(query, timeout?, retry_timeout_fn?)Wait for the work item to match a JQL condition.
Parameters
querystringThe JQL query condition (e.g., ‘status = CLOSED’).timeout?optionalstringOptional timeout duration (e.g., ‘1h’, ‘30m’).retry_timeout_fn?optionalfunctionOptional function to call on timeout. Should accept the work item and return bool.