Friday, April 19, 2024

Update or edit status filed in JIRA issue

the status field is a special case and can't be updated directly, which is the second problem here. Changing a status in Jira is called a transition. You need to trigger the transition to move the issue into the status you want.

Start by identifying the available transitions by calling the get transitions API:

GET https://example.net/rest/api/latest/issue/FWZH-2170/transitions

This tells you which transitions are currently available, something like this:

{
  "expand": "transitions",
  "transitions": [
    {
      "id": "21",
      "name": "Fixed",
      "to": {
        "self": "https://example.net/rest/api/2/status/10001",
        "description": "",
        "iconUrl": "https://example.net/images/icons/status_generic.gif",
        "name": "Fixed",
        "id": "10001",
        "statusCategory": {
          "self": "https://example.net/rest/api/2/statuscategory/3",
          "id": 3,
          "key": "done",
          "colorName": "green",
          "name": "Done"
        }
      }
    }
  ]
}

Take the id of the transition you want, in this case 21, then post it to the issue transition API:

POST https://example.net/rest/api/latest/issue/{IssueKey}/transitions

Use a request body like this:

{
  "transition": {
    "id": 21
  }
}

You should get a 204 HTTP response from Jira which indicates the transition was successful.

Wednesday, April 3, 2024

is Required & Validation message in an adaptive card

The parameter to make the text field mandatory in adaptive card is "isRequired", pls try modify the required parameter with the below one:

{

"type": "Input.Text",
"id": "defaultInputId",
"placeholder": "enter comment",
"maxLength": 500,
"isRequired": true,
"errorMessage": "Comment is required"
},

PowerShell script to delete file versions from the specified SharePoint document library

Managing file versions in SharePoint Online is essential to maintain storage hygiene and performance, especially when versioning is enabled ...