Has anyone had this issue before?
Instead of using storage, which isn’t accessible outside the app as far as I can see, I’d like to use properties api, which seems like the inverse would be possible.
I’m setting a property and then retrieving it and getting an undefined result?
Ideally I don’t want to be retrieving it straight away, but am just testing at the moment.
Can anyone see what I’m doing wrong?
const config = useConfig();
const updateStatus = async (newStatus: Status) => {
await properties.onConfluencePage(context.contentId).set(config.CurrentStatusString, newStatus);
let status : Status = await properties.onConfluencePage(context.contentId).get(config.CurrentStatusString);
if(!status)
console.log("This b aint working");
else
console.log(`Status updated: ${JSON.stringify(status)}`);
}
Then I created a useConfig hook, not to be confused with Forge useConfig:
export const useConfig = () : Config => {
const config : Config = {
ComplianceWorkflowSettingsString : "ComplianceWorkflowSettings",
CurrentStatusString : "CurrentStatus",
StatusHistory : "StatusHistory"
}
return config;
}
Then I get this from my logs:
INFO 2021-07-29T13:15:59.909Z … This b aint working
Anyone out there’s assistance would be greatly appreciated