Closed joshua-probst closed 1 month ago
@joshua-probst Thanks for reporting. We will work on this and share an update soon.
Hi @joshua-probst was this _moderationStatus working before when you do setValue?
@deepamajhi in combination with approvalactionby it workes for me for maybe two years.
Hi @joshua-probst modifying ApprovalStatus is not supported through setValue. You can check this document and see the supported column types for setValue https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/formatting-advanced
Hii @joshua-probst .. do you have any further queries on this or we can close this item?
@deepamajhi you can close this item.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
Declarative list formatting
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
No response
Describe the bug / error
I dont know if this is the right place, but i found a bug when using coloumn formatting for editing the default approval value.
Sample (which sample are you having trouble with)
https://github.com/pnp/List-Formatting/tree/master/column-samples/approval-buttons-setValue-status-user
I edit the action input to :
"actionInput": { "_ModerationStatus": "0", "ApprovalActionBy": "@me" }
What Should Happen
For a few days now I and other users have had the problem that the buttons for approving and rejecting no longer work. The manual approval still works and if i changed the action input to edit a single text coloum everything works fine. So in my opinion there must be a change or something that i cant edit the moderation status anymore. Do you have any clue why this doesnt work?
What Actually Happens
At the moment you press the button and nothing happen. Is there a way to debug the thinks in the background because the browser console is empty.
Steps to reproduce
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "style": { "flex-directon": "row", "justify-content": "left", "align-items": "center", "flex-wrap": "nowrap" }, "children": [ { "elmType": "div", "style": { "display": "inherit", "flex-directon": "row", "justify-content": "left", "align-items": "center", "flex-wrap": "wrap" }, "children": [ { "elmType": "button", "customRowAction": { "action": "setValue", "actionInput": { "_ModerationStatus": "0", "ApprovalActionBy": "@me" } }, "attributes": { "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover" }, "style": { "border": "none", "background-color": "transparent", "cursor": "pointer", "display": "flex", "flex-directon": "row", "justify-content": "left", "align-items": "center", "flex-wrap": "wrap" }, "children": [ { "elmType": "span", "attributes": { "iconName": "SkypeCircleCheck" }, "style": { "padding": "4px" } }, { "elmType": "span", "txtContent": "Approve", "style": { "word-break": "keep-all" } } ] } ] } ] }
Expected behavior
Approve List Item -> worked for me for 2 years.