Skip to content

Replace gyldigTil with availableSeconds on SigningRequest - #98

Open
martin-jackson wants to merge 1 commit into
mainfrom
signing-request-available-seconds
Open

Replace gyldigTil with availableSeconds on SigningRequest#98
martin-jackson wants to merge 1 commit into
mainfrom
signing-request-available-seconds

Conversation

@martin-jackson

Copy link
Copy Markdown
Contributor

Since the data type is used both before and after the signing request is sent, and the expected behavior is that a request is available for a given duration, it makes more sense to model it as being available for a given amount of time, rather than locking it to a timestamp.

Otherwise, to fulfill this expectation we would have to overwrite gyldigTil when sending the request, meaning we would have presented wrong information to the user while the request was still a draft.

@majatestad majatestad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@martin-jackson
martin-jackson force-pushed the signing-request-available-seconds branch from b15caec to 0ee7211 Compare August 19, 2026 08:50
Since the data type is used both before and after the signing
request is sent, and the expected behavior is that a request is
available for a given duration, it makes more sense to model it as
being available for a given amount of time, rather than locking it
to a timestamp.

Otherwise, to fulfill this expectation we would have to overwrite
gyldigTil when sending the request, meaning we would have presented
wrong information to the user while the request was still a draft.

In terms of capacity it's unnecessary to use long over int, but it's
nicer to work with Duration::getSeconds which returns a long.
@martin-jackson
martin-jackson force-pushed the signing-request-available-seconds branch from 0ee7211 to 0a21f98 Compare August 19, 2026 09:59
@XmlElement(name = "gyldig-til", required = true)
@Description("When the signing request expires. ISO8601 full DateTime with timezone.")
@XmlElement(name = "available-seconds", required = true)
@Description("Number of seconds the signing request stays available for signing after delivery.")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare lurer, hvis den først settes etter levering, vil det ikke da bli det samme som om vi satt gyldigTil ved levering? 🤔 Eller settes denne med en gang utkast opprettes også?

@martin-jackson martin-jackson Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settes med én gang utkastet opprettes (feltet er påkrevd ref. annotasjonene over). At varigheten på oppdraget da er 10 dager (864000 sekunder) er sant både før og setter sending

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skjønner. Kanskje man skulle endre beskrivelsen til "... after creation." istedet da?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Det er altså antall sekunder etter levering, ikke opprettelse av utkastet. Vet ikke om du tenkte opprettelse av den sendte meldingen, men tenker at å brukere «levering» er mer presist.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, da skjønner jeg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants